cancel
Showing results for 
Search instead for 
Did you mean: 

low transfer rate when using USB MSD device based on STM Cube

bnp979
Associate III
Posted on October 19, 2015 at 10:10

Hi,

I am using the STM Cube framework to implement a USB Mass storage device supporting high speed USB for my STM32L151 device. When transferring files from the device to a Windows 8 laptop, I consistently see a transfer rate of 64 KB/sec. Upon using a USB sniffer, I see that the associated bulk enpoint is being sent a request for reading 64 bytes of data (maximum supported read size with HS USB) and it takes 1 millisec to complete the request. This explains the 64 KBps transfer rate I am seeing.

My question is can I expect to get transfer rates higher than this?

Is the 1 millisec response time reasonable assuming that the device has this read data ready and is merely copying it from in memory buffers?

Thanks

Ben

1 REPLY 1
qwer.asdf
Senior
Posted on October 19, 2015 at 13:57

STM32L151 doesn't have USB HS (High Speed), it supports only USB FS (Full Speed) in device mode, supposedly you should be able to get 12 Mbit/s speed, that is 1.4 MByte/s.

Check your clocks. You should use HSE through the PLL for USB to work correctly and have valid 48MHz on USB clock. Also, as the reference manual notes, ''APB1 clock must

 

have a minimum frequency of 10 MHz to avoid data overrun/underrun problems.''.