Skip to main content
Visitor II
Question

STM32N647 Rev B, OTP124 write hangs via CubeProgrammer 2.23, Status shows Invalid afterwards.

Hi all,

I'm bringing up a custom board with an STM32N647I0H3Q (Rev B, device ID 0x486)
and cannot program the HSLV_VDDIO3 fuse (OTP124 bit 15) needed for the
MX25UM51245G octal NOR on XSPIM port 2 at 1.8 V.

Setup

  • STM32N647I0H3Q Rev B, custom board
  • VDDIO3 and flash VCC measured at 1.8 V, VDD/VDDIO4 at 3.3 V
  • BOOT1 pulled high 
  • ST-LINK V3MINIE, SWD 200 kHz, Hot plug, AP1
  • STM32CubeProgrammer v2.23.0 (GUI and CLI)

Symptoms
1. External loader MX25UM51245G_STM32N6570-NUCLEO: read at 0x70000000
   hangs at 0% / "Data read failed"; programming fails with
   "failed to download Sector[0]" (expected while HSLV_VDDIO3 = 0).
2. GUI OTP panel: entering OTP124 = 0x00008000 + Apply -> value returns
   to 0x00000000.
3. CLI: STM32_Programmer_CLI -c port=swd mode=HOTPLUG
   -otp write word=124 value=0x00008000
   hangs for >3 minutes (killed). Afterwards -otp displ word=124 shows
   Data124 = 0x00000000, Status124 = 0x00000001 ("Invalid").
   After a power cycle: Data124 = 0x00000000, Status124 = 0x00000000.

BSEC registers read over SWD (after the failed write, before power cycle)
- BSEC_SR      = 0x3400FF00  (NVSTATE = 0x0D, CLOSED)
- BSEC_OTPSR   = 0x00000012  (INIT_DONE, OTPNVIR; no BUSY, no PROGFAIL)
- BSEC_SPLOCK0..3 = 0xFFFFFFFF (sticky program lock on words 0..127)
- BSEC_HDPLSR  = 0x00000051  (HDPL1)
- [after a fresh power cycle: SPLOCK3 = ........ ]

Questions
1. Who sets SPLOCK on words 0..127 in development boot , the boot ROM or
   the CubeProgrammer OTP loader? Is there a sequence in which OTP124 is
   programmable over SWD on a CLOSED device?
2. Is programming HCONF1 (OTP124) supported through CubeProgrammer on the
   STM32N647, or must it be done from FSBL code at HDPL1?
3. Is a hang (instead of an error) of "-otp write" a known issue in
   v2.23.0?

Thanks!

1 reply

Aziz BRIGUI
ST Technical Moderator

Hi ​@BartKlaster,

I’ll try to answer some of your questions to the best of my knowledge:

1. Who sets SPLOCK on words 0..127 in development boot , the boot ROM or
   the CubeProgrammer OTP loader?

Just tried programming an OTP twice on an STM32N6-DK board, the second programming obviously failed but SPLOCK bits weren’t set, which means that the bits aren’t set in the “normal” failure case. From the reference manual (Page 215), the bits can be set by any secure privileged code.

Is there a sequence in which OTP124 is programmable over SWD on a CLOSED device?

What do you mean by CLOSED device, if you mean CLOSED_LOCKED (OEM FSBL authentication is mandatory), then yes, OTP124 is still programmable via SWD in development boot.

2. Is programming HCONF1 (OTP124) supported through CubeProgrammer on the
   STM32N647, or must it be done from FSBL code at HDPL1?

Yes, you can refer to this Wiki: How to program the OTP fuse bits in the STM32N6 | Community.

3. Is a hang (instead of an error) of "-otp write" a known issue in v2.23.0?

No, but since it doesn’t happen on Nucleo/DK boards, I suggest to first double check the power pins configuration compared to ST boards. I suggest also to try writing to an available to customer OTP to test if the fail is specific to HCONF1 or is generic to all OTPs.

PS: There’s a GUI issue we’re aware of but I don’t think it’s related to this case since it’s specific to setting OTPs bit by bit (Internal tracking number: CDM0062862), will be fixed in the next release.

Hope this helps,

Aziz

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.