Skip to main content
Visitor II
August 10, 2021
Solved

STM32F730R8T6 USB HS init fail

  • August 10, 2021
  • 1 reply
  • 934 views

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

    This topic has been closed for replies.
    Best answer by HL.2

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

    0693W00000D24YwQAJ.png

    1 reply

    Technical Moderator
    August 10, 2021

    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.

    HL.2AuthorAnswer
    Visitor II
    August 10, 2021

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

    0693W00000D24YwQAJ.png