USB CDC speed with Freescale USB Stack

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

USB CDC speed with Freescale USB Stack

跳至解决方案
2,083 次查看
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 解答
885 次查看
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


在原帖中查看解决方案

2 回复数
886 次查看
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


885 次查看
anguel
Contributor V

Junjie,

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

Regards,

Anguel

0 项奖励