Showing results for 
Search instead for 
Did you mean: 

FWupgrade_Standalone example not working

Associate II


Hi, I tried to run the FWupgrade_Standalone example on the STM32h743I EVAL Rev B board, but it didn't work.

There are currently three issues


1.HS, FS in the build settings are not working correctly.
If I don't connect a USB stick to the OTG HS without covering HS and FS, the red LED blinks. According to the readme, it seems to be USB Disconnect. When I built the example with FS, I removed the jumper on JP2 as instructed in the readme.


2.The example says that the download command is executed if the tamper switch is pressed for less than 3 seconds, but my board goes into download mode by itself without pressing the tamper switch.


3.After checking with the debugger, my board keeps returning URB_State_IDLE on line 192 of the usbh_msc_bot.c file(line 13 of the following code),


  switch (MSC_Handle->hbot.state)
    case BOT_SEND_CBW:
      MSC_Handle->hbot.cbw.field.LUN = lun;
      MSC_Handle->hbot.state = BOT_SEND_CBW_WAIT;
      (void)USBH_BulkSendData(phost, MSC_Handle->,
                              BOT_CBW_LENGTH, MSC_Handle->OutPipe, 1U);



      URB_Status = USBH_LL_GetURBState(phost, MSC_Handle->OutPipe);

      if (URB_Status == USBH_URB_DONE)
        if (MSC_Handle->hbot.cbw.field.DataTransferLength != 0U)
          /* If there is Data Transfer Stage */
          if (((MSC_Handle->hbot.cbw.field.Flags) & USB_REQ_DIR_MASK) == USB_D2H)
            /* Data Direction is IN */
            MSC_Handle->hbot.state = BOT_DATA_IN;
            /* Data Direction is OUT */
            MSC_Handle->hbot.state = BOT_DATA_OUT;



which causes it to return usbh_busy on line 798 of the usbh_msc.c file,


  while (USBH_MSC_RdWrProcess(phost, lun) == USBH_BUSY)
    if (((phost->Timer - timeout) > (10000U * length)) || (phost->device.is_connected == 0U))
      MSC_Handle->state = MSC_IDLE;
      return USBH_FAIL;
  MSC_Handle->state = MSC_IDLE;



so it seems to be stuck in a while statement.

I installed the latest version of the Cube MCU Package for the H743I EVAL board from CubeMX, and did not modify the example code.


Does anyone have a solution or advice for this problem?

ST Employee

Hi @Croaker 

Check SB50. It must be removed as well as detailed in the user manual.

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.