2021-09-27 01:11 AM
MCU is STM32L0.
The file I use to program has option bytes added with read-protection turned ON.
:020000041FF8E3
:0C0000000000FFFF7A80857FFF0000FFFA
:00000001FF
Using ST-link V3, I'm having this error: (see attached screenshot)
Command line:
stm32_programmer_cli -c port=SWD freq=8000 mode=UR -d "%FILE%" -v
It was ok if I use ST-link V2 with this command:
st-link_cli -c SWD FREQ=4000 UR -P %FILE% -V while_programming
Solved! Go to Solution.
2021-09-29 03:57 AM
Hi @FArdi.1 ,
Yes I confirm, verify option while programming is removed from STM32CubeProgrammer.
The verification is done after programming.
Houda
2021-09-27 01:46 AM
Hello,
I don't know such an option in STM32CubeProgrammer,
As you noticed, the verification is done after programming, so you'll have to set protection after verification.
2021-09-27 09:15 PM
I just notice that the issue seems not about hardware (V2 or V3), but ST-link utility vs CubeProgrammer.
I used back V2 with CubeProgrammer and same hex file. Verify failed. It was working on ST-link utility (because it can verify while programming)
Thanks for your your suggestion to workaround this issue, but I can't use it until we have reliable return code (now: success and failed always return zero).
2021-09-28 06:34 AM
Hi FArdi.1,
Verify Option is available for ST-Link V3 so I will check this issue and come back with updates soon.
Houda
2021-09-28 11:53 PM
Do you mean the feature is available in ST-Link V3 hardware, but cannot be activated by STM32CubeProgrammer?
To avoid misunderstanding the title, I clarify again my intention.
The issue is about missing these two options:
1) while_programming
2) after_programming
This is taken from ST-LINK Utility help texts:
-P Load a into device. Syntax: -P <File_Path> [<Address>] [ske] [skpv]
-V Verify if the programming operation was performed successfully
Syntax: -V <while_programming/after_programming>
Note: The "while_programming" is the default type
-EL Select a Custom external memory-loader. Syntax: -EL <File_Path>
I could not find these verify-options in STM32CubeProgrammer:
-w8 : Write a 8-bits data into device memory
<address> : Start address of download
<8-bit_data> : 8-bit data to be downloaded
values should be separated by space
-v, --verify : Verify if the programming operation is achieved
successfully
-r32 : Read a 32-bit data from device memory
<address> : Read start address
<size> : Size of data
Anyway, I'll wait for your next update. Thanks
2021-09-29 03:57 AM
Hi @FArdi.1 ,
Yes I confirm, verify option while programming is removed from STM32CubeProgrammer.
The verification is done after programming.
Houda
2021-09-29 05:35 PM
Any plan to put that feature into STM32CubeProgrammer?
If not, do you have any suggestion on how to verify programming with file that has read-protection setting in it?