cancel
Showing results for 
Search instead for 
Did you mean: 

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

ludemon
Visitor

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?

4 REPLIES 4
Andrew Neil
Super User

Is that "EVSE" as in Electric Vehicle Supply Equipment ?

It's quite likely that the manufacturer will have read-protected the device - ie, their Intellectual Property (IP). 

 

Is it a genuine ST-Link?

Note that the ST-Link Utility has been obsolete for years - the current tool is STM32CubeProgrammer:

https://www.st.com/en/development-tools/stm32cubeprog.html

 

 

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 Andrew for your reply.

Yes it is Electric Vehicle Supply Equipment aka Portable EV Charger.

I did get a message saying that read-out protection was enabled so I disabled it in Option Bytes. Is that likely to have caused the problem?

I don't know if the ST-Link is genuine or not, I bought it from an Aliexpress seller. It does seem to be recognized as genuine by the utility.

I have another similar working EVSE which I could attempt to extract the program from using a STM32CubeProgrammer, but from my previous experience and your comment about Intellectual Property I'm reluctant to take the risk.

mƎALLEm
ST Employee

Hello;

Are you using Blue Pill board?

Post photos of your board and the ST-LINK: bottom and top.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

@ludemon wrote:

Thank you Andrew for your reply.

Yes it is Electric Vehicle Supply Equipment aka Portable EV Charger.

I did get a message saying that read-out protection was enabled so I disabled it in Option Bytes. Is that likely to have caused the problem?

I don't know if the ST-Link is genuine or not, I bought it from an Aliexpress seller. It does seem to be recognized as genuine by the utility.

I have another similar working EVSE which I could attempt to extract the program from using a STM32CubeProgrammer, but from my previous experience and your comment about Intellectual Property I'm reluctant to take the risk.


By disabling the Option byte, you've inevitably erased the firmware in the STM32F1xx.

If the STM32 is code protected, then there is not much you can do to extract the code.  

I was told that if a devices starts to smoke, put the smoke back in. I guess I never got all the smoke because the device never worked afterwards.
Don't worry, I won't byte.
TimerCallback tutorial! | UART and DMA Idle tutorial!

If you find my solution useful, please click the Accept as Solution so others see the solution.