cancel
Showing results for 
Search instead for 
Did you mean: 

FS usb on STM32F3

love-peace2001
Associate II
Posted on March 07, 2014 at 12:10

Hi,

I have implemented an CDC class on STM32F3 discovery board with the USB-FS library and it works fine.

I'm processing data all the time in a while loop that has a frequency of about 50 Khz.After processing i send my data by USB. USB connection (VCP 115kbps) was ok and not disturb my processing.

So i wanted to verify if i can send my data at 50 Khz. For that purpose, i took a variable that i increment each time and then sent by USB.

In the PC side, i store my received data into a file. My problem is that some data are jumped, i tried two ways to resolve this issue:

1) I tried to reduce the loop frequency by adding some delay and when i get ~10 Khz, i can receive all my data but it want it at 50Khz.

2) I tried to increase the baud rate but with no success. Normally the USB 2.0 supposed to support the high frequency.

Do you have please any explanation to this?

Thanks in advance;

2 REPLIES 2
idealsim
Associate II
Posted on March 08, 2014 at 12:30

What's the reason you configure your connection at 115Kbps (i suppose pc side) ? if i understand correctly, if you use a vpc com, the pc (windows or linux) configure automatiquely the baud rate ?

love-peace2001
Associate II
Posted on March 08, 2014 at 20:16

I want to send the float data, this is done in a loop saying that has 40Khz. So to send a float data, 40bits (start, stop, parity,.. of each byte) at 40Khz it makes 1600Kbps.

If i increase to higher rates, i noticed that doesn't change anything because in the PC side the rate is limited.