cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H747: How to start the system boot loader via software

reefwing
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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

0693W000003OnR1QAK.png

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

7 REPLIES 7
Uwe Bonnes
Principal III

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

TDK
Guru

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

If you feel a post has answered your question, please click "Accept as Solution".

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!

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.

I tried dfu-util as well. In the Arduino bootloader I can see two DFU mode devices listed for the Portenta (internal and external flash). When I jump to system memory using the address in the ST suggested code the mbed OS crashes (indicated by the RGB LED flashing a red SOS).0693W000003OmveQAC.png

TDK
Guru

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

0693W000003OnR1QAK.png

If you feel a post has answered your question, please click "Accept as Solution".

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.