From 957d77b518c541154541b9afb8eaa09047d4cad3 Mon Sep 17 00:00:00 2001 From: sarpadi Date: Mon, 7 Oct 2024 10:49:57 +0300 Subject: [PATCH 1/3] ad7124: Tie MISO to GPIO Signed-off-by: sarpadi --- projects/ad7124_asdz/de10nano/system_top.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/ad7124_asdz/de10nano/system_top.v b/projects/ad7124_asdz/de10nano/system_top.v index c1df57ea3f..047f5baaa3 100755 --- a/projects/ad7124_asdz/de10nano/system_top.v +++ b/projects/ad7124_asdz/de10nano/system_top.v @@ -139,7 +139,7 @@ module system_top ( // adc control gpio assign - assign gpio_i[63:33] = gpio_o[63:33]; + assign gpio_i[63:34] = gpio_o[63:34]; assign gpio_i[31:15] = gpio_o[31:15]; // bd gpio @@ -148,6 +148,7 @@ module system_top ( assign gpio_bd_o[7:0] = gpio_o[7:0]; assign gpio_i[32] = sync_err; + assign gpio_i[33] = spi_miso; // IO Buffers for I2C From f9b2042492315c9aec886b1b9b1dedd8343c8f84 Mon Sep 17 00:00:00 2001 From: sarpadi Date: Tue, 8 Oct 2024 11:27:31 +0300 Subject: [PATCH 2/3] ad7124: Update docs Signed-off-by: sarpadi --- docs/projects/ad7124_asdz/index.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/projects/ad7124_asdz/index.rst b/docs/projects/ad7124_asdz/index.rst index ee2311d432..27e0ae5e49 100644 --- a/docs/projects/ad7124_asdz/index.rst +++ b/docs/projects/ad7124_asdz/index.rst @@ -92,7 +92,7 @@ The Software GPIO number is calculated as follows: .. list-table:: :widths: 25 25 25 25 - :header-rows: 2 + :header-rows: 3 * - GPIO signal - Direction @@ -106,6 +106,10 @@ The Software GPIO number is calculated as follows: - INPUT - 32 - 0 + * - spi_miso + - INPUT + - 33 + - 1 Building the HDL project ------------------------------------------------------------------------------- From afce5b5d84b3d6dbfdd28cebe7e5914aa08d0eaa Mon Sep 17 00:00:00 2001 From: sarpadi Date: Thu, 10 Oct 2024 15:26:23 +0300 Subject: [PATCH 3/3] ad7124: Change SPI mode and SPI target clk --- projects/ad7124_asdz/de10nano/system_qsys.tcl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/ad7124_asdz/de10nano/system_qsys.tcl b/projects/ad7124_asdz/de10nano/system_qsys.tcl index 599c2208c6..28d1ea4401 100755 --- a/projects/ad7124_asdz/de10nano/system_qsys.tcl +++ b/projects/ad7124_asdz/de10nano/system_qsys.tcl @@ -11,8 +11,9 @@ set_instance_parameter_value sys_gpio_in {edgeType} {FALLING} set_instance_parameter_value sys_gpio_in {generateIRQ} {true} set_instance_parameter_value sys_gpio_in {irqType} {EDGE} -set_instance_parameter_value sys_spi {clockPolarity} {0} -set_instance_parameter_value sys_spi {targetClockRate} {20000000.0} +set_instance_parameter_value sys_spi {targetClockRate} {5000000.0} +set_instance_parameter_value sys_spi {clockPhase} {1} +set_instance_parameter_value sys_spi {clockPolarity} {1} #system ID set_instance_parameter_value axi_sysid_0 {ROM_ADDR_BITS} {9}