Skip to main content
SSaiy.1
Associate III
September 4, 2023
Question

Facing issues with interrupts

  • September 4, 2023
  • 3 replies
  • 1783 views

Hi,

I face some issue with the interrupts of STM32L452RET6P. I have two codes running in the controller one is a custom bootloader code and other is an application code which stored in flash memory. when the device get reset it will run the custom bootloader application which is at 0x08000000. It uses TIMER6 and UART2 in interrupts with 1 and 2 priority respectively. As per the flow if there is no uart interrupts triggered with in the defined time the device will jump to the application code which is at a different flash location. This works fine for me, and the application code also starts running,

But the interrupts are not triggering, I use RTC wakeup, UART2, TIMER6 and EXTI interrupts in the application code with priorities 1,2,3 and 4 respectively, my code is stuck in the while(1). Issue is only with interrupts, I checked with and LED Blink code it works fine. 

what may be the reason for this issue?

This topic has been closed for replies.

3 replies

Ayoub Cheggari
Senior
September 4, 2023

Hi,

Before jumping to the application,  are you disabling interrupts? If so you need to re-enable them again.

After jumping to the application, are you calling the systeminit function again? It's recommended not to do that and work with Bootloader context if the systeminit content is the same.

Ayoub

SSaiy.1
SSaiy.1Author
Associate III
September 4, 2023

I  haven't disabled the interrupts first, but I tried it now disabling in the bootloader and re-enabled it in the application code but still facing the issue, I also reset all the peripherals before jumping.

I haven't used the systeminit function in both the codes.

Piranha
Principal III
September 7, 2023

The VTOR register is not set to a proper vector table address.

SSaiy.1
SSaiy.1Author
Associate III
September 12, 2023

If the vtor is not set the jump won't work I think.

 

Tesla DeLorean
Guru
September 12, 2023

You shouldn't transfer control at some nested level within the NVIC, so within an IRQ Handler or related call-back, or RTOS at some protection level.

So if you're doing things from EXTI or USART IRQ, expect things to break.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..