2025-08-26 11:54 PM
Hi,
I am using STM32H7B0
Since it has only 128KB flash, I will need to use an external flash to run code.
There will be a "host" mcu to control this (with BOOT0 / NRST pin control).
I am wondering is it possible to use the built-in ROM bootloader (in system memory), to directly flash the incomign code to connected external flash?
I found app note AN4852, suggesting its possible. But seems we need to use specific peripherals (QSPI?) to connect the external flash?
I haven't dug into the details yet, since I am still in the planning stage of the project.
Just want to know if its possible (or NOT), and what are the precautions (peripherals/pins designated) for this?
2025-08-26 11:58 PM
To do this (with STM32Programmer) You need an External Loader.
try searching the forum for "External Loader".
2025-08-27 12:30 AM
Hi MHoll,
Thanks for the reply!
I am absolutely new to this (external flash running code...), please bear with me if I ask something basic.
So the whole process is
What I can't get my header around is:
2025-08-27 1:24 AM
I'm sorry I didn't read you question completely the first time, I didn't realise You want to program the external Flash with an other MCU (not via a PC tool).
If You us an MCU (programming via UART / SPI / I2C / FDCAN) You have two posibilities:
1) You make You (custom) Bootloader (or adapt one) to load in to the internal FLASH memory
2) You use the ST Bootlader (by setting the BOOT0 Pin etc.)
I prefer the 1. possibility.
This gives You the liberty to us what ever protocoll You want to download the Code into the external Flash, and handle the execution of the Code in the external FLASH (the MCU will always boot the internal FLASH).
There are different examples of custom Bootlader on the web (from ST and others).
To start with this I would buy an Discovery Kit (STM32H7B3I-DK?) an tryout some of the examples You find in STM32CubeIDE.