LPC43xx - LPCUSBlib - MassStorageHost performance

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by AntonioL on Tue Mar 19 04:59:15 MST 2013
Hello to everybody

I am testing the performances of a LPC4357 (on a MCB4357 Keil dev board), USB port 0 HS as Mass Storage Host, using the LPCopen platform - LPCUSBlib dedicated example.

Does anybody know how much can I expect? I bet not the theoretical 480Mbit/s, but I'd like to know how far one can go.

At the moment I tried with different MSD flash disks and choose the fastest, then I tried to tune the buffer size (in MassStorageHost.c, static uint8_t buffer[8*1024];) also increasing its size (placing  it to the second portion of the ram through an explicit __attribute__((at(0x20000000))) ).

I discovered that to read a 10MBytes file from the MSD, it takes about 1010ms with 8kB buffer, it increases significantly if I lower the size (2094ms with 2kB buffer), while rising it to 16-32 or even 64 kB doesn't improve very much (at minimun I get 994ms).. i.e I get approx 70-80Mbit/s rate at most.

Is it normal/the maximum I can achieve?

I have a look also at the LPCUSBlib and found in the LPCUSBlibConfig.h the USBRAM_BUFFER_SIZE define (default 4kB), but cannot increase it otherwise the linker won't find enough space.. is it related to the bandwidth limitation I am experiencing or is there something else to optimize?

Thank you in advance,