Interrupts not firing after moving interrupt vector to new address?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interrupts not firing after moving interrupt vector to new address?

Jump to solution
1,296 Views
mkdomenico
Contributor II

Hello,

in the project I am working on, we have to use a bootloader application, whose interrupt vector is located at address 0x0000. Therefore, the main applications interrupt vector has been moved to another address X (let's say 0x1000). The bootloader starts properly, does its bootloader stuff, then launches the application.

When reaching the application part, the VTOR address as indicated in the System Control Block in IAR Embedded Workbench ARM 7.70.2 is displayed as being positioned at 0x1000. A look at the memory at 0x1000 confirms that it is properly located at this address.

However, when running, none of the interrupts seems to fire. The interrupt flags remain high, but none of the breakpoints set in the interrupt functions are reached. The interrupts are globally allowed (in my case: __enable_interrupts()) and configured.

When running alone, without a bootloader and with an interrupt vector located at 0x0000, my application works fine.

Could you please help me locate what may cause this issue?

Regards

0 Kudos
Reply
1 Solution
1,093 Views
mkdomenico
Contributor II

It turned out that the bootloader code was disabling any interrupts with the following Assembler instruction:

cpsid if

To reenable interrupts and fast interrupts, the following command was required:

cpsie if

Thus: problem solved.

View solution in original post

0 Kudos
Reply
1 Reply
1,094 Views
mkdomenico
Contributor II

It turned out that the bootloader code was disabling any interrupts with the following Assembler instruction:

cpsid if

To reenable interrupts and fast interrupts, the following command was required:

cpsie if

Thus: problem solved.

0 Kudos
Reply