AnsweredAssumed Answered

CDC class / Freescale USB stack stops working when trying to transmit large amount of data in full-duplex mode

Question asked by Gustavo Denardin on Dec 9, 2011
Latest reply on May 22, 2012 by Eli Hughes

Hi everyone,

 

We implement a terminal through a virtual com using the CDC class from the Freescale USB stack (3.1). Everything was working fine until we tried to transmit and receive data simultaneously. This happens when we use a "cat" command to print the content of a file in the terminal and buffers other commands like another cat or a "top" command to show the cpu load and memory informations. We note that when this happens the USB stack has received just one character (we think this is due the keyboard scan time, i.e., when the data input is from keyboard we always will receive a character at a time), but informs that there are 64 bytes in the endpoint. If we reduce the endpointer buffer to 16, the USB port registers informs that there are 16 bytes to be received.

 

This can be verified if we do a "cat" command of a large file and holds a key pressed in order to receive a lot of characters during the cat command. In this condition the USB port always stop to receive character at a certain time.

 

Has anyone faced the same problem? Are there some workaround to this problem?

 

We face the same problem in kinetis and coldfire microcontrollers. We are using the same code and USB stack in both microcontrollers. The code can be download here:

Coldfire:

http://brtos.googlecode.com/files/colduino_MCF51JE256_CW10.rar

Kinetis:

http://brtos.googlecode.com/files/BRTOS%201.66%20Kinetis%20-%20SD%20card%20-%20BMP%2024%20bit.rar

 

Thanks in advance,

Gustavo

Outcomes