2021-08-10 04:57 AM
I've a stm32f730r8t6 core board, I need to use stm32 as USB HS device, looks like STM32CubeMX generate the code have bugs.
If using USB_FS is working fine but USB_HS is not.
I've traced the code failed at USB_CoreReset.
static HAL_StatusTypeDef USB_CoreReset(USB_OTG_GlobalTypeDef *USBx)
{
uint32_t count = 0U;
/* Wait for AHB master IDLE state. */
do
{
if (++count > 200000U)
{
return HAL_TIMEOUT;
}
} while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U);
/* Core Soft Reset */
count = 0U;
USBx->GRSTCTL |= USB_OTG_GRSTCTL_CSRST;
do
{
if (++count > 200000U)
{
//failed at here.
return HAL_TIMEOUT;
}
} while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST);
return HAL_OK;
}
This is design for the core board.
Solved! Go to Solution.
2021-08-10 10:44 AM
Sorry, I look datasheed again, R serial dones't support internal HS phy.(I didn't connect any external phy.)
2021-08-10 07:37 AM
Hello,
Thank you for your question.
It is difficult to answer, without seeing the .ioc file. or the source code, but
one thing I can see is that USB HS pins are not connected to any USB connector.
They are normally PB14 and PB15 for the USB HS block.
2021-08-10 10:44 AM
Sorry, I look datasheed again, R serial dones't support internal HS phy.(I didn't connect any external phy.)