cancel
Showing results for 
Search instead for 
Did you mean: 

USB-CDC VCP performance on STM32F4x device uisng HS mode

lowpowermcu
Associate II
Posted on January 25, 2014 at 23:56

Hi all,

I am using the Virtual COM port example provided by ST and I want to measure the performance according to:

 1. Polling interval for transmitting data: CDC_IN_FRAME_INTERVAL

 2. Buffer size allocated for received data over UART: APP_RX_DATA_SIZE

Do you know how to set these two parameters ''CDC_IN_FRAME_INTERVAL''

and ''APP_RX_DATA_SIZE'' to have the best performance?

How can I measure the speed of transfering a file of 1MByte for example?

Is the USB transfer speed limited by the baudrate used in UART?

#usb-cdc-vcp
1 REPLY 1
chen
Associate II
Posted on January 27, 2014 at 18:30

Hi

'' 1. Polling interval for transmitting data: CDC_IN_FRAME_INTERVAL

2. Buffer size allocated for received data over UART: APP_RX_DATA_SIZE''

This is in usbd_conf.h

''How can I measure the speed of transfering a file of 1MByte for example?''

On the host, log the time at the start of send, send 1Mbyte of data over the VCP port,

log the time when all data is sent.

Subtract end time from start time.

''Is the USB transfer speed limited by the baudrate used in UART?''

I do not know. I think it is down to the implementation of the VCP

The speed of the link/target is dependant on how that target implements the driver layer - how fast the buffer is emptied.