Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Program option bytes on STM32G4xx
#11
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.
Reply
#12
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.


Attached Files
.zip   Options_test.zip (Size: 478.42 KB / Downloads: 69)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)