the first word of the first time transfer is uncertain.
I set the EP2 as the auto in mode. I set the all FIFOPINPOLARs as active high, and the FIFOPINPOLARs pins are pulldown with a resistor. I carefully checked the source code that generates SLWR signal. I'm sure it doesn't generate extra active SLWR signal.
Even I reset the fifo at the beginning of transfer, the first word is till uncertain. I don't know why it is .
So I Think if I can reset the fifo pointer the problem might be solved. So dose anybody knows how to reset the fifo pointer?
I'm sre write 0x82 Tto FIFORESET can't reset the pointer of EP2FIFO.
I have a test: I write 16 data into the auto in FIFO2, then i redownload the firmware so that the TD_init can reset the FIFO.
However from then on, the first 16 data in each packet are the 16 data in last packet.
so i'm sure that the FIFORESET can't reset the FIFO pointer
You can refer associated project available with application note AN61345 http://www.cypress.com/?rID=43046, in this project EP6 is the IN endpoint. Instead of FIFORESET = 0x82; try FIFORESET = 0x02;