cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC-class host configuration of a STM32F407 receives data from a USB CDC-class device with other data interleaved.

KSing.21
Associate

I have an STM32F407 configured as a USB CDC-class host. The USB device is a WiFi module that works correctly as a USB CDC-class device. The code on the MCU was generated with CubeMX, complete with the Tx and Rx callback functions. sending commands to the WiFi module via the USB link works fine. However, receiving data from the WiFi module has a bunch of garbage data interleaved with the good data and in some instances it appears that the data from a previous transmission is received in the stream of the next transmission. For instance, an ACK from a previous command send to the module appears in the module's response for the next command. I checked that the Rx/Tx callback functions are OK and the Rx buffer is flushed properly. Appreciate if anyone who went through similar issues with USB CDC-class host implementations on a STM32Fxxx MCU could point me in the right direction to identify the root cause and fix.

0 REPLIES 0