Question
Problem with USB on STM32L412KBT
Hi, I have problem running USB on STM32L412KBT. The code hangs inside MX_USB_DEVICE_Init. Sometimes in function HAL_StatusTypeDef USB_DevInit(USB_TypeDef *USBx, USB_CfgTypeDef cfg) (file stm32l4xx_ll_usb.c), sometimes in function HAL_StatusTypeDef USB_DevConnect(USB_TypeDef *USBx) (the same file).
- Using CubeMX 5.2.1, STM32Cube FW_L4 V1.14.0
- Custom board, stable 3v3 power source with many filtering capacitors
- Successfully upload code using USB DFU, so I think wiring is OK
- Tried multiple CPU clock speed
- Tried multiple USB clock source
- Tried multiple USB class type CDC, HID, ...
- When I comment MX_USB_DEVICE_Init all other peripherals seems to work correctly
Any help appreciated...
