USB CDC speed with Freescale USB Stack

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USB CDC speed with Freescale USB Stack

ソリューションへジャンプ
2,071件の閲覧回数
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 解決策
873件の閲覧回数
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 返答(返信)
874件の閲覧回数
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


873件の閲覧回数
anguel
Contributor V

Junjie,

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

Regards,

Anguel

0 件の賞賛