These days I'm using the GPIF to read data from the external.
I set the GPIFTCB3:0 to be 8K, at the DP I use the TCxpire=1 as the condition that shift to the idle state. And at the DP the GPIF re-execute the control task---sample the databus.
To avoid the uncertain initial value, I set the EPxGPIFPFSTOP to "0". I deliberately to avoid the GPIF Flag Stop.
However, the GPIF only read 2K word(4KB) and refuse to read more(unless retrigger the GPIF), and the GPIFTRIG's bit 7 is 1.
In the FX2 TechRefManual.pdf's page 10-42 line 9, it says "if the flag is asserted, the GPIF pause until the over/underflow threat is removed, then it automatially resumes"
But the fact is "it stops never resume", so can somebodyu tell me why it could be so?
I did the forward experiment today. I found that at a DP if the shift condition is TCXpire==1 the GPIF would not stop even when the FIFO is full of data.
i did the experiment as below:
when the GPIF is at the DP, sampling data from an external FIFO to internal FIFO, I congigure the GPIF output a low level, and at any other time it output a high level. When I set the GPIFTCB3:0=16*256, I fopund the low level duration is about 80us. and wheen the GPIFTCB3:0=8*256, the low level duration is about 40us.
And the calculation time for 8*256 IFCLK is 8*256*1000/48/1000=42.6666us.so I think the GPIF would't stop when the internal FIFO is full.
so the words in In the FX2 TechRefManual.pdf's page 10-42 line 9, who says "if the flag is asserted, the GPIF pause until the over/underflow threat is removed, then it automatially resumes" It is a mistake,isn't it?
As the TRM says it is possible to transfer more than 4k bytes by triggering GPIF once. It will pause if the IN enpoint is full, and then resume as and when it becomes free. Please refer http://www.cypress.com/?rID=45850 (you can refer Master firmware for Auto mode example in the app note). You need to change the GPIFTC value in the firmware and make it trigger only once by changing the condition for that. I tested it at my end and it works fine.