EmBitz
Program option bytes on STM32G4xx - Printable Version

+- EmBitz (https://www.embitz.org/forum)
+-- Forum: EBlink (https://www.embitz.org/forum/forum-3.html)
+--- Forum: Using EBlink (https://www.embitz.org/forum/forum-6.html)
+--- Thread: Program option bytes on STM32G4xx (/thread-145.html)

Pages: 1 2


RE: Program option bytes on STM32G4xx - embitz - 26-11-2022

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.


RE: Program option bytes on STM32G4xx - matsb - 28-11-2022

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.