embassy-stm32

Crates

git

Versions

stm32h503kb

Flavors

embassy_stm32::flash

Function perform_bank_swap

source
pub fn perform_bank_swap()
Expand description

Logical, persistent swap of flash banks 1 and 2.

This allows the application to write a new firmware blob into bank 2, then swap the banks and perform a reset, loading the new firmware.

Swap does not take effect until system or power-on reset.

PLEASE READ THE REFERENCE MANUAL - there are nuances to this feature. For instance, erase commands and interrupt enables which take a flash bank as a parameter ignore the swap!