This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Interrupt during ISR

Hi,

we use the GPIOTE to get informed if the value of a GPIO pin gets from hi to low.

If this happens, the GPIOTE event handler will be called.

What will happen, if the value of the GPIO pin gets back to hi and again to low during the process of the GPIOTE event handler?

Parents
  • If the condition for the interrupt is true again while processing the same interrupt, then the interrupt will be pended to NVIC. Read more about the NVIC pend register here

    Since there is only one pending bit per interrupt source, if this condition is true more than once while (or before) processing that interrupt, then the new interrupt will set the pending bit on an already set bit which effectively means the last interrupt(s) which were pended are lost.

    But if only one interrupt of the same source happen during processing, then it will not be lost as it is saved in the pended state of NVIC register.

  • that depends .. the second interrupt in the pended state will be processed immediately after the first one only if there are no other interrupts with higher priority pended. Else the higher priority interrupts will be processed first and then when they are completed then the second one which we were talking about would be be cleared from pended state and processed

Reply Children
No Data
Related