Skip to main content
Explorer
August 7, 2020
Solved

STM32H747: How to start the system boot loader via software

  • August 7, 2020
  • 3 replies
  • 3371 views

Hello! I have one of the new Arduino Portenta H7's which is fitted with a STM32H747XI. I need to get the board into DFU mode and don't have easy access to the BOOT pin. So I would like to achieve this via software. I tried the ST suggested code, but it doesn't work. I tried boot address 0x1FF09800 (provided in the example code) and address 0x1FF1E7FE (from the data sheet). My understanding is that the Portenta includes custom Arduino bootloader code (which has been selected by tieing the BOOT pin to GND) but the embedded bootloader (DFU mode) should still be present. Any assistance would be greatly appreciated.

    This topic has been closed for replies.
    Best answer by TDK

    Looks like the USB connector on that board is using the HS USB which is not supported by the STM32 bootloader.

    0693W000003OnR1QAK.png

    3 replies

    Graduate II
    August 7, 2020

    Thos has been discussed a zillion times before. Did you scan this forum for that problem?

    reefwingAuthor
    Explorer
    August 7, 2020

    Hi Uwe,

    Yes I got the link to the suggested code from this post: STM32H743: How to start the system boot loader via software. I also read the post: How do I jump from application code to bootloader without toggling the BOOT0 pin on STM32H745? This dude appears to have a similar issue to mine, but I can't see an obvious solution in the answers. Apologies if we are going over old ground but it is new to me!

    Super User
    August 7, 2020

    How do you know it's not working? If you debug and step through the code, where does it go?

    reefwingAuthor
    Explorer
    August 7, 2020

    Hi TDK, we are working on porting BetaFlight (drone flight control firmware) to the Portenta. BetaFlight Configurator can detect when an attached board is in DFU mode. To double check this I also opened up the STM32CubeProgrammer, and it can't detect any attached boards in DFU mode either. The only way that I can upload code at the moment is via the Arduino bootloader (which uses dfu-util ironically). There is not much debug capability built into the Arduino IDE.

    TDKAnswer
    Super User
    August 9, 2020

    Looks like the USB connector on that board is using the HS USB which is not supported by the STM32 bootloader.

    0693W000003OnR1QAK.png

    reefwingAuthor
    Explorer
    August 11, 2020

    Thanks TDK - you were on the right track. The Portenta can do both HS and FS USB however Arduino devices have a proprietary USB VID/PID. This was the problem. All we needed to do was modify the BetaFlight Configurator source to recognise the VID and PID. I appreciate your assistance and the time spent looking into our problem.