ZLP / PKTEND problem | Cypress Semiconductor
ZLP / PKTEND problem
I have a FPGA streaming data into a FX3 GPIF in 8-bit mode. I'm using a single 32K DMA buffer which fills and transfers the data via USB to my application which has constantly has 32 x 128K reads queued. This works great while data is streamed from the FPGA. However, trouble begins when there's a pause in the data. After detecting a timeout (>5ms) the FPGA pulses PKTEND, waits 125us before checking if the stream has resumed.
When the stream does resume, each of the queued 32 x 128K reads succeed but then fail when they're re-queued. The FLAGA line goes low to indicate PC not ready and the only way to get out of this is to reset the FX3. If I keep everything the same but don't pulse PKTEND on a timeout then there is no problem (the PC isn't able to read the data queued prior to the timeout though).
Any ideas what's happening here ?