USB Core Soft Reset problem in MX_USB_DEVICE_Init() for STM32F407VE
There are a lot of entries about this problem as I saw. But I also want to tell my story :D
STM32F407VE is used as MCU and USB3320 is used as external PHY for obtaining high speed rate in USB operations. And, STM32CUBE IDE is used to generate code and debug the code in MCU in my PCB.
the initial optimizations for USB_OTG_HS and CDC Class are done according to documents in literature, and then the clock that is sent to MCU(from USB3320) is 60 Mhz. However USB_CoreInit() function in HAL Driver of " stm32f4xx_ll_usb.c " return to HAL_TIMEOUT and MX_USB_DEVICE_Init() goes into directly while(1) loop inside the "Error Handler". As shared code below;
USB->GRSTCTL |= USB_OTG_GRSTCTL_CSRST;
do
{
if (++count > 200000U)
{
return TIMEOUT; /// After counter code returns with TIMEOUT error\\\
}
}
while ((USB->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST);
What can be possible reasons for why USB Core does not take soft reset?
If you have any idea, please share with me and this community for possible future problem :\
