EmBitz

Full Version: Program option bytes on STM32G4xx
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Yes, you got the idea.

Well, you can just read the content back so if the verify failed, it was because it really failed.

I think it goes wrong with the buffer writing, the part that you commented out.  I think it's easier to write the whole buffer at once into that sector so that also the inverted part of the options are set.

Do you have a small test project for me? I will try to make it working for you.
Attached is a test program containing both option bytes blocks.
When using STM32CubeProgrammer, I can see from its Log that it reconnects twice to the target, every time after an option bytes block has been written:
Quote:WriteOB function terminated with connection error due to OB_launch
Reconnecting...
Disconnected
...
Reconnected !
Success with Time elapsed during Reconnect: 20 ms

"I think it's easier to write the whole buffer at once into that sector so that also the inverted part of the options are set."
Is that possible? I didn't find any description of that in the reference manual.
Pages: 1 2