Hi,
I'm trying slave fifo example and meeting the following problem:
1. I use 'slfifosync' SDK example;
2. On Slave fifo side, I use 'pktend' signal to write short packets continually. Each packet has 17 words (68 bytes).
3. I add a breakpoint on CyFxSlFifoPtoUDmaCallback(...) function
4. If I set 'bytes to transfer' on USB Control Center as 1024, all things are nice.
5. Now I set "bytes to transfer" as 2048;
I think that when I click 'Bulk transfer in' button each time, the callback function CyFxSlFifoPtoUDmaCallback(...) will be called once because one buffer is released by consumer(U port). Although I set 'bytes to transfer' as 2048, only 68 bytes will be transfered because I use pktend# signal to send short packet.
But each time I click 'Bulk transfer in' button, the callback function is called more than one time sometimes. Sometimes it is called once, somtimes twice, sometimes three times, and sometimes more times. There is no law. The data received is not correct when the callback is called more than once.
Best, regard.
|