cancel
Showing results for 
Search instead for 
Did you mean: 

Using the built-in bootloader on a STM32H743 (Nucleo-144)?

ST User
Associate III

Hello,

I am attempting to use the built-in bootloader to flash code to the STM32H743 Nucleo-144 using the USART. I have tried two methods: following the flow chart in AN2606 Figure 48, and jumping directly to the bootloader, but so far neither method seems to work.

For the first method, I just call HAL_RCC_DeInit(); soon after start to get the clock set up, and then sit in a while loop, but the flash loader never recognizes the board.

For the second method, I am following this tutorial:

https://stm32f4-discovery.net/2017/04/tutorial-jump-system-memory-software-stm32/

I have tried a jump to memory address 0x1FFF000 and 0x1FF1E7FE, which are the two addresses I can find called out in AN2606. This method has the same result: the flash loader demonstrator never recognizes the board.

I have the UART cable hooked up to USART 3 on connector CN10 pins 32 (PB10) and 34 (PB11).

Am I doing something wrong here? Does anyone have a good example showing how to use the built-in bootloader for the STM32H7? I've only found examples for the F series.

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
  1. // Disable all interrupts
  2. __disable_irq();

Don't do this. You need to disable the interrupt sources of anything you have enabled. Not blanket stop the processor from receiving interrupts, it doesn't undo this on the other side.

The Boot ROM Vector Table on the H743 is situated at 0x1FF09800

https://community.st.com/s/question/0D50X00009XkW8QSAV/stm32h743-how-to-start-the-system-boot-loader-via-software

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

9 REPLIES 9
  1. // Disable all interrupts
  2. __disable_irq();

Don't do this. You need to disable the interrupt sources of anything you have enabled. Not blanket stop the processor from receiving interrupts, it doesn't undo this on the other side.

The Boot ROM Vector Table on the H743 is situated at 0x1FF09800

https://community.st.com/s/question/0D50X00009XkW8QSAV/stm32h743-how-to-start-the-system-boot-loader-via-software

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Uwe Bonnes
Principal II

Early chips revision had no bootloader at all. also bought at public sources, like Farnell.

Excellent, that allows me to connect to the target, thank you!

Where did you find the address for that boot table? I'd like to add a call out to the documentation in my code: that address doesn't appear anywhere in AN2606.

Also, now the flash loader connects, but the Target list is empty. It looks like the STM32H7 is not supported? Is that still the case?

https://community.st.com/s/question/0D50X00009kJ2SmSAK/stm32h7-and-flash-loader-demonstrator

I'm also curious why simply doing the HAL_RCC_DeInit() on startup and then waiting doesn't allow me to use the bootloader.

I went and found the location, there might be an address coded in the options bytes, on phone so can't check.

T​ry using the STM32 Cube Programmer app.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Khouloud GARSI
Lead II

Hello,

In STM32H7, the base address of the system memory is different from the entry point of the bootloader.

Thus, in order to jump to the bootloader, address "0x1FF09800" should be used instead of "0x1FFF0000".

Please have a look on FAQ "Jump to Bootloader from application on STM32H7 devices".

Link:

https://community.st.com/s/article/STM32H7-bootloader-jump-from-application

Khouloud.

Pavel A.
Evangelist III

It appears to be an extremely popular topic. Please consider writing application note.

-- pa

Hi @Pavel A.​ ,

I will forward your suggestion internally.

And by the way, many thanks for your continuous contribution in our STM32 MCUs!

Khouloud.

Given the number of times this has been gone over, for a decade, I've concluded most people don't bother to read, or have poor comprehension. Forums are like "Ground Hog Day", you've explain the same sh*t over and over.

For all it's faults the Jive forum was still a much better for posting blog/tutorial stuff, and the ability to link to specific posts within a thread. Don't look to be able to comment on FAQ articles.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mongisvi
Associate

Dear colleagues,

This topic seems extended in diferent forums and few solutions has been aported. I think I can contribute to solve part of the issue. With this method, there is no need to use the system bootloader jump option because it is possible to update from the external world directly, using a simple UART FTDI chip. I have been doing some testing with the NUCLE-H743ZI (STM32 H7) and the USART1 bootloader. My goal was to update the firmware of the STM32 using UART port (with a blank chip). Finnally I manage to do it, but the procedure is a little bit tricky. Moreover, it seems that having the latest versions of software is important:

SOFTWARE USED:

  • STM32 Cube Programmer 2.1.0

PINOUT

  • USART1 (PA10, PA9)
  • FTDI 232 cable was connected to this pins (a COM port is created in the computer)

CONFIGURATION

  • BOOT0 = High state

Procedure:

0) Connect PA10/PA9 and GND to FTDI cable.

1) Set BOOT0 to High state.

2) Reset STM32.

3) Open STM32 Cube Programmer 2.1.0 (configure as UART connection with FTDI RS232; 115200, EVEN parity)

4) Press connect, you will get the following error (I am using REV Y of the STM32):

11:39:20 : Activating device: OK

11:39:20 : Response received from device: NACK

11:39:20 : Error: GETID command not acknowledged!

11:39:20 : Reemission of GetID command

11:39:20 : Response received from device: NACK

11:39:20 : Error: GETID command not acknowledged!

11:39:20 : Reemission of GetID command

11:39:20 : Response received from device: NACK

11:39:20 : Error: GETID command not acknowledged!

11:39:20 : Chip ID: 0x0 

11:39:20 : Response received from device: NACK

11:39:20 : Error: GET command not acknowledged!

11:39:20 : Reemission of Get command

11:39:20 : Error: Read Serial Response timed out.

11:39:20 : BootLoader protocol version: 0.1

11:39:21 : Warning: Device is under Read Out Protection

11:39:21 : Response received from device: NACK

11:39:21 : Error: GETID command not acknowledged!

11:39:21 : Reemission of GetID command

11:39:21 : Response received from device: NACK

11:39:21 : Error: GETID command not acknowledged!

11:39:21 : Reemission of GetID command

11:39:21 : Response received from device: NACK

11:39:21 : Error: GETID command not acknowledged!

5) Close the STM32 Cube Programmer 2.1.0 without doing anything to the STM32 eval (no reset, no FTDI change, nothing...)

6) Open the STM32 Cube Programmer 2.1.0 again and press connect (with same configuration on the UART port)

7) Now the STM32 is recognized and it is possible to erase, read and programm it.

I think there is a bug dureing the connection on the STM32 Cube Programmer that forces to re-init the aplication. IMPORTANT: It seems that flashloader is not compatible with STM32 H7 chips.

Hope that helps.

Victor