Skip to main content
Associate
Solved

STM32N657: after programming OTP19 dev_boot_port/dev_boot_pin to relocate BOOT1 to PN10, device no longer enters development boot

Hello ST Team,

We have a custom STM32N657Z0H3Q board on which BOOT1 is routed to PN10 instead of the default PA6.

To configure the Boot ROM to sample BOOT1 from PN10, we programmed OTP Word 19 (BOOTROM_CONFIG_10) as described in RM0486 Rev. 4, Section 5, Table 18:

  • dev_boot_port [24:21] = 9 → Bank N (PN) → 9 << 21 = 0x01200000
  • dev_boot_pin [28:25] = 10 → Pin 10 → 10 << 25 = 0x14000000
  • OTP19 = 0x15200000

Steps Followed

  1. Before programming, we read OTP through SWD. OTP19 was 0x00000000, with status 0x00000000, indicating that it was unprogrammed and not write-locked. SWD/ST-LINK access was working normally.
  2. We programmed OTP19 with 0x15200000 using STM32CubeProgrammer v2.23.0, without enabling the lock option. The tool reported:
    • "OTP words programming done successfully"
    •  

  3. After the next power cycle/reboot, the device no longer enters Development Boot. Instead, it boots from Flash, and our FSBL and application start running normally. SWD/debug access is no longer available.

Same Issue Already Reported

After encountering this issue, we found an existing ST Community topic describing what appears to be the same problem on a different custom board:

ST Community – Unable to connect to STM32N657 after remapping BOOT1 from PA6 to PN10

The reported case involves the same MCU, the same PA6 → PN10 remapping, the same OTP19 value 0x15200000, and the same loss of SWD access after programming OTP19.

Questions

Q1. Is OTP19 = 0x15200000 the correct value for selecting PN10 as the BOOT1 source?

Specifically, are the following field values correct?

  • dev_boot_port = 9 → Bank N (PN)
  • dev_boot_pin = 10 → PN10

Q2. Is any specific power-cycle or reset sequence required after programming OTP19 for the new BOOT1 pin assignment to take effect?

Q3. Is there any recovery procedure to regain debug access on a device where OTP19 has already been programmed to select a BOOT1 pin that cannot be sampled high?

We understand that OTP bits cannot be cleared once programmed.

Request for Confirmation

We have already lost one board due to this issue, so we would like to avoid risking another board without a confirmed procedure.

Could you please verify this configuration on your side and confirm:

  1. Whether PN10 can be used as BOOT1 on the STM32N657Z0H3Q package.
  2. Whether OTP19 = 0x15200000 is the correct configuration.
  3. The exact programming and power-cycle/reset sequence that should be followed.
  4. Whether there is any recovery method for the board that has already been programmed.
  5. If PN10 is not usable as BOOT1 on this package, please confirm this so that we can avoid programming the same configuration on another board.

A confirmed working procedure, or confirmation that PN10 cannot be used as BOOT1 on this package, would help us proceed with the board bring-up safely.

Since the same issue has already been reported in the ST Community and remains unresolved, we would greatly appreciate your prompt assistance.

 

Best regards,
Richu

mƎALLEm
mƎALLEmBest answer
ST Technical Moderator

Hello and sorry for the late delay,

Our answer:

Here is a preliminary information while waiting for doc update.

UM3234/DS14791 and RM0486 (will be updated later) will be update with this content (approximate content for information only):

The BootROM is the first code executed after any system reset. The boot mode is determined by BOOT0 and BOOT1 pins, one OTP word (flash source selection), and one TAMP backup register.

• BOOT0 is a dedicated pin latched upon reset release

• BOOT1 is a non-dedicated boot pin. Its value can be sourced either from the default BOOT1 pin or from another GPIO from VDD power domain selected through the OTP system configuration (refer next table).

By default, PA6 is assigned as the BOOT1 input and is managed through the alternate function mechanism together with the SYSCFG_BOOTR register.

When another GPIO is selected as the BOOT1 source through the corresponding OTP configuration, the BOOT1 function on PA6 is masked and the input state of the selected GPIO is used instead and its pull-down default state remain enabled. 

Table1 BOOT1 available pins (package-specific pin availability not considered) 

PORTA

PORTB

PORTC

PORTD

PORTE

PORTF

PORTG

PORTH

PORTN

PORTO

PORTP

PORTQ

PA0

PB0

-

PD0

PE0

PF0

PG0

PH0

-

-

-

PQ0

PA1

PB1

-

PD1

PE1

PF1

PG1

PH1

-

-

-

PQ1

PA2

PB2

-

PD2

PE2

PF2

PG2

-

-

-

-

PQ2

PA3

PB3

-

PD3

PE3

PF3

PG3

PH3

-

-

-

PQ3

PA4

PB4

-

PD4

-

PF4

PG4

PH4

-

-

-

PQ4

PA5

PB5

-

PD5

PE5

PF5

PG5

PH5

-

-

-

PQ5

PA6(1)

PB6

-

PD6

PE6

PF6

PG6

PH6

-

-

-

PQ6

PA7

PB7

-

PD7

PE7

PF7

PG7

PH7

-

-

-

PQ7

PA8

PB8

-

PD8

PE8

PF8

PG8

PH8

-

-

-

-

PA9

PB9

-

PD9

PE9

PF9

PG9

-

-

-

-

-

PA10

PB10

-

PD10

PE10

PF10

PG10

-

-

-

-

-

PA11

PB11

-

PD11

PE11

PF11

PG11

-

-

-

-

-

PA12

PB12

-

PD12

PE12

PF12

PG12

-

-

-

-

-

PA13

PB13

PC13

PD13

PE13

PF13

PG13

-

-

-

-

-

PA14

PB14

PC14

PD14

PE14

PF14

PG14

-

-

-

-

-

PA15

PB15

PC15

PD15

PE15

PF15

PG15

-

-

-

-

-

 

(1) Default BOOT1 pin

Hope that answers your question.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.

4 replies

mƎALLEm
ST Technical Moderator

Hello,

Your question has been raised internally for review over the internal ticket CDM0065901 & CDM0065903  (not accessible by the community users). I’ll get back to you for any feedback.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Associate

Any update on this.

mƎALLEm
ST Technical Moderator

Hi,

The team is working on it. We will get back to you as soon as we have any feedback or answer.

So please be patient!

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.