This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TI Tiva C Launchpad return from interrupt

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

Parents
  • 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?

Reply
  • 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?

Children