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
  • 1305 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?

1 reply

ST 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? 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL