cancel
Showing results for 
Search instead for 
Did you mean: 

Missed interrupt after __SETPRIMASK(); code; __RESETPRIMASK();

jamessteward
Associate II
Posted on May 28, 2009 at 12:37

Missed interrupt after __SETPRIMASK(); code; __RESETPRIMASK();

2 REPLIES 2
jamessteward
Associate II
Posted on May 17, 2011 at 13:13

Hi All,

I *think* what is happening is that occasionally an external interrupt occurs after global interrupts are disabled and before they are re enabled. Once they are re enabled, although the interrupt source is still active (low), the IRQ doesn't happen when interrupts are re enabled.

I have googled, searched this list, read the ARM doco and the STM32 doco on the NVIC topics, but found nothing about this scenario.

Hase anyone got any advice on this?

Cheers,

James.

joseph239955
Associate II
Posted on May 17, 2011 at 13:13

This is unlikely the cause of missing interrupt (Unless the functions do more then just setting and clearing PRIMASK).

While PRIMASK is set, a interrupt request should cause the interrupt pending state to be set and it will remain set even the request is dropped. After you clear PRIMASK, the interrupt request can then be processed.