USB CDC speed with Freescale USB Stack

cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC speed with Freescale USB Stack

Jump to solution
1,762 Views
anguel
Contributor V

Hi!

I am currently experimenting with Freescale's stand-alone USB stack, especially with the Processor Expert USB Device CDC project.

I noticed that the project is not configured for optimal full-speed USB throughput, i.e. end-point max packet sizes are set to 16 only. Incrementing the bulk endpoint max packet sizes to 64 (this is probably the allowed maximum) seems to increase speed. But I am not sure to which sizes I should set EP 0 (control endpoint) and EP 3 (interrupt endpoint). I hope that experts here can give me some hints how to achieve optimal speed. Maybe there are also some other settings to tweak in the project that can increase USB device CDC transfer speeds?

Many thanks in advance,

Anguel

1 Solution
564 Views
TonyLiu
NXP Employee
NXP Employee

Increasing the max packet size do helps on the performance improvement, but it is not the key point.

Since in CDC, usually the data is transferred through BULK pipe, the CONTROL pipe and Interrupt pipe are used to control/configuration. It should not have impact on the performance.

The key point is to make the whole sequence pipe line and try best to keep the USB controller busy.

For example, if you want to send data to host, the sequence maybe looks like:

prepare data --> call USB API to send data --> wait for data transfer done --> prepare the next data --> send data

A better sequence looks like:

prepare data --> call USB API to send data --> prepare the next data when the previous transfer is not done yet --> transfer done and can call USB API to send data immediately


View solution in original post

2 Replies
565 Views
TonyLiu
NXP Employee
NXP Employee

Increasing the max packet size do helps on the performance improvement, but it is not the key point.

Since in CDC, usually the data is transferred through BULK pipe, the CONTROL pipe and Interrupt pipe are used to control/configuration. It should not have impact on the performance.

The key point is to make the whole sequence pipe line and try best to keep the USB controller busy.

For example, if you want to send data to host, the sequence maybe looks like:

prepare data --> call USB API to send data --> wait for data transfer done --> prepare the next data --> send data

A better sequence looks like:

prepare data --> call USB API to send data --> prepare the next data when the previous transfer is not done yet --> transfer done and can call USB API to send data immediately


564 Views
anguel
Contributor V

Junjie,

Thank you very much for the hints, I will try to consider these in the development process.

Regards,

Anguel

0 Kudos