2023-03-14 01:06 AM
On windows 10 I am using STM32_Programmer_CLI.exe (2.13.0) to flash bytes to memory using the following command line
but then I do so I get a very strange output:
ST-LINK SN : 53FF71065056705420540981
ST-LINK FW : V2J29S7
Voltage : 3.22V
SWD freq : 4000 KHz
Connect mode: Hot Plug
Reset mode : Software reset
Device ID : 0x447
Revision ID : Rev Z
Device name : STM32L07x/L08x/L010
Flash size : 128 KBytes
Device type : MCU
Device CPU : Cortex-M0+
BL Version : 0xB2
Downloading 8-bit data...
██████████████████████████████████████████████████ 100%
Error: Failed to download data! If it's a Flash memory, it may be not erased or protected
Downloading 8-bit data done successfully
Downloading 8-bit data...
██████████████████████████████████████████████████ 100%
Downloading 8-bit data done successfully
Verifying ...
Read progress:
██████████████████████████████████████████████████ 100%
Download verified successfully
Now has the flash succeeded or not? Because I get an error and then some green bars. How to get rid of this error?
Also, the command did NOT succeed. Checking with the UI version of the programmer at least I see that the address 0x08080000 has not been changed. How to fix this problem?
Solved! Go to Solution.
2023-03-22 01:40 AM
Hello @ADiet.1 ,
The part number is written on top of the MCU as shown in the picture below. Please check your board and send it to me.
The device that you referred to in your last comment is the STLink-V2 and it is a debugger and a programmer.
About the binary file, you can send it to me in private.
Thanks in advance,
Sara.
2023-03-14 01:12 AM
Maybe I just repeat this command until there is no "Error" in the output? Is that a viable solution?
2023-03-15 07:03 AM
Hello @ADiet.1 ,
Thanks for sharing,
So, I tested the following command:
.\STM32_Programmer_CLI.exe -c port=SWD -w8 0x08080000 0xAA 0x00 0x00 0x00 0x00 0x00 -w8 0x08080C00 0x00 0x00 0x00 0x00 0x00 0x00 -v
And EEPROM1 was programmed successfully:
.\STM32_Programmer_CLI.exe -c port=SWD -w8 0x08080000 0xAA 0x00 0x00 0x00 0x00 0x00 -w8 0x08080C00 0x00 0x00 0x00 0x00 0x00 0x00 -v
-------------------------------------------------------------------
STM32CubeProgrammer v2.13.0
-------------------------------------------------------------------
ST-LINK SN : 36FF6A064B46323626410643
ST-LINK FW : V2J28S6
Board : --
Voltage : 3.26V
SWD freq : 4000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x447
Revision ID : Rev Z
Device name : STM32L07x/L08x/L010
Flash size : 192 KBytes
Device type : MCU
Device CPU : Cortex-M0+
BL Version : 0x41
Downloading 8-bit data...
██████████████████████████████████████████████████ 100%
Downloading 8-bit data done successfully
Downloading 8-bit data...
██████████████████████████████████████████████████ 100%
Downloading 8-bit data done successfully
Verifying ...
Read progress:
██████████████████████████████████████████████████ 100%
Download verified successfully
.\STM32_Programmer_CLI.exe -c port=SWD mode=NORMAL -r8 0x08080000 8
-------------------------------------------------------------------
STM32CubeProgrammer v2.13.0
-------------------------------------------------------------------
ST-LINK SN : 36FF6A064B46323626410643
ST-LINK FW : V2J28S6
Board : --
Voltage : 3.26V
SWD freq : 4000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x447
Revision ID : Rev Z
Device name : STM32L07x/L08x/L010
Flash size : 192 KBytes
Device type : MCU
Device CPU : Cortex-M0+
BL Version : 0x41
0x08080000 : AA 00 00 00 00 00 00 00
Did you run the same command ?, if yes could you please share the Option Bytes configuration.
Otherwise, please share the used command.
Thanks in advance,
Sara.
2023-03-16 12:02 AM
I use the following command for example:
./STM32_Programmer_CLI.exe -c port=SWD mode=HOTPLUG -w8 0x08080000 0xAA 0x00 0x00 0x00 0x00 0x00 -w8 0x08080C00 0x00 0x00 0x00 0x00 0x00 0x00 -v --halt
But when I repeat the same command it usually works. So not a big deal. Just have to use a while loop until it works ... But would be better of course if the stm tool would work ...
when I quickly repeat the same command it seems always to succeed. when I wait for like 20 seconds, it fails. But when I then repeat the command again within a second it works again. What is going on?
2023-03-16 06:40 AM
Hello @ADiet.1 ,
Could you specify the full part number of your device, and if it's possible please send me your project for further check.
Thanks & best regards,
Sara.
2023-03-16 11:38 PM
Hello, the number on the device is "B 2022 42". And what "project" do you mean?
2023-03-17 02:34 AM
Hello @ADiet.1 ,
Sorry for the confusion, I meant the MCU part number, for example STM32L073VZT3.
For the project, I need the code that you loaded in your MCU (binary file) and also I need the option bytes configuration.
Thanks in advance,
Sara.
2023-03-21 09:30 AM
Hello, the MCU part number might be STM32L07x/L08xL010 (if not please provide the way to get this number). I am not sure I can share the binary file, but the option byte configuration is as follows:
2023-03-21 09:40 AM
>>if not please provide the way to get this number
It will be lasered on the top of the part, or in your BoM as a fully qualified part number
2023-03-21 10:54 PM
I do not find a number. Just to be clear the device looks like the white device that is shown here: https://www.st.com/en/development-tools/st-link-v2.html. Also, what is a BoM?