Skip to main content
Graduate
September 27, 2021
Solved

With ST-link V3, is there an option to verify while programming like in ST-link V2?

  • September 27, 2021
  • 3 replies
  • 2474 views

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)

0693W00000FAUPBQA5.png 

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

    This topic has been closed for replies.
    Best answer by Houda GHABRI

    Hi @FArdi.1​ ,

    Yes I confirm, verify option while programming is removed from STM32CubeProgrammer.

    The verification is done after programming.

    Houda

    3 replies

    Technical Moderator
    September 27, 2021

    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.

    FArdi.1Author
    Graduate
    September 28, 2021

    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)

    0693W00000FAbE0QAL.png 

    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).

    0693W00000FAbGLQA1.png 

    ST Employee
    September 28, 2021

    Hi FArdi.1,

    Verify Option is available for ST-Link V3 so I will check this issue and come back with updates soon.

    Houda

    FArdi.1Author
    Graduate
    September 29, 2021

    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

    ST Employee
    September 29, 2021

    Hi @FArdi.1​ ,

    Yes I confirm, verify option while programming is removed from STM32CubeProgrammer.

    The verification is done after programming.

    Houda

    FArdi.1Author
    Graduate
    September 30, 2021

    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?