Hi, I already referred to this document. I configured FlagA as Thread_3_DMA_WaterMark, Initial value: high, Polarity: active low. In SlaveFifoSync example I added CyU3PGpifSocketConfigure(3, PPORT_SOCKET, 2, CyTrue, 0); Before I send anything to FX3, FlagA is low, when I received 8 bytes it goes high and stays high even if I read it from GPIF. Strange is that if I configure like this CyU3PGpifSocketConfigure(3, PPORT_SOCKET, 20, CyTrue, 0); FlagA also goes high, even if it gets only 8 bytes of data. If I configure FlagA as Thread_3_DMA_Ready it works, it goes high when I get something from PC and goes back low if I read it from GPIF. So how can I configure WaterMark to goes down when I read it from GPIF? Regards, Rok
I have another question about flag configuration. I am using Slave fifo example on FX3 and I have configured P to U dma transfer with 512 bytes FIFO, count =3, so together 1536 bytes of FIFO. I would like to configure FlagB to go high when buffers have 1280 bytes of data inside. If I set watermark value to 256 bytes Flag goes high when comes 256 bytes in first FIFO, not in third. Endpoint size is also 512 bytes.
How can I configure that?
Thanks for help.
You can directly configure the Dma buffer to the size of 1280bytes and then you can directly use a Flag (Thread_x_DMA_ready) to know whether it got the 1280bytes of data into the FX3. In this case your P-port socet will be producer and USB socket will be consumer socket. So that flag will be high as long as there is a space in that buffer and it will go Low as soon as 1280 bytes are written.
Please let me know if you need any more details from me on this regard.
If I would do this way, Flag will be set when the buffer is full. But I want to have partially full flag that goes high when 1280 bytes are inside buffer which full size is 1536 bytes.