Dynamic use of WRP (in STM32WBx5) ?
To secure my bootloader against erroneous writes from the application I want to enable write protection on it. But since for some things the bootloader needs to modify data inside its partition (security counter update and key invalidation), I can not just enable write protection and be done with it. I would need to disable it at some point and reenable it again. Best case without rebooting in between.
Now what I am trying to understand ist when the WRP setting actually takes effect, so how dynamic I can use it. The reference manual says:
"To validate the WRP options, the option bytes must be reloaded through the OBL_LAUNCH
bit in Flash memory control register"
But validation is not enabling. So when can the register be written and when does the change take effect?
I think my question is quite similar to the following, but that was never solved
https://community.st.com/t5/stm32-mcus-security/about-read-out-protection-write-protection/m-p/162290
