cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L151 Slow USB speed

srdjan
Associate II
Posted on November 27, 2014 at 15:12

Hello all,

I have a quick question regarding the USB FS speed on STm32L151.

I managed to modify the sample code for USB VCP and get the USB running. I'm streaming my data to the PC succesfully.

The question is following. In order to start streaming I call the Handle_USBAsynchXfer() function and then whenever the EP1_IN_Callback() gets called, I copy 64 bytes into the PMA buffer, and set the EP1 valid. This way I'm streaming around 250KBit/s. This is painfully slow, and I would like to increase this speed somehow. Is there any way I can achieve greater speeds over USB?

Several places say that you can transfer more than 1 packet per frame interval (1msec), but I cannot figure out how to do this. Any help is appreciated.

#usb #stm32l151 #stm32
1 REPLY 1
Posted on January 28, 2015 at 10:50

Hi Stokic,

How do you measure 250KBit/s ? Are you using a USB performance test tool?

Transfering more than 1 packet per frame interval depends on the host. As you may

know bulk transfers are scheduled only if there is unused bandwidth available on the bus.

With regards,

From: stokic.srdjan

Posted: Thursday, November 27, 2014 3:12 PM

Subject: STM32L151 Slow USB speed

Hello all,

I have a quick question regarding the USB FS speed on STm32L151.

I managed to modify the sample code for USB VCP and get the USB running. I'm streaming my data to the PC succesfully.

The question is following. In order to start streaming I call the Handle_USBAsynchXfer() function and then whenever the EP1_IN_Callback() gets called, I copy 64 bytes into the PMA buffer, and set the EP1 valid. This way I'm streaming around 250KBit/s. This is painfully slow, and I would like to increase this speed somehow. Is there any way I can achieve greater speeds over USB?

Several places say that you can transfer more than 1 packet per frame interval (1msec), but I cannot figure out how to do this. Any help is appreciated.