Odd Interrupt Behaviour - One Int calls two ISRs
Posted: Thu Jun 12, 2025 10:17 am
I would appriecate some input on the attached FC.
I have created two Custom Interrupts that use ECCP1 of a PIC 18F4680. One is used to measure an RPM pulse, the Other measures a SPEED Pulse.
Importantly, they will only get enabled individually.
(long story short, I cant use CCP1 and ECCP1 for individual signals as there is a conflict with ECAN and CCP that I can resolve yet.)
I'm not concearned about switching bweteen two pulse streams into a single ECCP1, hardware is handling that.
In software I will enable one Interupt, once is has sampled its signal, it will be stopped and then I'll change to the second and sample that.
But
Odd Behaviour, I have two interrupts setup and the associated ISR (Interrupt service Rountines).
However when testing with just a single Interupt, and the other explicitly Disabled, both ISR's seem to be getting run?
I see 'COUNT' values unique to each ISR getting updated.
How can this be happening, nothing should be calling the second ISR? This one has me confused!
I have created two Custom Interrupts that use ECCP1 of a PIC 18F4680. One is used to measure an RPM pulse, the Other measures a SPEED Pulse.
Importantly, they will only get enabled individually.
(long story short, I cant use CCP1 and ECCP1 for individual signals as there is a conflict with ECAN and CCP that I can resolve yet.)
I'm not concearned about switching bweteen two pulse streams into a single ECCP1, hardware is handling that.
In software I will enable one Interupt, once is has sampled its signal, it will be stopped and then I'll change to the second and sample that.
But
Odd Behaviour, I have two interrupts setup and the associated ISR (Interrupt service Rountines).
However when testing with just a single Interupt, and the other explicitly Disabled, both ISR's seem to be getting run?
I see 'COUNT' values unique to each ISR getting updated.
How can this be happening, nothing should be calling the second ISR? This one has me confused!