2017-06-13 05:12 AM
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.#persistent #option-bytes #boot_add0Solved! Go to Solution.
2017-06-13 07:30 AM
I miss FLASH_OPTCR_OPTSTRT getting set to initiate programming. Reread the reference manual.
2017-06-13 07:30 AM
I miss FLASH_OPTCR_OPTSTRT getting set to initiate programming. Reread the reference manual.
2017-06-13 10:07 AM
this sounds good, I will try it tomorrow morning and yes, I will also read the reference manual (obviously I missed this section when reading it)
2017-06-14 04:11 AM
you are right! when using the OPTSTRT bit it persistently writes the addresses into flash memory -> THANK YOU!
Initially I was confused since the reference manual speaks of 'user option operation' regarding the OPTSTRT bit and I associated it with the user options bytes only (but this was wrong)