Topic : Cortex_pgm.exe: leave my option bytes alone!

Forum : ARM

Original Post
Post Information Post
March 25, 2013 - 5:06pm
Guest

I'm having some trouble using the Cortex_pgm.exe tool. I would like to be able to erase the flash on a STM32F103RET6 without erasing the option bytes. I can do this without a problem using RFlasher when I choose the

Replies
Post Information Post
+1
0
-1
March 26, 2013 - 8:47am
Raisonance Support Team

I'm sorry but your message has been snipped, can you post it again.
Thanks
regards,

+1
0
-1
March 26, 2013 - 10:40am
Raisonance Support Team

Hi,

Using the 'O' command without arguments tells Cortex_pgm to leave the Option Bytes unchanges. (by default they are erased)

So this should work:

Cortex_pgm TSTM32F103xE O E

Of course it will not work if the RDP is previously active in the Option Bytes, because in this case the device forbids to erase the flash without also erasing the option bytes.

Another, better option is to rewrite the Option Bytes with the values that you want after erasing and programming the flash. Use the same 'O' command for this, but with arguments. See the Cortex_pgm help for the details.

Best Regards,

Vincent

+1
0
-1
April 9, 2013 - 8:47pm
Guest

Hi there,

Thanks for your answer. I am finding that the 'O' command is not working for me. If I type in the following command:

Cortex_pgm TSTM32F103RET6 O E

I get this:

!!! Error 1: Wrong number of parameters for command O.

Have you any idea about this? I also tried:

Cortex_pgm TSTM32F103RET6E O E

and

Cortex_pgm TSTM32F103xE O E

Thanks,
Blake.

+1
0
-1
April 9, 2013 - 11:09pm
Guest

I installed the latest version of Ride 7 and RKit-ARM (7.42.12.0305 and 1.48.13.0029, respectively) and now the "O" option works.

Thanks,
Blake.