cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC HOST (VCP) problme

hyuk.1
Associate II

I found an error using stm32f429 USB CDC HOST function.

Both USB HOST/DEVICE are using stm32f429.

I found that when I send data from HOST, sometimes the DEVICE doesn't receive the data.

(DEVICE was confirmed to operate normally between usb device and Windows 10)

I made the attached test program and debugged it to find the problem.

The host transmits data every 100ms and displays the transmitted and received data through UART.(nucleo 429 evk)

The device transmits the received data to the host as is, and transmits the transmitted and received data to the uart.(discover429 evk)

Looking at the debug message below, the message 'Send test message ABCD => 9181' was sent normally from the host.

However, the device side received a message with lenght being 0.

In this case, it occurs over several minutes or tens of minutes depending on the situation.

It appears to be a problem on the host side, but I cannot tell for sure.

Is there any solution for this problem?

 

<host debug message>

[00919640] Host Tx: 30 : Send test message ABCD => 9180

[00919644] Host Rx: 30 : Send test message ABCD => 9180

[00919740] Host Tx: 30 : Send test message ABCD => 9181 <- data transmit ok. not error

[00919744] Host Rx: 0 :

[00919840] Host Tx: 30 : Send test message ABCD => 9182

 

<device debug message>

[00919538] Dev Tx: 30 : Send test message ABCD => 9179

[00919637] Dev Rx: 30 : Send test message ABCD => 9180

[00919638] Dev Tx: 30 : Send test message ABCD => 9180

[00919737] Dev Rx: 0 : <- receive data size 0..          => data length 0        

[00919738] ErrCnt : 1

[00919738] Dev Tx: 0 :

[00919838] Dev Rx: 30 : Send test message ABCD => 9182

[00919838] ErrCnt : 1

[00919839] Dev Tx: 30 : Send test message ABCD => 9182

[00919938] Dev Rx: 30 : Send test message ABCD => 9183

2 REPLIES 2
FBL
ST Employee

Hello @hyuk.1 

 

Would you proceed by elimination to check if the issue persists. Simplify your software setup without FreeRTOS to isolate the problem and make it easier to reproduce. 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!
hyuk.1
Associate II

I also tested with BAREMETAL.

but The problem occurs the same.