View Single Post
Old 05-25-2009, 08:30 AM   #1391 (permalink)
MazdaMatt
Master EcoModder
 
Join Date: Jun 2008
Location: London, Ontario
Posts: 1,096

2k2Prot5 - '02 Mazda Protege5
90 day: 33.82 mpg (US)
Thanks: 0
Thanked 12 Times in 9 Posts
Just doing my post-weekend catchup read. Good work again, Paul. I'm glad that you're getting things sorted out now that you're using a few extra bits.

FYI, there are a few ways that interrupts can act if they overrun.
1. A new interrupt can interrupt the currently interrupting interrupt. Whe that one is done, it returns to the first one to complete it. If it gets interrupted before it is done, the same thing happens, if this continues we have a stack overflow and the cpu goes crazy.
2. A new interrupt can be completely ignored because the first one is not done.
3. A new interrupt can be queued up to run after the first. Only one can be queued up, so if you take too long, or repeatedly take a little too long, then you'll skip one.

It all depends on how you have set up your interrupt handlers and masks. Ideally, though... you arrange the code so that in the worst case, you aren't using the full available time... the system has to do other things too, remember.

Do you have your ADC reading and/or filtering happening during interrupts as well, or polled?

  Reply With Quote