cancel
Showing results for 
Search instead for 
Did you mean: 

Override option bytes in firmware to prevent being locked out

OHaza.1
Associate III

Hi, we are using an STM32G05 series processor (STM32G051K6T6).

The default setting in the Cube Programmer software sets the option byte nBOOT_SEL to high. This effectively disables the BOOT0 pin and prevents reprogramming if the option byte was not cleared before writing.

Is it possible to overwrite this in the firmware, I presume in the linker, so that even if the option byte is written as high we will not be locked out from entering programming mode.

Thanks in advance

1 REPLY 1
TDK
Guru

You can change option bytes within firmware or within STM32CubeProgrammer, assuming you can connect to the chip. You can connect over SWD as long as you have not overridden the functions of the SWDIO and SWCLK pins.

STM32CubeProgrammer shouldn't change any option bytes unless you tell it to. They are persistent.

If you feel a post has answered your question, please click "Accept as Solution".