ipunished
Junior Member level 3

- Joined
- Mar 15, 2011
- Messages
- 31
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- United Kingdom
- Activity points
- 1,504
I understand that when an interrupt occurs the micro controller returns to where it left from..
but my interrupt consists of a stop switch, i.e. after the iterrupt I want it to stop everything..
my code consists of running a motor in a while(1) loop.. after the hardware interrupt is pressed it should stop everything and then again wait for the start button to be pressed..
i thought of calling the start button function within the ISR, but that will leave the stack uncleared.
any way to get around this?
but my interrupt consists of a stop switch, i.e. after the iterrupt I want it to stop everything..
my code consists of running a motor in a while(1) loop.. after the hardware interrupt is pressed it should stop everything and then again wait for the start button to be pressed..
i thought of calling the start button function within the ISR, but that will leave the stack uncleared.
any way to get around this?