Skip to main content
Associate II
August 12, 2026
Solved

STM32N657 application stops working when TIM update interrupt is enabled

  • August 12, 2026
  • 2 replies
  • 37 views

Hello,

I am using an NUCLEO-N657X0-Q (STM32N657) and developing an application using the FSBL + XIP application structure.

 

Development Environment

  • STM32CubeIDE: 2.2.0
  • STM32CubeMX: 6.18.1
  • STM32CubeProgrammer: 2.22.0

 

The application is stored in external Flash and executed in XIP mode. I can successfully program the external Flash and enter/run the Appli project through the debugger.

The application works normally as long as I do not enable the timer update interrupt.

However, when I enable a TIM update interrupt in the Appli project, the application stops working when the interrupt occurs.

My project structure is:

FSBL
└─ Initializes the external Flash and starts the XIP application

Appli
└─ Executed from external Flash
└─ TIM update interrupt enabled here

The timer itself is initialized in the Appli project.

The interrupt handler is also located in the Appli project's stm32n6xx_it.c:

extern TIM_HandleTypeDef htim1;

void TIM1_UP_IRQHandler(void)
{
HAL_TIM_IRQHandler(&htim1);
}

and the callback is:

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
if (htim->Instance == TIM1)
{
/* periodic processing */
}
}

Without HAL_TIM_Base_Start_IT(), the XIP application runs normally.

With the timer update interrupt enabled, the application no longer operates correctly once the interrupt is enabled in CubeMX

I checked the STM32CubeN6 example:

Projects/NUCLEO-N657X0-Q/Examples/TIM/TIM_TimeBase

but this example uses a different project structure and does not demonstrate a TIM update interrupt inside an Appli project launched by an FSBL in an FSBL + XIP configuration.

My questions are:

  1. Is there an STM32N6 example that uses interrupts, particularly a TIM update interrupt, inside the Appli project of an FSBL + XIP configuration?
  2. Are there any additional RIF / TrustZone / NVIC interrupt attribution settings required for TIM interrupts when they are used from the XIP Appli project?
  3. Is there any additional initialization required before enabling peripheral interrupts after the FSBL transfers control to the Appli project?

The XIP application itself is working correctly, so the problem appears specifically when the peripheral interrupt is enabled/generated.

Any reference project or guidance for using peripheral interrupts in an STM32N6 FSBL + XIP Appli configuration would be appreciated.

Thank you.

Best answer by Student_0726

Hello ​@Francois VILMAIN ,

Thank you very much for your quick response.
 

I have already confirmed that the timer interrupt works correctly when implemented in the FSBL.

I also tested an older project that I had created previously, and the timer interrupt works correctly there as well.

So, I suspect that I may have missed or incorrectly configured something in my current project, although I have not yet identified the exact cause.
 

If I am able to determine the cause, I will post an update here with the details.
 

Thank you.

2 replies

Francois VILMAIN
ST Employee
August 13, 2026

Hello,

regarding your question 1. there is the following example illustrating how to generate the systick from the TIM update interrupt:
...\Projects\NUCLEO-N657X0-Q\Examples\HAL\HAL_TimeBase_TIM

I hope this will help.
 

Student_0726AuthorBest answer
Associate II
August 13, 2026

Hello ​@Francois VILMAIN ,

Thank you very much for your quick response.
 

I have already confirmed that the timer interrupt works correctly when implemented in the FSBL.

I also tested an older project that I had created previously, and the timer interrupt works correctly there as well.

So, I suspect that I may have missed or incorrectly configured something in my current project, although I have not yet identified the exact cause.
 

If I am able to determine the cause, I will post an update here with the details.
 

Thank you.