Skip to main content
jamessteward
Associate II
May 28, 2009
Question

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

  • May 28, 2009
  • 2 replies
  • 837 views
Posted on May 28, 2009 at 12:37

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

    This topic has been closed for replies.

    2 replies

    joseph239955
    Visitor II
    May 17, 2011
    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.

    jamessteward
    Associate II
    May 17, 2011
    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.