I am working on a project that uses an interrupt-on-change from a pin, as well as a timer interrupt.
The IOC comes from an infra red remote transmitter. As long as the timer interrupt is disabled, it works as designed; when the remote is activated, the interrupt service routine is called and after servicing things return to a main loop.
But when the timer interrupt is enabled, and a remote control transmission interrupt is generated, the program seems to crash and restarts.
And it remains in that state: crash, restart, turn off LED, generate an IOC (without any IR signal!), turn on LED, crash, restart, turn off LED, ad infinitum.
The attached test routine turns on a LED in the IOC service routine (called FallingEdge) macro, and, with the timer int enabled, crashes and restarts (LED is turned off), then after the 1s delay, another IOC interrupt appears to be generated with no input at all!
I am at a loss. Anyone seen this before? FC9, PIC16F15355.
Jan Didden
Timer interrupt crashes processor?
-
- Posts: 82
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 17, 2020 3:16 pm
- Has thanked: 20 times
- Been thanked: 12 times
Timer interrupt crashes processor?
- Attachments
-
- NEC Own Timer PIC lean isr.fcfx
- (16.6 KiB) Downloaded 255 times
-
- Matrix Staff
- Posts: 1465
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 204 times
- Been thanked: 347 times
Re: Timer interrupt crashes processor?
Sounds like a strange problem. Could it be a watchdog timer issue?