in datasheet, EP6 must be 2048 bytes maximum.
If I want to use 1024 packet for EP6IN, I must use double buffering, not quad buffering.
because , there are only 2048 bytes for EP6.
Below is added code to above posting.
EP6CFG = 0xE0; // EP6IN, bulk, size 512, 4x buffered
#else//test 1024 size buffer
EP6CFG = 0xEA; // EP6IN, bulk, size 1024, 2x buffered
after test above, our board has 20MB/sec speed. previous speed is 16MBs.^^.
But someone on google presents their system has 30~40MBs with normal PC environment.
How can I get more speed like anyone ?
We reach 40MB/s with 25MHz IFCLK on sync Slave FIFO 16 bit bus width. We use 512 Byte endpoint with quad buffering. 1024 byte causes some problems on some host controllers. For high data rate you have to transfer large blocks in order to give the FX2 the opportunity to fille the microframes with packets. If you transfer every single 512 byte packet you can only get 4MB/s, with 1024 Byte transfers 8MB/s and so on. There are 8000 Microframes per second and one microframe can hold 10...11 full 512 byte packets. But only if all packets are in one request. The maximum we´ve seen is 40.5MB/s upload while several hundret kB/s download using winusb on Windows 7 x64.
Thanks your advise
Thanks your advise.
But in my experience, My board can't go beyond 20MBs.
Samsung SensR610 Notebook, KojnSha notebook, Dell Core i3 Desktop, entire.
Current testing environment,
- 1Mbyte upload each try. 1MB uploaded -> 2 sec rest -> 1MB uploaded -> 2sec rest....repeat.
- used GPIF flow state likely cypress example on AN66806.pdf.
- GPIF counter has set 0x00, 0x08, 00,00 as 500kB counting for 1MB data in 16 bit data bus.
- Host uses BeginDataXfer(), waitXfer(), FinishDataXfer() presented in example.
- by Logic analyzer, timing chart is
total 50 msec is required to upload 1MB.
MCU firstly prefetches 1024 counting as it's buffer size 2048. ->
some milisecond of rest ->
transfer about 200 usec ->
wait 200 usec.->
repeatdely run to complete 1MB.
- RDY pin tied to VCC for highest speed testing.
- uploaded data was verified by HHD software's USB monitor program.
I should more try to get about 40MBs.
But this is fixed for futher developement with your advice. Thanks !!!
- 512 fifo size, quad buffering.
I will try other parts to advance speed.
What is the IFCLK frequency?
Please use Screamer/Streamer from SuiteUSB to do throughput measurement and let us know the throughput value achieved so that we have a common frame of reference to discuss further.