I am trying to transfer large files(larger than 1MB) with fx2lp. Actually, I just followed AN61345(Implementing an FX2LP™-FPGA Interface). It worked well on EZ-USB console, 512 bytes send to ep2, 512 bytes back to ep6.
Then I made a app with VC6. Divide the large file to 512 bytes packets, and transfer them via Xferdata() fuction. The code is
When the files are small(<20kB), it works well. Every step ep6 become empty when the data is read by host.
If the file is larger, as the process continus, ep6 will not be empty sometime and all the followed data is error code(always CD).
I am using cy3684_kit_15, hope someone help me to find the reason or give some advice.
Thanks for your reply. Besides, what's a CATC? An instrument or some kind of software?
I just made a simple test:
press any key...
The BulkIn XferData immediately failed. I think there are two possible reasons: (a)EP6 stalled; (b)EP6 do not have enough data. Is it right?
Then after the test above, I just do
again. And it returns 1, the empty flag also changed.
So, can I say EP6 works well, the XferData() goes wrong?
I am try to start two new threads for BulkIn, one failed, start another, hope it worked.