cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB + option bytes setting

msemegen
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Remi QUINTIN
ST Employee

Please have a look at chapter 3.4.2 Option bytes programming of the register manual.

View solution in original post

4 REPLIES 4
Remi QUINTIN
ST Employee

Please have a look at chapter 3.4.2 Option bytes programming of the register manual.

msemegen
Associate II

"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

Remi QUINTIN
ST Employee

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.

msemegen
Associate II

Great,

Thank you for answer!

Best,

Mateusz ​