Interrupts not firing after moving interrupt vector to new address?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Interrupts not firing after moving interrupt vector to new address?

跳至解决方案
1,295 次查看
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 项奖励
回复
1 解答
1,092 次查看
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 项奖励
回复
1 回复
1,093 次查看
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 项奖励
回复