cancel
Showing results for 
Search instead for 
Did you mean: 

Find out if interrupt has occurred?

arnold_w
Senior II
Posted on August 15, 2017 at 10:03

I am working with the stm32f4 Discovery Development Board and put simply, there's a while loop (with some conditions) in my main() function. Is it possible for the code inside the while-loop to find out it has been interrupted by an interrupt? Of course, I can use a global volatile boolean variable called intOccurred and set it to true in all interrupt handlers, but is there a more generic way to detect it?

1 REPLY 1
Posted on August 15, 2017 at 13:23

No.

Execution of ISR clears the pending flag (NVIC_ISPRx) by hardware - otherwise the ISR would be executed again and again...

JW