cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC packet sending rate problem based on STM32F103

Zhonghao Huang
Associate II
Posted on May 10, 2018 at 09:45

I used STM Cube to generate the USB CDC as a virtual serial port code, and then the test found that only a maximum of one thousand data packets can be sent to the PC every second. Is this fixed? Or is there any way to increase the data packet sending rate? Thank you~

My Cube configuration and the Keil project see Annex.

#cdc #usb #stm32f103
5 REPLIES 5
Kanz Kurahashi
Associate II
Posted on May 10, 2018 at 10:24

In my memory, I think that the transmission interval of the USB1.1 packet was 1ms at the shortest.

Kanz Kurahashi
Associate II
Posted on May 10, 2018 at 13:39

No, Your USB is working in USB1.1. Not USB2.0.  'Full Speed' means USB1.1.

Posted on May 10, 2018 at 12:21

Thanks for your reply. Is CDC based on USB1.1? I think it is run in USB 2.0 full-speed interface, and I also configure it in full speed mode in Cube.

Posted on May 11, 2018 at 12:12

Thank you for your reminder.

Posted on May 28, 2018 at 04:49

Sorry, i am come back. Recently, I tested my code again. I used stm32f103 to send data to the PC via USB CDC at a frequency of 4000Hz. And then I found that only 1000 packets can be received per second on Windows7, but it can normally receive 4000 packets per second on Ubuntu via CuteCOM. Do you have any advice? Thank you.

I use python to test, and the result is:

0690X0000060KvKQAU.png0690X0000060Kz1QAE.png