Skip to main content
Visitor II
December 16, 2023
Solved

USB Host does not detect flashdisk plugin and no interrupt occurrence

  • December 16, 2023
  • 1 reply
  • 1074 views

I am use Nucleo-H563Zi test the usb host feature, I connected the USB_USER jumper to provide VBUS, and just use 2 wire usb, ignore 2 CC line. and configed in cubeide as below

runbaby_0-1702702131240.pngrunbaby_1-1702702155126.pngrunbaby_2-1702702189393.png

runbaby_3-1702702226922.png

Then I generat code, and I add 

"HAL_HCD_Start(&hhcd_USB_DRD_FS);"

before while(1)

 

then compile and debug the program

but I can not detect the flash disk plugin and no usb interrupt occure.

what config is wrong for this test.

 

Thank you.

 

    This topic has been closed for replies.
    Best answer by runbaby

    find the reason, we need enable USB33SV in register PWR_USBSCR, and this implement in HAL_PWREx_EnableVddUSB(), and was not generate by cubeide,  we need add this function call manually,

    after that it works good.

    1 reply

    runbabyAuthorAnswer
    Visitor II
    December 16, 2023

    find the reason, we need enable USB33SV in register PWR_USBSCR, and this implement in HAL_PWREx_EnableVddUSB(), and was not generate by cubeide,  we need add this function call manually,

    after that it works good.