2025-07-07 7:24 AM - last edited on 2025-07-07 11:41 AM by mƎALLEm
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?
2025-07-07 7:31 AM
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
2025-07-07 11:36 AM
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.
2025-07-07 11:41 AM - edited 2025-07-07 11:44 AM
Hello;
Are you using Blue Pill board?
Post photos of your board and the ST-LINK: bottom and top.
2025-07-07 12:35 PM
@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.
2025-07-07 7:05 PM
> My experience on this sort of thing is limited so can anyone help and possibly comment on what I'm doing wrong?
If you can connect over SWD and view the content of the flash, you can save it to disk. It is straightforward.
Unclear what you did to erase the flash memory, but don't do that. It requires some effort--don't click things randomly.
Try STM32CubeProgrammer instead of the ST-Link Utility which is no longer supported.
2025-07-08 1:29 AM
I'm not using a Blue Pill board. I thought that was for development purposes.
The photo shows my ST-Link connected to the existing board via GND CLK DIO VCC port.
2025-07-08 1:34 AM
Thank you Karl for your comment. I think I've learned a lesson here!