cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F730R8T6 USB HS init fail

HL.2
Associate II

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.

0693W00000D21BaQAJ.png

1 ACCEPTED SOLUTION

Accepted Solutions

Sorry, I look datasheed again, R serial dones't support internal HS phy.(I didn't connect any external phy.)

0693W00000D24YwQAJ.png

View solution in original post

2 REPLIES 2
Mike_ST
ST Employee

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.

Sorry, I look datasheed again, R serial dones't support internal HS phy.(I didn't connect any external phy.)

0693W00000D24YwQAJ.png