This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:eval:user-guides:ad7616-sdz [28 Aug 2019 09:28] – Fixed HDL Download link Stanca-Florina Pop | resources:eval:user-guides:ad7616-sdz [26 Jan 2024 11:55] (current) – Fix SDP-K1 intro sentence Esteban Blanc | ||
---|---|---|---|
Line 21: | Line 21: | ||
* [[adi> | * [[adi> | ||
- | ==== Supported | + | ==== Supported |
* [[xilinx> | * [[xilinx> | ||
- | * [[http://www.xilinx.com/products/ | + | * [[xilinx>products/ |
+ | * [[adi> | ||
==== Other required hardware ==== | ==== Other required hardware ==== | ||
- | * [[http:// | + | * [[adi>en/ |
+ | * [[https:// | ||
+ | |||
+ | ===== Zedboard setup ===== | ||
+ | |||
+ | ==== EVAL-AD7616 Jumper setup ==== | ||
+ | |||
+ | ^ Jumper/ | ||
+ | | SL1 | Unmounted | Channel Sequencer Enable | | ||
+ | | SL2 | Unmounted | RC Enable Input | | ||
+ | | SL3 | Mounted | ||
+ | | SL4 | Unmounted | Oversampling Ratio Selection OS2 | | ||
+ | | SL5 | Mounted | ||
+ | | SL6 | Unmounted | Oversampling Ratio Selection OS1 | | ||
+ | | SL7 | Unmounted | Oversampling Ratio Selection OS0 | | ||
+ | | LK40 | A | Onboard 5v0 power supply selected | | ||
+ | | LK41 | A | Onboard 3v3 power supply selected | | ||
+ | |||
+ | ==== Block Diagrams ==== | ||
+ | * AD7616_SDZ using the **SERIAL** interface | ||
+ | {{: | ||
+ | * AD7616_SDZ using the **PARALLEL** interface | ||
+ | {{: | ||
==== Required software ==== | ==== Required software ==== | ||
Line 31: | Line 54: | ||
* An UART terminal (Tera Term/ | * An UART terminal (Tera Term/ | ||
- | ===== Using the HDL reference design | + | ==== Using the HDL reference design ==== |
In the [[: | In the [[: | ||
Line 38: | Line 61: | ||
The data path of the HDL design is simple as follows: | The data path of the HDL design is simple as follows: | ||
- | * the serial or parallel interface is controlled by the axi_ad7616 IP core | + | * the parallel interface is controlled by the axi_ad7616 IP core |
+ | * the serial interface is controlled by the SPI Engine Framework | ||
* data is written into memory by a DMA (axi_dmac core) | * data is written into memory by a DMA (axi_dmac core) | ||
* all the control pins of the device are driven by GPIO's | * all the control pins of the device are driven by GPIO's | ||
Line 48: | Line 72: | ||
- Build the project (see https:// | - Build the project (see https:// | ||
- | ==== Switching between interface types ==== | + | === Switching between interface types === |
- | Before power-up | + | Before |
- | 1) In case of the **SERIAL** interface: | + | In case of the **SERIAL** interface: |
- | * open //**system_project.tcl**// and set: | + | <code c> |
+ | $ make SER_PAR_N=1 | ||
+ | </code> | ||
+ | |||
+ | In case of the **PARALLEL** interface: | ||
<code c> | <code c> | ||
- | set ad7616_if | + | $ make SER_PAR_N=0 |
</ | </ | ||
- | * Short the **SL5** on the board. (It is on the front side of the board, near of the device) | + | <note important> |
- | | + | |
- | 2) In case of the **PARALLEL** interface: | + | === CPU/Memory interconnects addresses === |
+ | |||
+ | ^ Instance | ||
+ | |axi_ad7616_dma | ||
+ | |ad7616_pwm_gen | ||
+ | |spi_ad7616_axi_regmap | 0x44a00000 | | ||
+ | |axi_ad7616 | ||
+ | |||
+ | Note: | ||
+ | * spi_ad7616 is instantiated only for SER_PAR_N=1 | ||
+ | * axi_ad7616 is instantiated only for SER_PAR_N=0 | ||
+ | |||
+ | === PL Interrupts === | ||
+ | |||
+ | ^ Instance | ||
+ | | --- | 0 | 89 | | ||
+ | | --- | 1 | 90 | | ||
+ | | --- | ||
+ | | --- | 3 | 92 | | ||
+ | | --- | 4 | 93 | | ||
+ | | --- | 5 | 94 | | ||
+ | | --- | 6 | 95 | | ||
+ | | --- | 7 | 96 | | ||
+ | | --- | 8 | 104 | | ||
+ | | --- | 9 | 105 | | ||
+ | | axi_ad7616 | ||
+ | | --- | 11 | 107 | | ||
+ | | spi_ad7616 | ||
+ | | axi_ad7616_dma | ||
+ | | --- | 14 | 110 | | ||
+ | | --- | 15 | 111 | | ||
+ | |||
+ | Note: | ||
+ | * spi_ad7616 is instantiated only for SER_PAR_N=1 | ||
+ | * axi_ad7616 is instantiated only for SER_PAR_N=0 | ||
+ | |||
+ | |||
+ | === GPIO signals === | ||
+ | |||
+ | Ps7 EMIO offset = 54 | ||
+ | |||
+ | ^ GPIO Signal | ||
+ | | adc_reset_n | ||
+ | | adc_hw_rngsel | ||
+ | | adc_os | ||
+ | | adc_seq_en | ||
+ | | adc_burst | ||
+ | | adc_chsel | ||
+ | | adc_crcen | ||
+ | |||
+ | ==== Create | ||
+ | |||
+ | To run the application the user has to create an **Empty Application Project** using Xilinx SDK, and have to copy all the [[https:// | ||
+ | |||
+ | ==== HDL Downloads ==== | ||
+ | <WRAP round download 50%> | ||
+ | * {{https:// | ||
+ | </ | ||
+ | |||
+ | ==== No-OS Downloads ==== | ||
+ | <WRAP round download 50%> | ||
+ | * {{https:// | ||
+ | </ | ||
+ | |||
+ | ===== SDP-K1 setup ===== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | [[adi> | ||
+ | <note warning> | ||
+ | |||
+ | ==== EVAL-AD7616 Jumper setup ==== | ||
+ | |||
+ | ^ Jumper/ | ||
+ | | SL1 | Unmounted | Channel Sequencer Enable | | ||
+ | | SL2 | Unmounted | RC Enable Input | | ||
+ | | SL3 | Unmounted | Selects 1 MISO mode | | ||
+ | | SL4 | Unmounted | Oversampling Ratio Selection OS2 | | ||
+ | | SL5 | Mounted | ||
+ | | SL6 | Unmounted | Oversampling Ratio Selection OS1 | | ||
+ | | SL7 | Unmounted | Oversampling Ratio Selection OS0 | | ||
+ | | LK40 | A | Onboard 5v0 power supply selected | | ||
+ | | LK41 | A | Onboard 3v3 power supply selected | | ||
+ | |||
+ | ==== Fly-wire connection ==== | ||
+ | | [[adi> | ||
+ | | SCLK | D13 | | ||
+ | | DB10/ | ||
+ | | DB12/SDOA | D12 | | ||
+ | | CS | D10 | | ||
+ | | CONVST | ||
+ | | RESET | D7 | | ||
+ | | BUSY | D6 | | ||
+ | |||
+ | ==== No-OS Downloads ==== | ||
+ | <WRAP round download 50%> | ||
+ | * {{https:// | ||
+ | </ | ||
+ | |||
+ | ==== No-OS project build ==== | ||
+ | To build the project, just run: | ||
<code c> | <code c> | ||
- | set ad7616_if 1 | + | $ make |
</ | </ | ||
- | * No hardware modification required for this interface mode. | + | To flash, run: |
+ | <code c> | ||
+ | $ make run | ||
+ | </ | ||
- | <note important> | + | The project provides an iio device over the serial interface. The baudrate used is 230400. You can use the [[resources: |
+ | |||
+ | For further details, refer to the [[resources: | ||
+ | |||
===== No-OS Driver Description ===== | ===== No-OS Driver Description ===== | ||
+ | |||
+ | Each setup have its own project but they there one common [[repo> | ||
==== Functions Declarations ==== | ==== Functions Declarations ==== | ||
Line 88: | Line 223: | ||
|<code c> | |<code c> | ||
|<code c> | |<code c> | ||
+ | |<code c> | ||
|<code c> | |<code c> | ||
+ | |<code c> | ||
+ | |<code c> | ||
+ | |<code c> | ||
+ | |<code c> | ||
==== Types Declarations ==== | ==== Types Declarations ==== | ||
|<code c> | |<code c> | ||
- | typedef | + | enum ad7616_mode |
- | AD7616_SW, | + | AD7616_SW, |
- | AD7616_HW, | + | AD7616_HW, |
- | } ad7616_mode; | + | }; |
- | typedef | + | enum ad7616_interface |
- | AD7616_SERIAL, | + | AD7616_SERIAL, |
- | AD7616_PARALLEL, | + | AD7616_PARALLEL, |
- | } ad7616_interface; | + | }; |
- | typedef | + | enum ad7616_ch |
- | AD7616_VA0, | + | AD7616_VA0, |
- | AD7616_VA1, | + | AD7616_VA1, |
- | AD7616_VA2, | + | AD7616_VA2, |
- | AD7616_VA3, | + | AD7616_VA3, |
- | AD7616_VA4, | + | AD7616_VA4, |
- | AD7616_VA5, | + | AD7616_VA5, |
- | AD7616_VA6, | + | AD7616_VA6, |
- | AD7616_VA7, | + | AD7616_VA7, |
- | AD7616_VB0, | + | AD7616_VA_VCC, |
- | AD7616_VB1, | + | AD7616_VA_ALDO, |
- | AD7616_VB2, | + | AD7616_VA_RESERVED1, |
- | AD7616_VB3, | + | AD7616_VA_SELF_TEST, |
- | AD7616_VB4, | + | AD7616_VA_RESERVED2, |
- | AD7616_VB5, | + | AD7616_VB0, |
- | AD7616_VB6, | + | AD7616_VB1, |
- | AD7616_VB7, | + | AD7616_VB2, |
- | } ad7616_ch; | + | AD7616_VB3, |
+ | AD7616_VB4, | ||
+ | AD7616_VB5, | ||
+ | AD7616_VB6, | ||
+ | AD7616_VB7, | ||
+ | AD7616_VB_VCC, | ||
+ | AD7616_VB_ALDO, | ||
+ | AD7616_VB_RESERVED1, | ||
+ | AD7616_VB_SELF_TEST, | ||
+ | AD7616_VB_RESERVED2, | ||
+ | }; | ||
- | typedef | + | enum ad7616_range |
- | AD7616_2V5 = 1, | + | AD7616_2V5 = 1, |
- | AD7616_5V | + | AD7616_5V |
- | AD7616_10V = 3, | + | AD7616_10V = 3, |
- | } ad7616_range; | + | }; |
- | typedef | + | enum ad7616_osr |
- | AD7616_OSR_0, | + | AD7616_OSR_0, |
- | AD7616_OSR_2, | + | AD7616_OSR_2, |
- | AD7616_OSR_4, | + | AD7616_OSR_4, |
- | AD7616_OSR_8, | + | AD7616_OSR_8, |
- | AD7616_OSR_16, | + | AD7616_OSR_16, |
- | AD7616_OSR_32, | + | AD7616_OSR_32, |
- | AD7616_OSR_64, | + | AD7616_OSR_64, |
- | AD7616_OSR_128, | + | AD7616_OSR_128, |
- | } ad7616_osr; | + | }; |
- | typedef | + | struct |
- | /* SPI */ | + | /* SPI */ |
- | | + | struct no_os_spi_desc *spi_desc; |
- | /* GPIO */ | + | struct spi_engine_offload_init_param *offload_init_param; |
- | | + | uint32_t reg_access_speed; |
- | int8_t | + | uint8_t crc; |
- | | + | /* GPIO */ |
- | | + | struct no_os_gpio_desc *gpio_hw_rngsel0; |
- | | + | struct no_os_gpio_desc *gpio_hw_rngsel1; |
- | | + | struct no_os_gpio_desc *gpio_reset; |
- | | + | struct no_os_gpio_desc *gpio_os0; |
- | /* Device Settings */ | + | struct no_os_gpio_desc *gpio_os1; |
- | ad7616_interface | + | struct no_os_gpio_desc *gpio_os2; |
- | ad7616_mode | + | struct no_os_gpio_desc *gpio_convst; |
- | ad7616_range | + | struct no_os_gpio_desc *gpio_busy; |
- | ad7616_range | + | /* AXI Core */ |
- | ad7616_osr | + | uint32_t core_baseaddr; |
- | | + | /* Device Settings */ |
- | } ad7616_dev; | + | enum ad7616_interface interface; |
+ | enum ad7616_mode mode; | ||
+ | enum ad7616_range va[8]; | ||
+ | enum ad7616_range vb[8]; | ||
+ | enum ad7616_osr osr; | ||
+ | void (*dcache_invalidate_range)(uint32_t address, uint32_t bytes_count); | ||
+ | /* Sequencer and burst mode */ | ||
+ | uint8_t layers_nb; | ||
+ | }; | ||
- | typedef | + | struct |
- | /* SPI */ | + | /* SPI */ |
- | | + | struct no_os_spi_init_param *spi_param; |
- | | + | struct spi_engine_offload_init_param *offload_init_param; |
- | | + | uint32_t reg_access_speed; |
- | | + | uint8_t crc; |
- | /* GPIO */ | + | /* GPIO */ |
- | | + | struct no_os_gpio_init_param *gpio_hw_rngsel0_param; |
- | | + | struct no_os_gpio_init_param *gpio_hw_rngsel1_param; |
- | | + | struct no_os_gpio_init_param *gpio_reset_param; |
- | | + | struct no_os_gpio_init_param *gpio_os0_param; |
- | | + | struct no_os_gpio_init_param *gpio_os1_param; |
- | | + | struct no_os_gpio_init_param *gpio_os2_param; |
- | | + | struct no_os_gpio_init_param *gpio_convst_param; |
- | | + | struct no_os_gpio_init_param *gpio_busy_param; |
- | /* Device Settings */ | + | /* Core */ |
- | ad7616_mode | + | uint32_t core_baseaddr; |
- | ad7616_range | + | /* Device Settings */ |
- | ad7616_range | + | enum ad7616_mode mode; |
- | ad7616_osr | + | enum ad7616_range va[8]; |
- | } ad7616_init_param; | + | enum ad7616_range vb[8]; |
- | </ | + | enum ad7616_osr osr; |
+ | void (*dcache_invalidate_range)(uint32_t address, uint32_t bytes_count); | ||
+ | }; | ||
- | ===== Create the SDK Project ===== | + | struct ad7616_conversion_result { |
+ | uint16_t channel_a; | ||
+ | uint16_t channel_b; | ||
+ | }; | ||
- | To run the application the user has to create a**Empty Application Project** using Xilinx SDK, and have to copy all the [[https:// | + | struct ad7616_sequencer_layer { |
+ | enum ad7616_ch ch_a; | ||
+ | enum ad7616_ch ch_b; | ||
+ | }; | ||
+ | </code>| | ||
+ | ===== No-OS IIO Driver Description ===== | ||
+ | ==== Functions Declarations ==== | ||
+ | ^ Function | ||
+ | |<code c>int ad7616_iio_init(struct ad7616_iio_dev **dev, struct ad7616_init_param *init_param);</ | ||
+ | |<code c>int ad7616_iio_remove(struct ad7616_iio_dev *dev);</ | ||
- | ===== HDL Downloads ===== | + | ==== Types Declarations |
- | <WRAP round download 50%> | + | <code c> |
- | | + | struct ad7616_iio_dev |
- | </ | + | struct ad7616_dev *ad7616_dev; |
- | + | struct iio_device *iio_dev; | |
- | ===== No-OS Downloads ===== | + | }; |
- | <WRAP round download 50%> | + | </code> |
- | * {{https:// | + | |
- | </WRAP> | + | |
===== Support ===== | ===== Support ===== | ||
Line 201: | Line 371: | ||
<WRAP round help 80%> | <WRAP round help 80%> | ||
**Questions? | **Questions? | ||
- | * [[https://ez.analog.com/ | + | * [[ez>community/ |
- | * [[https://ez.analog.com/ | + | * [[ez>community/ |
</ | </ |