AnsweredAssumed Answered

How to persistently write into option byte BOOT_ADD0/1

Question asked by Gahlen Feld on Jun 13, 2017
Latest reply on Jun 14, 2017 by Gahlen Feld

Hello,

 

when reading out FLASH_OPTCR1 register I get boot addresses 0x00200000 and 0x00100000 for BOOT_ADD0 and BOOT_ADD1.
Now I am doing the option byte unlock procedure and the OPTLOCK-bit in FLASH_OPTCR is cleared to 0.
Then I write a new boot address for BOOT_ADD0 and lock the option byte by setting OPTLOCK-bit in FLASH_OPTCR.
When reading out FLASH_OPTCR1 I get the new boot address for BOOT_ADD0 (and the old for BOOT_ADD1).

 

But when I reset the MCU, my change to the BOOT_ADD0 is not persistently saved but the original value is retained.
What is the right procedure to store the boot addresses persistently?

 

Tank you in advance,
Gahlen.

Outcomes