|
I followed Anand's suggestion to change EP4 to EP8. So now the configuration is :
1. EP2, Auto Out, 512 bytes, bulk, triple buffered
2. EP4, not used.
3. EP6, Auto In, 512 bytes, bulk, triple buffered
4. EP8, Manual Out, 512 bytes, bulk, double buffered
I still encountered the problem for EP8. I have done the following two tests (the external FIFO master did not read the data from the FIFO as no program had been installed on FPGA side):
Case 1. Sent one packet from PC to FX2LP firmware, then from FX2LP firmware to FX2LP Slave FIFO (I think this is the normal case for Slave FIFO Manual Out)
(1)Initial status: (EP2468STAT & bmEP8EMPTY) was TRUE, (EP68FIFOFLGS & 0x20) was TRUE
(2)After receiving one packet from the PC host, (EP2468STAT & bmEP8EMPTY) became FALSE, (EP68FIFOFLGS & 0x20) was still TRUE.
(3)Then FX2LP firmware executed "EP8BCH=0x02;SYNCDELAY;EP8BCL=0x0;SYNCDELAY;", (EP2468STAT & bmEP8EMPTY) became TRUE, (EP68FIFOFLGS & 0x20) became FALSE.
The above behaviour was expected.
Case 2. Sent one packet from FX2LP to Slave FIFO without any involvement from the PC side (this is what I am trying to achieve here)
(1)Initial status: (EP2468STAT & bmEP8EMPTY) was TRUE, (EP68FIFOFLGS & 0x20) was TRUE
(2)FX2LP firmware executed "EP8BCH=0x02;SYNCDELAY;EP8BCL=0x0;SYNCDELAY;", (EP2468STAT & bmEP8EMPTY) was TRUE, (EP68FIFOFLGS & 0x20) was still TRUE which I actually expected "FALSE" instead. If EP8FIFO remains empty, I guess I will not be able to send data to FPGA via the Slave FIFO.
Is the above Case 2 possible?
|