cy3686fw question: GPIFTCB settings

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Could someone help with the GPIFTCB setting found in the CY3686 firmware?  I am new to cypress programming and studying the CY3686FW for use with CY7C68033.  I found that, in inand.c's nReadPages() and nWritePages(), GPIFTCB is set to 511 (cNAND_DSIZE), instead of using the sector size which is 512.  I wonder why it is so.

   

I have enclosed the inand.c and inand.h files from the CY3686FW.  cNAND_DSIZE is defined at line 414 of inand.h

   

Thanks in advance.

0 Likes
4 Replies
Anonymous
Not applicable

If you look at the GPIF waveform, it transfers a byte and only then it goes to a state which checks TCxpire, this is the reason GPIFTCB is loaded with a value 1 less than the actual transaction count.

   

You can find the GPIF waveform in the file gpif30.gpf that comes as part of the project. If you're looking at NX2LP-Flex firmware you should find http://www.cypress.com/?rID=43431 useful.

   

Regards,

   

Anand

0 Likes
Anonymous
Not applicable

Thanks.  Does it mean if (1) is written to the count, 2 bytes will actually be read/written? It seems different from the description given in the USB TRM, e.g. from page 154-155 (figure 10-33 and figure 10-34) of the ezusb_trm (verD), an example is given for FIFO read transaction: to read a packet of HSPKTSIZE (512), 512 is written to GPIFTCB via the function call Peripheral_SetGPIFTC().  Also on figure 10-48, 10-49, 10-50, for FIFO write operation, 512 is used, not 511.  I wonder if the ezusb_trm is wrong?

   
0 Likes
Anonymous
Not applicable

No. The TRM is right.

   

It depends on the GPIF waveform, here we are starting to check and decrement only after transferring a byte so the GPIFTCB comes into picture only after we've transferred 1 byte hence the value 511.

   

Regards,

   

Anand

0 Likes
Anonymous
Not applicable


Thanks for reply.  Probably I need to reread the GPIF waveform editor manual to understand the waveform first...
 

0 Likes