Go Down

Topic: Interrupt execution method (Read 879 times) previous topic - next topic


Hello again :)

I using a 328p to read two sensor inputs connected to interrupts. The controller takes in about 6000 pulses a second, roughly 6Hz on both interrupts. The interrupt triggers a flag value, but they don't trigger the same value, for ex if sense1() and sense2() are the functions, they don't change the flag x together, it's x and y separately.
My question is, there are times when both inputs are fired together, or are rendered HIGH together.
Do they still successfully run the function, or will some kind of conflict arise since two interrupts are fired together ?

Thanks :)


If two interrupts are pending at the same time, the mcu will service the one with highest priority. When that ISR has completed, if the other interrupt is still pending (that is, the reason for the interrupt hasn't gone away), then it will service the other one. So both will get serviced.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


That's good to know.


hey use this link its very usefull for using interrupt.

Go Up