cancel
Showing results for 
Search instead for 
Did you mean: 

usb host cdc enumeration problems

MMang.17
Associate

Hello,

i need to create a simple communication between a stm32f103 usb device and a stm32f407 usb host. I configured a simple program for led blink of stm32f103 and it works correctly. Practically i connect the usb device to my laptop with "PuTTY", i open the corrispectively com port and, if i digit '1', led blink to "on" and the device send "LedOn" as response whereas if i digit '0', led blink to "off" and the usb device send "LedOff" as response. Now i want to change the laptop with a mcu, specifically one stm32f407.

I used STM32CubeMX for create a template with usb host driver. I was able to make blink on a led if the device is connected and blink off it when the device is disconnected.

The "USBH_Process" function is halted in "HOST_ENUMERATION" Status because the function "USBH_HandleEnum(phost)" is never equals to "USBH_OK" and this occurs because inside it , in the "ENUM_IDLE" status, the function "USBH_Get_DevDesc(phost, 8U)" is never equals to "USBH_OK". I seen this with st-link v2 clone debugger. 

How can i do for fix this problem?

Best regards

Marco

1 REPLY 1
MMang.17
Associate

Hello, i solved! Enumaration failed because in stm32mxcube i used the wrong frequency!