Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20605

BASCOM-AVR Old versions : timer overflow and wait statement confuse me!? : REPLY

$
0
0
You are calling "wait 3" inside your ISR (Interrupt Service Routine). While processing an ISR the global interrupt is disabled. When the ISR takes longer as the timer overflow, the interrupt flag is set, but the ISR is not called (aka pending interrupt). After finishing the ISR the controller checks the interrupt flags and processes the pending interrupt, if nessesary. If the interrupt would not be disabled the HW stack would overflow very easy. It is a wise practice to keep the processing time of an ISR shorter than a new interrupt can occur.

Viewing all articles
Browse latest Browse all 20605

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>