EFL internal flash driver on single bank MCU
Posted: Fri Jul 25, 2025 10:39 am
Hello,
I have to write a bootloader able to flash the application (from external SPI eeprom) on a stm32g491 (512Kb, single bank).
from what I have understood, most of the bootloader code can reside in flash, but the part that actually erase and program the flash should run from RAM since one bank devices does not permit 'read while write' and programming the flash will stall the program.
It means some magic incantation in the linker file, a routine that copy the function from flash to ram, blocking IT when the RAM function is running.
Is the EFL driver aware of that and can be used for my use case ?
Alexandre
I have to write a bootloader able to flash the application (from external SPI eeprom) on a stm32g491 (512Kb, single bank).
from what I have understood, most of the bootloader code can reside in flash, but the part that actually erase and program the flash should run from RAM since one bank devices does not permit 'read while write' and programming the flash will stall the program.
It means some magic incantation in the linker file, a routine that copy the function from flash to ram, blocking IT when the RAM function is running.
Is the EFL driver aware of that and can be used for my use case ?
Alexandre