We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
I was wondering if there was a way to use an interrupt without storing/resting the states of the microcontroller that were present before the interrupt occurred? I am using an edge interrupt with NVIC_EN0_INT30 on the Tiva C Launchpad. I would like for the interrupt to run its routine when one of the buttons on the launchpad is pressed, which changes some of the program variable values and return to the beginning of the main program once the interrupt routine has finished. Any help with this would be greatly appreciated.
Thanks,
Steve
Sounds like a bad idea - interrupts are expected to return to the original location with all state maintained. The compiler code generation is based on the compiler knowing the contents of every register used.
Why can't the main loop just look at a volatile variable that you set from the interrupt, and then decide what to do?
But an all-too-common beginner's misconception.