DMA_RDY issue while interface is configured as Slave

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
geyec_1804386
Level 1
Level 1

Hi,

I have a simple application that FPGA(Master) keep sending data to FX3(Slave) @12.5Mhz.

Data could be seen by running  similar <gpiftousb> sample, all I need to do right now is to add CLK signal and change GPIF as slave for synchronization.

I modified the original GPIFII configuration as below:

pastedImage_2.png

  State machine configuration remains unchanged:

   pastedImage_3.png

And copied the new header file to original firmware project, nothing else changed.

Right now I can only read 16K data for 8 times: (Match with the 4 x 32K DMA buffers), then error will occur.

pastedImage_4.png

  By printing the state machine status from UART port,

  I could see it starts from 0(START), and jumps to 1(DMAWAIT), then to 2(READDATA), and back to 1(DMAWAIT), which seems reasonable,

  but the problem is it always stuck as 1(DMAWAIT) after this and will never go back to 2(READDATA), even after the PC has read out all the data from the buffer,

  Looks like the DMA_RDY_TH0 flag does not go high again as it supposed to.

  It's there anything else needed to be configured or any suggestions? Thanks in advance!

Best Regards,

Kevin

0 Likes
1 Reply
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

As per your state machine, there is no flow control mechanism between Master and Slave.

How does the master know that when to stop data transfer and when to start?

Please enable the debug prints in your firmware.

Note that you are not supposed to use Debug Prints in Callback functions.

Please refer AN65974 - https://www.cypress.com/documentation/application-notes/an65974-designing-ez-usb-fx3-slave-fifo-inte...​ for Slavefifo slave fifo application

0 Likes