Question
STM32F401 USB -- USB_CoreReset failed(CSRST bit stucked)
During debugging a bus-powered STM32F401RCT6 customed board, a strange problem was encountered. The application code is directly generated by CubeMX with USB CDC, VBUS sense disabled. The USB failed at plug-in, even no USB enumerating.
I tried to debug it with a stlink, and found the USB works when the board is firstly powered by the debugger before usb cable plugged in. If the MCU boots when the USB cable already plugged, the code goes to error at
USB_CoreReset()The CSRST bit in register FS_GRSTCTL is not cleared. The code returns HAL_TINEOUT.
