AnsweredAssumed Answered

SMT32F4 USB DCD VCP - how to increase transfer speed

Question asked by klimavicius.laur.001 on Jun 26, 2013
Latest reply on Jun 28, 2013 by Chinzei.Tsuneo
Hello,

After some searching I was unable to find any information regarding how to increase STM USB device transfer speed running in FS CDC VCP, bulk transfer mode. In lot of posts I found about possibility to use either dual buffering or send multiple packets per frame. Question is howto do this or it should be done without any changes just using standard STM USB library?

At the current situation only changes made in my code is that VCP_DataTX() function is filling buffer with array of char until null character or buffer is filled, then returning amounts left in array which were not printed to buffer(0=all array was copied to buffer). VCP_DataTX() is used by printing function which only gives array to VCP_DataTX() and if not all data was copied to buffer, then waits for 3ms and tries to fill rest data to buffer, and keeps doing that until all array is copied.
So using this method I print to buffer multiple arrays which would overflow buffer (total size ~5.5KB of data, VCP_DataTX() handles 2KB buffer), so buffer given to DCD_EP_Tx()is almost always full. But in the end I get only about 1.3KBps speed, according to USB specifications it should be theoretically up to like 1.4MBps, and in practice it might be able to reach 1-1.2MBps.

So any ideas hints or directions where and what to do to increase that transfer speed?

than you in advance for any helpful answers.
Laurynas.

Outcomes