cancel
Showing results for 
Search instead for 
Did you mean: 

[BUG] For USB HOST MSC (for stm32f429) in USBH_Start and USBH_Stop functions power state is swapped.

WBarw.1
Associate
2 REPLIES 2
WBarw.1
Associate

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
Associate

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