2019-07-12 02:49 AM
Using an STM32H753, I have boot code in bank 1, sector 0 (0x08000000) that detects and jumps to application code in bank 2, sector 0 (0x08100000). In the application code I am trying to erase and rewrite bank 1 sector 0, but the MCU locks up (with no fault handler output) when I set FLASHH7_CR_START too soon after reset.
The application code is quite sophisticated and enables many features of the chip, but neither bank swapping nor FLASH CRC. The fault handler is known to work.
Things I have tried:
The boot code does not enable any interrupts or caches and the application code writes to
VTOR.
It seems there is something else time-sensitive about erasing the STM32H7 boot sector (or recently executed sector). What am I missing?