Skip to main content
Visitor II
February 18, 2024
Question

Nucleo STMH745ZI-Q USB OTG HS Host won`t work

  • February 18, 2024
  • 1 reply
  • 849 views

I am trying to enable USB host work. I added  HAL_PWREx_EnableUSBVoltageDetector(); into void MX_USB_HOST_Init(void). and followed git examples for H7. But could not make it work(( 

now green VBUS led is high

vbus.jpg

But my device is not connected. When I turn on Flesh Driver for 1 sec can see how the blue LED blinks on it. at the code, I stag here:

USBH_StatusTypeDef USBH_Process(USBH_HandleTypeDef *phost)

{

__IO USBH_StatusTypeDef status = USBH_FAIL;

uint8_t idx = 0U;

/* check for Host pending port disconnect event */

if (phost->device.is_disconnected == 1U)

{

phost->gState = HOST_DEV_DISCONNECTED;

}

case HOST_IDLE :

if ((phost->device.is_connected) != 0U)

{

USBH_UsrLog("USB Device Connected");

 

Any Idea what is wrong?

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    July 23, 2024

    Hi @Oleksii_Shevch 

    Do you still have the same issue? If so, do you provide an external power supply when using USB host function?