Don't muck about with stack pointers.Restructure your code
get the ISR to set a flagtest the flag in the main code
Post your code so we can see what "devils" you are fighting ...
I have a rule of thumb - if something sounds like it is the wrong thing to do, it probably is the wrong thing to do.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16