2023-01-25 03:18 AM
Hi,
For stm32wb flash operations we have to implement diagram described in AN5289, page 36. How about option bytes access? Do we have apply the same approach, with semaphores etc? Or we just can use regular HAL functions?
Best,
Mateusz
Solved! Go to Solution.
2023-01-25 04:34 AM
Please have a look at chapter 3.4.2 Option bytes programming of the register manual.
2023-01-25 04:34 AM
Please have a look at chapter 3.4.2 Option bytes programming of the register manual.
2023-01-25 05:57 AM
"In a multi-CPU system it is good practice to use semaphores to manage option programming, and prevent simultaneous option programming by the CPUs."
Which semaphore can be used? Sem2 ("FLASH - All registers")?
Best,
Mateusz
2023-01-25 09:20 AM
Indeed, you can use the semaphore protecting the flash access as any writing to an option byte shall be considered as a flash access. Now please be careful to release this semaphore as soon as the flash access is done. This is key as CPU2 is also requesting this semaphore each time it needs to save values in the flash memory.
2023-01-25 09:26 AM
Great,
Thank you for answer!
Best,
Mateusz