FX3 - DMA Override mode and ZLP | Cypress Semiconductor
FX3 - DMA Override mode and ZLP
Testing communication between a WinUSB Host Application and the FX3, I am confronted to max packet length and zero length packet handling.
On the host application, I need to check is the buffer i am sending is multiple of the max packet length and send an empty buffer to the API to generate a ZLP.
On the FX3, I have tested the DMA Manual channel. I am now trying to transfer data in override mode. My buffer size is a multiple of the max packet size. Multiple transaction occurs to transfer the buffer. I am missing the ZLP at the end to complete the transfer. I have tried to set the CY_U3P_DMA_BUFFER_EOP flag but I don't have the ZLP. My WinUSB application hangs and my USB analyzer has a hard time grouping the transaction into correct transfer due to the missing ZLP.
I believe that I could do another CyU3PDmaChannelSetupSendBuffer call with a zero length buffer. However I wish not to wait for the completion of the first call in order to send the ZLP as I handle completion asynchronously with the DMA callback.
A good understanding of DMA constrain will allow me to design a suitable spec. Making my max buffer size more than an exact multiple of the max packet size could help avoid ZLP.