cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H747 USB CDC device not detected

gv
Associate

I have an STM32H747I-DISCO board and try to connect it to a computer as a USB CDC device.

I use CubeMX to configure the USB (USB_OTG_FS in Device_Only mode, USB_DEVICE_M7 with CDC class, 48MHz clock for the USB peripheral) but when the generated program is executed, the computer does not detect any USB device (although the board detects the connection: the LD7 LED lights up).

I increased the heap size as suggested in the FAQ and tried various configurations (VBUS sensing enabled/disabled, self powered enabled/disabled), but none work.

Some old forum posts (for instance this one) suggest adding a call to HAL_PWREx_EnableUSBVoltageDetector at the end of the MX_USB_DEVICE_Init function, but it is now generated that way by CubeMX.

There seems to be a problem during the initialization process as neither USBD_CDC_Init nor CDC_Init_FS are called, but the program does not crash and the generated MX_USB_DEVICE_Init does not encounter any errors, so I couldn't determine when it goes wrong...

I used to work with an STM32L4R9I-EVAL board and everything worked well, so the problem doesn't come from the computer side (drivers, ...).

Is there anything else to configure to make the USB CDC work on this board, or is there some king of bug in the code generated by CubeMX or in the firmware?

Thanks

1 REPLY 1
DBaba.1
Associate II

I've come across the same issue but I'm not sure if there's actually a USB_FS port on the H747 Discovery board. Reading the disocvery manual only makes mention of the HS-OTG port. Also PA12/PA11 seem to be connected to the STMOD+ connector and not the USB OTG receptacle.