STM32G0B USB error during initialization, SOLVED by modifying your library
in usb library in the file generated by STM32CubeMx for the STM32G0B1
* @file : Target/usbd_conf.c
* @version : v3.0_Cube
* @brief : This file implements the board support package for the USB device library
in function void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd)
line 205 you have the test
if (( hpcd->Init.speed != USB_DRD_SPEED_FS) ) || (hpcd->Init.speed != USB_DRD_SPEED_LS))
{
Error_Handler();
}
this is obviously always true, and you always go to Error_Handler
I modified the test
if (( hpcd->Init.speed != USB_DRD_SPEED_FS) ))
{
Error_Handler();
}
now it's running.
Please can you check your library and give me a better solution, I don't like to modify manufacturer library.
