Skip to main content
This topic has been closed for replies.

2 replies

WBarw.1
WBarw.1Author
Associate
February 12, 2020

For USBH_Start is USBH_LL_DriverVBUS (phost, TRUE) where

/**/**

 * @brief Drive VBUS.

 * @param phost: Host handle

 * @param state : VBUS state

 *         This parameter can be one of the these values:

 *          0 : VBUS Active

 *          1 : VBUS Inactive

 * @retval Status

 */

GTrou
Visitor II
August 9, 2020

This issue still persists. Using H7 firmware version 1.8.0, for a Nucleo H743ZI

Quick Fix: Update the MX_DriverVbusFS function inside USB_HOST/Target/usbh_platform.c as follows (previously, the if-conditional was "state == 0"):

void MX_DriverVbusFS(uint8_t state)
{
 uint8_t data = state;
 /* USER CODE BEGIN PREPARE_GPIO_DATA_VBUS_FS */
 if(state == 1)
 {
 /* Drive high Charge pump */
 data = GPIO_PIN_SET;
 }
 else
 {
 /* Drive low Charge pump */
 data = GPIO_PIN_RESET;
 }
 /* USER CODE END PREPARE_GPIO_DATA_VBUS_FS */
 HAL_GPIO_WritePin(GPIOG,GPIO_PIN_6,(GPIO_PinState)data);
}

 ST, please provide a patch