[ABANDONED] Fail to write option bytes by J-Link using the unlock sequence with J-Link Commander

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] Fail to write option bytes by J-Link using the unlock sequence with J-Link Commander

    Dear all,

    I try to write the option byte of a STM32U575CIU6 with a J-Link PLUS, the J-Link Commander V7.86 and the given unlock example from the SGGER wiki.
    Device Cortex-M33
    SelectInterface SWD
    Speed 4000
    Connect
    Reset
    Write4 0x40022008 0x45670123
    Write4 0x40022008 0xCDEF89AB
    Write4 0x40022010 0x08192A3B
    Write4 0x40022010 0x4C5D6E7F
    Write4 0x40022040 "Value to write"
    Write4 0x40022028 0x00020000
    Sleep 100
    Write4 0x40022028 0x08000000
    Sleep 50
    Sleep 50
    Reset

    The point I am struggling is that the sequence won't work. After a reset (HW) and reading the FLASH_OPTR the content is the same as before the programming trail.
    I have done that sequence in Source Code using the HAL and I used a ST-Link with the ST-Programmer and with both I successfully could programm the FLASH_OPTR.

    Does anyone has a hint for a needed missing modification of the script, so that it will work?
    From support I got the answer to check ERR bits and verify the LOCK status bit and to verify that I did not LOCK the register again by try to unlocking it to often. But all of that is okay and verified by me.

    All ideas are appreciated.
    P.