evkbimxrt1050_dev_composite_cdc_vcom_cdc_vcom_freertos USB high-speed too slow

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

evkbimxrt1050_dev_composite_cdc_vcom_cdc_vcom_freertos USB high-speed too slow

Jump to solution
1,036 Views
felix1
Contributor IV

Hi,

IMXRT1050-EVKB
SDK 2.13.0
MCUXpresso IDE v11.7.0

 

I want to use RT1050 USB high-speed, and take evkbimxrt1050_dev_composite_cdc_vcom_cdc_vcom_freertos for speed test.

I modify

composite.c, void USB_DeviceApplicationInit(void), 

g_composite.speed = USB_SPEED_FULL; to g_composite.speed = USB_SPEED_HIGH;

and virtual_com.h, 

#define LINE_CODING_DTERATE (115200) to #define LINE_CODING_DTERATE (921600)

I build a windows AP to write RT1050 EVK USB interface 1, endpoint 0x03 (bulk out), but I only got about 900KB/Sec, it seems too slow.

Do I modify the example to USB high-speed correctly?

 

 

Labels (1)
Tags (2)
0 Kudos
Reply
1 Solution
993 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @felix1 ,

You can try measure the time for communication by USB analyzer. 

In it, in a micro frame, 9 * 512 Byte is transferred.

so, the bandwidth is 9 * 512 Byte/(125us) = 36.8M Byte/S = 294.9Mbps

jingpan_0-1689318628719.png

 

You can use the code to send a 16KB buffer for test, and watch the result.

Typically, need to press a key from key board after measurement environment is set up, and then begin the transfer and measurement.

BTW, EHCI is high speed and KHCI is full or low speed.

 

Regards,

Jing

View solution in original post

0 Kudos
Reply
3 Replies
1,017 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @felix1 ,

The demo use high speed mode by default. Here is some suggestion.

No need at MCU side, baudrate is set by PC side tool.

Be noted, for USB CDC, the phisical cannel is USB port, not real UART port, the baudrate in fact does not represent the real bandwidth for communication. Even with baudrate set as 115200, I can acually get 294Mbps bandwidth like I state before.

Unless your application case is a USB-UART bridge, you need to pass the data you get from USB port to a real UART port, you in fact do not need to care much about the baudrate.

If you just use a CDC class to communicate with a PC, you in fact can ignore this parameter. USB always works at 480MHz fixed baudrate, not configurable.

 

Regards,

Jing

0 Kudos
Reply
1,003 Views
felix1
Contributor IV

Hi @jingpan ,

Can you show me how to get 294Mbps bandwidth with USB high-speed mode, I want to repeat your test to make sure this issue.

Thanks!

0 Kudos
Reply
994 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @felix1 ,

You can try measure the time for communication by USB analyzer. 

In it, in a micro frame, 9 * 512 Byte is transferred.

so, the bandwidth is 9 * 512 Byte/(125us) = 36.8M Byte/S = 294.9Mbps

jingpan_0-1689318628719.png

 

You can use the code to send a 16KB buffer for test, and watch the result.

Typically, need to press a key from key board after measurement environment is set up, and then begin the transfer and measurement.

BTW, EHCI is high speed and KHCI is full or low speed.

 

Regards,

Jing

0 Kudos
Reply