cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C562RE unable to unlock RDP2 with JLINK. Works fine with ST-Link.

robert-m-lucas
Associate II

Locking the controller (NUCLEO-C562RE - RDP level 2 with OEM key) works fine with J-Link / ST-Link (SWD). E.g.

stm32_Programmer_CLI.exe -c port=JLINK -lockRDP2 0x11111111 0x11111111  0x11111111 0x11111111 -ob RDP_level=0x72
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.22.0
      -------------------------------------------------------------------

Connecting to J-Link/Flasher Probe
Device=Cortex-M33
Device ID   : 0x44E
Voltage     : 3.29V
Frequency   : 4000 KHz
NVM size  : 512 KBytes

Lock RDP2 password successfully done

UPLOADING OPTION BYTES DATA ...

  Bank          : 0x00
  Address       : 0x40022050
  Size          : 112 Bytes

██████████████████████████████████████████████████ 100%

  Bank          : 0x01
  Address       : 0x40022098
  Size          : 8 Bytes

██████████████████████████████████████████████████ 100%

  Bank          : 0x02
  Address       : 0x40022070
  Size          : 8 Bytes

██████████████████████████████████████████████████ 100%

  Bank          : 0x03
  Address       : 0x40022080
  Size          : 8 Bytes

██████████████████████████████████████████████████ 100%

  Bank          : 0x04
  Address       : 0x400220e8
  Size          : 8 Bytes

██████████████████████████████████████████████████ 100%

  Bank          : 0x05
  Address       : 0x400221e8
  Size          : 8 Bytes

██████████████████████████████████████████████████ 100%

  Bank          : 0x06
  Address       : 0x40022090
  Size          : 8 Bytes

██████████████████████████████████████████████████ 100%

  Bank          : 0x07
  Address       : 0x400220f8
  Size          : 8 Bytes

██████████████████████████████████████████████████ 100%

  Bank          : 0x08
  Address       : 0x400221f8
  Size          : 8 Bytes

██████████████████████████████████████████████████ 100%


PROGRAMMING OPTION BYTES AREA ...

  Bank          : 0x00
  Address       : 0x40022050
  Size          : 112 Bytes

██████████████████████████████████████████████████ 100%



Reconnecting...
Reconnected !


UPLOADING OPTION BYTES DATA ...

  Bank          : 0x00
  Address       : 0x40022050
  Size          : 112 Bytes

██████████████████████████████████████████████████ 100%
Error: Uploading Option Bytes bank: 0 failed
Error: Reloading Option Bytes Data failed

Time elapsed during option Bytes configuration: 00:00:06.833

 

Unlocking works with ST-Link:

stm32_Programmer_CLI.exe -c port=SWD -unlockRDP2 0x11111111 0x11111111  0x11111111 0x11111111

      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.22.0
      -------------------------------------------------------------------

ST-LINK SN  : 004F00363235511838363730
ST-LINK FW  : V3J17M10
Board       : NUCLEO-C562RE
Voltage     : 3.30V
Power OFF...
Drives the target power pin out of the (onboard) ST-Link.
Info: Power ON/OFF maybe not available on your Board [also not available on standalone probes]
Power OFF the board finished with success !

Power ON...
Drives the target power pin out of the (onboard) ST-Link.
Info: Power ON/OFF maybe not available on your Board [also not available on standalone probes]
Power ON the board finished with success !

Validation Status: 3
Power OFF...
Drives the target power pin out of the (onboard) ST-Link.
Info: Power ON/OFF maybe not available on your Board [also not available on standalone probes]
Power OFF the board finished with success !

Power ON...
Drives the target power pin out of the (onboard) ST-Link.
Info: Power ON/OFF maybe not available on your Board [also not available on standalone probes]
Power ON the board finished with success !

RDP2 unlocked successfully

 

But does not work with J-Link:

stm32_Programmer_CLI.exe -c port=JLINK -unlockRDP2 0x11111111 0x11111111  0x11111111 0x11111111
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.22.0
      -------------------------------------------------------------------

Connecting to J-Link/Flasher Probe
Error: Unlock RDP2 password failed!

 

Thanks for the help.

1 ACCEPTED SOLUTION

Accepted Solutions
Maxime_BELAVAL
ST Employee

 

Hello Robert,

Following checks with the team, I can confirm that RDP regression via the Segger J-Link interface is currently not supported in STM32CubeProgrammer.

As stated in the user manual:

"Only Flash and Option Bytes (OB) programming are supported via J-Link, other features are not supported".

 

To perform the RDP regression, you have two options:

  • Use an ST-LINK with STM32CubeProgrammer, as you already did, or
  • Use the Segger Device Provisioner.

For the Segger Device Provisioner, a complete step-by-step guide will be published in the STM32 MCUs Knowledge Base next week : https://community.st.com/t5/stm32-mcus/tkb-p/stm32-mcus-knowledge-base

 

EDIT : detailed step-by-step guide for STM32C5 products and Segger J-Link: https://community.st.com/t5/stm32-mcus/how-to-use-the-stm32c5-with-segger-j-link/ta-p/889854

 

View solution in original post

4 REPLIES 4
Maxime_BELAVAL
ST Employee

Hello, using the J-Link interface, after setting RDP Level 2, have you performed a power-off / power-on cycle of the board before performing the RDP regression?

robert-m-lucas
Associate II

Yes, I've tried it with and without it and in the same situations where the ST-Link succeeds, the J-Link fails.

The J-Link fails after everything is unplugged and then plugged back in, then just changing the jumpers to ST-Link power, plugging in the USB at the top, and running the same command with `port=SWD` works

Maxime_BELAVAL
ST Employee

 

Hello Robert,

Following checks with the team, I can confirm that RDP regression via the Segger J-Link interface is currently not supported in STM32CubeProgrammer.

As stated in the user manual:

"Only Flash and Option Bytes (OB) programming are supported via J-Link, other features are not supported".

 

To perform the RDP regression, you have two options:

  • Use an ST-LINK with STM32CubeProgrammer, as you already did, or
  • Use the Segger Device Provisioner.

For the Segger Device Provisioner, a complete step-by-step guide will be published in the STM32 MCUs Knowledge Base next week : https://community.st.com/t5/stm32-mcus/tkb-p/stm32-mcus-knowledge-base

 

EDIT : detailed step-by-step guide for STM32C5 products and Segger J-Link: https://community.st.com/t5/stm32-mcus/how-to-use-the-stm32c5-with-segger-j-link/ta-p/889854

 

Maxime_BELAVAL
ST Employee

Hello Robert, a detailed step-by-step guide is now available for STM32C5 products and Segger J-Link: https://community.st.com/t5/stm32-mcus/how-to-use-the-stm32c5-with-segger-j-link/ta-p/889854

Hope this helps,

Max