cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ViennaAudio
Adventurer
Adventurer
502 Views
Registered: ‎07-01-2020

zynq 7020 : AD7616 on cortex

Hi

Would be possible to drive 3 AD7616 in spi mode using one of the cortex processors available? 

 

Thanks and kind regards

Tags (3)
0 Kudos
Reply
11 Replies
derekm_
Explorer
Explorer
479 Views
Registered: ‎01-16-2019

You have several options with the Zynq, so I would (tentatively) say yes:

1. The processing system has two standard SPI modules which run at 50 MHz.

2. The processing system also has two QSPI modules, which can be configured in legacy SPI mode. I think the max frequency is 100 MHz. I have not used the QSPI in legacy SPI mode though, so I am not comfortable saying it will work for you. (Hopefully someone else can verify that this will work.)

3. In the programmable logic, you can implement as many AXI SPI IP modules as you want (space-permitting!). I think you can also get to 50 MHz here, but its hard to say without simulating and/or testing your overall circuit.

For the AD7616, I believe you also need two extra signals for Conversion Start and Busy. You can use MIOs on the processing system side as GPIOs for this, or route the GPIOs to the programmable logic (as EMIOs) and use programmable logic pins.

You could also design your own HDL SPI blocks (verilog/VHDL) which include the Conversion Start and Busy signals along with the SPI signals. This is my favorite approach.

Note that for options 1 and 2 above, there are a limited number of processing system pins (54 total). So if you use 2x SPI and 1x QSPI + 6x GPIO pins you are using a lot, before you look at boot options (which might also be one of the QSPI blocks), ethernet, USB, other GPIO, etc. Also, you will have to check the Zynq TRM to see if your peripheral combinations in the processing system are allowed.

So my sense is that you can indeed achieve what you want, but it will take a bit more planning on your side to see what will work. My own approach would be to buy the AD7616 eval kit and a suitable cheap Zynq eval board and test everything out first.

ViennaAudio
Adventurer
Adventurer
428 Views
Registered: ‎07-01-2020

@derekm_ Thanks a lot for your answer,

I would add that my main goal would be to control the 3 AD7616 with the same (1) spi signal, as they could be considered in my setup as if they were one device,

(they have to read data at the same time)  and so i tought they could share the same spi signal. Could somebody confirm this approach might work?

This could lead to 1xSPI + 6xGPIO pins usage, and leave the SPI2 channel for our DAC. 

I'm trying to save programmable logic space for the main code of the application . I've seen that  writing the SPI blocks on Programmable logic would take too much space,

 

So, as first step if i could try to run  1 AD7616 on processor using vitis, right? 

I developed a AD7616 board which was upthumbed by AD, and using a QMtech zinq 7020 board, already on test configuration

 

You talk of peripheral combinations, could you help me check that in the 800 pages pdf?

 

Kind regards

0 Kudos
Reply
derekm_
Explorer
Explorer
394 Views
Registered: ‎01-16-2019

Ok, so first of all, the PS SPI blocks support three slaves in master mode, so they should work for your application (see below, and p560 Zynq TRM). However, I'm not sure what to take from the related answer record: https://www.xilinx.com/support/answers/58294.html. Does this mean you need to route SS1 and SS2 to EMIO? Probably not, but Xilinx will have to answer that for you.

master_mode_spi_3slaves.png

 

For MIO/peripheral connection, the section to read in the Zynq TRM is 2.5 "PS-PL MIO-EMIO Signals and Interfaces". Table 2.4 in particular is helpful. However, if the XC7Z020 board you have is the one on this page, then there doesn't seem to be much you can do with the MIO pins for test purposes. You might still be able to use the PS SPI blocks and route the signals via EMIO to the programmable logic headers. (This will not use any logic resources in the fabric, so the rest of your FPGA design will be fine.)

 

 

 

ViennaAudio
Adventurer
Adventurer
376 Views
Registered: ‎07-01-2020

@derekm_  Thanks a lot for your help Derek, i hope some xilinx expert could confirm or post any useful hint for this application

 

Kind regards

0 Kudos
Reply
venui
Moderator
Moderator
163 Views
Registered: ‎04-09-2019

Hi @ViennaAudio ,

If you would like to control 3 slave devices single master PS_SPI should be enabled with 3 slave select lines in standard case but if you want to control with only slave select its recommended to use daisy chain model to connect slaves. Please mind that either of the cases master can talk to only one slave device.

I think your question is about to control all the slaves by connecting to single slave select and transfer/receive same data from the slave devices is my understanding is correct?

 

Regards,

Venu

ViennaAudio
Adventurer
Adventurer
150 Views
Registered: ‎07-01-2020

Hi @venui 

I think your question is about to control all the slaves by connecting to single slave select and transfer/receive same data from the slave devices is my understanding is correct?

Yes. The 3 AD7616 will have to read at the same time, and will be in same configuration, so is possible to connect 1 slave to the master, (then the other two slaves would share the same control signals via hardware )  and receive the incoming data from all slaves? via spi or spi/gpio

Kind regards

0 Kudos
Reply
venui
Moderator
Moderator
147 Views
Registered: ‎04-09-2019

Hi @ViennaAudio if your intention is to use only 1 slave select and reading 3 at a time not possible why?

the clock and slave select going to slave devices are common but the output data from slave devices is different it`s impossible to read same time using SPI controller.

Regarding,

Venu

 

0 Kudos
Reply
ViennaAudio
Adventurer
Adventurer
139 Views
Registered: ‎07-01-2020

Hi @venui In fact my intention was to receive slave 1 via spi and receive the remaining slaves via gpio .

(I'm trying to read at the same time because cascading the readings would be many usec. but if there is no other way ..)

If this is not viable, how would you set that up?

Kind regards

0 Kudos
Reply
venui
Moderator
Moderator
133 Views
Registered: ‎04-09-2019

Hi @ViennaAudio If you have mechanism to sample/drive data on MOSI/MISO of slave using GPIO with respect to clock that is up to you.

Note: the above thing is not recommended or tested/proven from our side.

Regards,

Venu 

0 Kudos
Reply
ViennaAudio
Adventurer
Adventurer
130 Views
Registered: ‎07-01-2020

Hi @venui , so, what would be the setup you reccomend to interface with the 3 AD7616?

if is not possible to read at the same time is fine

Kind regards

0 Kudos
Reply
venui
Moderator
Moderator
118 Views
Registered: ‎04-09-2019

@ViennaAudio use single PS_SPI connected with 3 slave lines SS0/SS1/SS2, access each slave serially by selecting one slave at a time.

Regards,

Venu