cancel
Showing results for 
Search instead for 
Did you mean: 

USB HS on H730 is temperamental, constant error_handler()

RAnge.1
Associate

I am using the H730, with the USB High Speed enabled on my own PCB setup. On some occasions, the USB will work as expected. However, most of of the time, it would enter the Error_Handler Loop. I used the CUBEIDE and ioc gui to enable the usb hs

The trace of the function call leading up to the error:

  1.  MX_USB_DEVICE_Init();
    1. if (USBD_Init(&hUsbDeviceHS, &HS_Desc, DEVICE_HS) != USBD_OK)
      1. ret = USBD_LL_Init(pdev);
        1. HAL_PCD_Init(&hpcd_USB_OTG_HS) != HAL_OK
          1. Error_Handler();

I could not constantly recreate this issue on why the USB would sometimes work. With literally the same setup, it would throw the handler error 5 seconds later. I am using a valid external USB Phy that is proven to work, but I just don't understand how its entering this state constantly. Thank you!

1 REPLY 1
SPole.1
Associate

Hi @RAnge.1​,

Did you find what the problem was on your side? I'm getting the same error when initializing USB FS (internal PHY).

The problem seems to only occur when I build the I build the firmware with -O3 optimizations.

Thanks,

Simon