How to add the partial flag in synchronous Slave FIFO mode?

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

cross mob
Anonymous
Not applicable

 Hi 

   

I read the datasheet of AN65974.pdf. In the SynchronousSlave FIFO Write Sequence, there are 3cycle latency from SLWR#to FLAG, If i must use the partial flag in order to lose no data? How can I modify the code with GPIF designer?

   

thanks!

0 Likes
5 Replies
Anonymous
Not applicable

Hi,

   

You must set the watermark when you create and configure the socket. So setting of the watermark will be done through the FX3 code rather than GPIF II Designer.

   

Regards,

   

Anand

0 Likes
Anonymous
Not applicable

 Thanks for your help!  I modify the partial flag register and ues the API function, the partial flag is working well now! But the 32bit mode has some difference with the 16bit mode.When i set different value of water mark, the latency of partial flag is different.

0 Likes
Anonymous
Not applicable

Hi Assi,

   

About how to se the partial flag in SlaveFIFOSync application, I wonder if this API interface can do the job:

   

CyU3PGpifSocketConfigure(threadIndex, socketnum, watermark, flagonData, burst)? Like's say I want to set PTOU thread as partial full with watermark = 3, transfer 16 bytes, I will call

   

CyU3PGpifSocketConfigure(0x00, CY_FX_PRODUCER_PPORT_SOCKET, 0x03, true, 8); 

   

Is it right?   Thank you!

0 Likes
Anonymous
Not applicable

 This is what mine looks like and it's working well for me 

   

apiRetStatus = CyU3PGpifSocketConfigure(0, CY_FX_PRODUCER_PPORT_SOCKET, 4, CyFalse, 0);

   

I'm using the 32-bit GPIF configuration not 16 which is why I BELIEVE the latency is 4 and not 3 haven't heard anything back from Cypress on this.

0 Likes
Anonymous
Not applicable

The last parameter schould be zero if you want to update the flag after each word transferred. I solved the lantency problem by slowing down the data transfer if the partial flag is set (watermark 4) and wait after each word 4 cycles to monitor the normal full flag. It works perfectly.

0 Likes