2015-10-19 01:10 AM
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?ThanksBen2015-10-19 04:57 AM
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 musthave a minimum frequency of 10 MHz to avoid data overrun/underrun problems.''.