I'm trying to understand how to return to a specific place when coming out of a INT.
Specifically, when I receive a command serially and trip the RX_INT, I need to abort the current operation in the main body of the program and restart with the newly commanded mode.
I have looked at DT_INTS and other advise on interrupts, and still don't understand what I would need to change to get this to happen.
The code works otherwise and gathers the command from the serial line, its just that I have to wait for the current operation to complete for it to be recognized and acted upon.
The main code is driving patterns on 8 LEDS with SPWM_INT and it takes 10 or 20 seconds for it to get around to the place where it looks at the new mode. This also applies when I change the mode with a switch input. I have to wait until the operation is finished to get to the part where I look for the input.
I don't believe that I can just mess with the RetAddr variable in DT_INTS and have that work without other steps. If I have a GOTO in the ISR, then I would likely corrupt the RETURN. I could just sprinkle switch and comm checks all over the place looking for flags, but that seems mediocre. Any advise?
Thanks
Mark
Bookmarks