Skip to main content
Associate
Nov 19, 2026 8:01 AM UTC
Question

STM32WBA65 – RDP level 2 regression with OEM2 password reports success but the device stays locked (NUCLEO-WBA65RI, OEMiRoT)

Setup

  • Board: NUCLEO-WBA65RI (STM32WBA65, Device ID 0x4B0, Rev Z), on-board ST-LINK V3, SN 0032001C3234510536303532, firmware V3J16M9B5S1
  • STM32CubeProgrammer 2.21.0 (macOS CLI; the Windows GUI was also tried, see below)
  • Firmware: the OEMiRoT example from STM32CubeWBA 1.9.0 (Projects/STM32WBA65I-DK1/Applications/ROT): OEMiROT_Boot with OEMIROT_DEV_MODE, plus OEMiROT_Appli_TrustZone. Provisioned with ROT_Provisioning/OEMiROT/provisioning.sh, RDP level 0 selected.
  • Option bytes before the incident (read with -ob displ): RDP 0xAA, TZEN 1, BOOT_LOCK 1, SECBOOTADD0 → 0x0C006000, SECWM1 sectors 0x0–0xF, WRP1A sectors 0x2–0xB, HDP1EN 1 with HDP1_PEND 0xA.
  • OEM2 key: programmed by provisioning.sh at RDP 0 with -c port=SWD mode=UR -hardRst -lockRDP2 0xFACEB00C 0xDEADDEAD (the example key from Keys/oem2_password.txt). The log reports "Lock RDP2 password successfully done". Afterwards FLASH_NSSR (0x40022020) read 0x00080000, so OEM2LOCK = 1. OEM1 was not provisioned (OEM1LOCK = 0).

What happened

  1. With RDP 0 and full debug access, we ran -c port=SWD mode=HOTPLUG -ob RDP=0xCC to test the RDP 2 lock and regression. The output showed "Unable to get core ID" and "Option Bytes Programming is not supported for Device: 0x0000", meaning the connection failed before any programming. From then on, the debugger can no longer reach the core. We can't tell from our logs exactly when RDP 2 took effect.

  2. In every connection mode (HOTPLUG, UR, NORMAL, POWERDOWN) and at SWD speeds of 8 MHz, 1 MHz and 100 kHz, the result is the same: Device ID 0x4B0 is read, then "Unable to get core ID" or "Cannot connect to access port 1". -ob displ is not possible.

  3. The device is not dead. On a scope, NRST is a normal 3.2 V and goes low only while the reset button is held. After reset, USART1 TX (PB12) sends the complete OEMiRoT boot log at 115200 baud: image validation passes and it jumps to the application, which prints its menu. So OEMiRoT and the non-secure application run normally after reset.

  4. RDP 2 regression attempts:

    • -c port=SWD mode=UR -hardRst -unlockRDP2 0xFACEB00C 0xDEADDEAD, also through ROT_Provisioning/OEMiROT/regression.sh
    • -c port=SWD mode=HOTPLUG [freq=1000] -unlockRDP2 0xFACEB00C 0xDEADDEAD

    Each attempt prints two libusb: warning [darwin_transfer_status] transfer error: timed out lines, then "INIT AP OK!" with -vb 3, then "Unlock RDP2 password successfully done". The automatic target power-on then fails ("Failed to Power ON the board"). After a full power-on reset (USB unplugged for 10 s, no other supply), the device is still not accessible, in HOTPLUG mode included, while the non-secure application is running.

  5. Windows GUI (CubeProgrammer 2.21.0): the OEM2 panel shows two key fields and an "OEM2 lock mechanism is …" status line. Entering 0xFACEB00C / 0xDEADDEAD gave an "invalid address" warning. [Confirm: what the status line said, and that no Lock button was pressed.]

Questions

  1. On STM32WBA65, is there a known condition where -unlockRDP2 reports success but the RDP 2 → 1 regression does not take effect? For example, a required reset type, the access port used, or behaviour that depends on TZEN or BOOT_LOCK.
  2. Is there a way to read the current RDP level or OEM2 lock state through the debug access port while the core AP is closed?
  3. What is the correct procedure for this regression on a NUCLEO-WBA65RI? Is a newer CubeProgrammer or ST-LINK firmware required?
  4. With OEM1 not provisioned and BOOT_LOCK = 1, is there any recovery route other than the OEM2 regression?

1 reply

sebsebAuthor
Associate
Nov 23, 2026 5:28 AM UTC

Found the problem:   STM32CubeProgrammer v2.21.0 could not unlockRDP2 whilst v2.19.0 can