cancel
Showing results for 
Search instead for 
Did you mean: 

Using ST-Link v2 and Utility to read program from STM32F103C8T

ludemon
Associate II

Using ST-Link v2 and Utility I've been trying to read and save a hex file from a EVSE device that uses a STM32F1 microprocessor to control and display functions. I thought that it was just a matter of connecting via the  debug/program interface and then saving the result, but unfortunately I seem to have erased everything and now the memory is displayed as empty.
My experience on this sort of thing is limited so can anyone help and possibly comment on what I'm doing wrong?

14 REPLIES 14

@ludemon wrote:

 the fact that I disabled read out protection in Option Bytes caused the flash memory to be erased. .


Indeed - that is the documented behaviour.

Think about it: if you could simply bypass the readout protection by just editing the option bytes that wouldn't provide any protection at all - would it?

 


@ludemon wrote:

 it seems that if the code is read protected I can't do anything anyway.


Indeed - that is the whole point of protecting the code!

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Well at the time I didn't know whether read protection was a feature of the Utility or imposed by the code creator. I now know different.

Thanks

It's a feature of the chip - documented in the Programming Manual:

AndrewNeil_0-1751990619446.png

https://www.st.com/resource/en/programming_manual/pm0075-stm32f10xxx-flash-memory-microcontrollers-stmicroelectronics.pdf#page=17

 

If your question is now answered, please mark the solution.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Thank you for pointing this out. however the programming manual is obviously aimed at coding savvy people and not an end user wanting to diagnose a problem and subsequently repair a faulty device to keep it out of landfill 

Andrew Neil
Super User

It seems that your original question is now answered?

If so, please mark the solution - see:

https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.