- The DMA channel that you have mentioned is for transferring data from the SPI to the USB socket.
- In order to transfer data from the FX3 CPU to the USB socket, you need to define additional DMA Channel with the DMA type as MANUAL. Alternatively, you can use the existing SPI-USB channel to pause temporarily and send data from the FX3 CPU. Please refer to How to send debug data out an existing dma channel for more details.
I'm not trying to transmit data from the FX3 CPU to the USB socket. I'm trying to "Transact" data like is typically done in SPI. I need to send a specific data packet (21 words) over SPI via DMA (FX3 CPU to SPI) while simultaneously sending what I'm receiving during the same SPI transaction to the PC (SPI to USB). I have not been able to find an example where this is done.
- Create a MANUAL DMA channel between FX3 CPU Producer and SPI Consumer to transfer data from the CPU to the SPI interface.
- For the transfer of data from SPI interface to USB, create an AUTO DMA channel between SPI Producer and USB Consumer.
That's pretty much what I've already implemented, but for some reason I don't see any data get transmitted in either direction. I also don't see any errors when debugging for some reason. Would you be able to take a look at this repository to check whether my implementation is correct?
Can you please try both the transactions one by one to make debugging easier. First create only one DMA Auto channel from SPI block to USB and then try to receive data in the control center, move to next step once it is done.
Thanks & Regards
I was able to successfully implement the SPI transfers using the method you described. For anyone looking for an example of the implementation, the code is available here. Of particular interest are the AdiBurstStreamStart() and AdiDataStream_Entry() functions.