2021-11-17 10:06 PM
I have some problems about programming USB CDC. The program goes into ERROR_HANDLER in MX_USB_DEVICE_Init();. I think I made a mistake during set the configuration for running USB_OTG_HS and USB_DEVICE in ioc. (gui of STM32CubeIde).
In " STM32F4xx_hal_pcd.c " file, USB_CoreInit(hpcd -> 0 Instance, hpcd ->Init ) != HAL_OK )
{hpcd -> State = HAL_PCD_STATE_ERROR;
return HAL_ERROR;
}
hpcd is returned as HAL_ERROR and then, go into while loop of ERROR_HANDLER ?
What could be possible reason for this problem?
Thanks for attention.