cancel
Showing results for 
Search instead for 
Did you mean: 

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

Oleksii_Shevch
Associate

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 1
FBL
ST Employee

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 Accept as Solution on the reply which solved your issue or answered your question.