From bf91f7f506ac0fae6d95e05cb996aea8a39bfa7b Mon Sep 17 00:00:00 2001 From: Ben Hencke Date: Sun, 6 Nov 2016 12:46:47 -0800 Subject: [PATCH] add check for kernel interupt handler only call the original kernel for the interrupts it knows how to handle (otherwise it assumes TMR0IF was triggered) --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 758eb07..be7b908 100644 --- a/main.c +++ b/main.c @@ -37,8 +37,11 @@ void interrupt high_priority interrupt_at_high_vector(void) } /***** End User Code for high priority interrupts *****/ - //this ASM call must end the function (needed for kernel compliance) - asm("goto 0x2B08"); + //only call the original kernel for the interrupts it knows how to handle (otherwise it assumes TMR0IF was triggered) + if (TMR0IF || INT0IF) { + //this ASM call must end the function (needed for kernel compliance) + asm("goto 0x2B08"); + } } // LOW VECTOR