Skip to main content
Associate
July 20, 2026
Question

STM32N6: Black screen after HAL_NVIC_SystemReset() — FSBL not booting, works fine after NRST/power cycle

  • July 20, 2026
  • 2 replies
  • 52 views

STM32N6: Black screen after HAL_NVIC_SystemReset() — FSBL not booting, works fine after NRST/power cycle

Gövde:

Hello,

I have a bootloader (FSBL) and a separate application on anSTM32N645L0, running from external XSPI NOR flash MX25UM25645GXDI00 in memory-mapped XIP mode (Octal DTR).

Setup:

  • FSBL configures the external flash into Octal DTR mode (volatile CR) at every boot and shows update/bootloader graphics on the display
  • The application runs its own graphics
  • To enter bootloader mode from the application, call HAL_NVIC_SystemReset()

Problem:
After HAL_NVIC_SystemReset(), the device stays on a black screen — the FSBL graphics never appear. However, if I reset via the NRST button or a full power cycle, everything boots normally.

What I suspect:
Since the N6 is flashless, BootROM must read the FSBL from external flash in standard SPI mode. My theory is that after a software reset the flash chip stays in Octal DTR mode (it doesn't lose power), so BootROM cannot read the FSBL at all.

Questions:

  1. Is the correct fix to send the flash software reset sequence (0x66/0x99 in the current protocol) and de-init the XSPI before calling HAL_NVIC_SystemReset()? Can you share an example function?
  2. Does BootROM on the N6 perform any flash reset itself, or does it strictly assume the flash is in its power-on state?

Toolchain: [STM32CubeIDE 1.19  / CubeMX ], HAL version [x.y], board: [custom / STM32N6570-DK]

Thanks!

2 replies

ST Technical Moderator
July 20, 2026

Hello ​@makturan 

The issue may be related to the errata 2.2.18 or 2.2.22 described in ES0620 Rev4

Please try to apply the workarounds described in the errata sheet. 

Please refer to the post below also:

STM32N657-DK: BootROM hangs after reset if XSPI1 has been initialized (power cycle required) | Comm…

 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
makturanAuthor
Associate
July 21, 2026

Hello,

 

I tried to apply the workarounds described in the errata sheet.

 

I added this function to my application code, but the result is the same. It continues to run using power cycling.

 

void reboot()

{

__disable_irq();

 

uint8_t retVal;

retVal = HAL_UART_DeInit(&huart4);

if (retVal != HAL_OK)

{

return;

}

 

RCC->CCIPR6 = 0;

RCC->CCIPR7 = 0x200;

RCC->CCIPR8 = 0;

RCC->CCIPR13 = 0;

 

/*

* Force completion of RCC writes before issuing the reset.

*

* Volatile readback prevents the compiler and bus fabric from leaving the

* final RCC write pending.

*/

(void)RCC->CCIPR6;

(void)RCC->CCIPR7;

(void)RCC->CCIPR8;

(void)RCC->CCIPR13;

 

__DSB();

__ISB();

 

/*

* Do not call application code, HAL functions, or external-flash-resident

* functions between the workaround and NVIC_SystemReset().

*/

NVIC_SystemReset();

 

/* NVIC_SystemReset() should never return. */

for (;;)

{

__NOP();

}

}

ST Technical Moderator
July 21, 2026

Hello ​@makturan 

You should apply exactly the same code as in the thread below:

STM32N657-DK: BootROM hangs after reset if XSPI1 has been initialized (power cycle required) | Comm…

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
ST Technical Moderator
July 21, 2026

Hello ​@makturan 

Could you please share your code ? The main.c of your FSBL code.  

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om