This patch fixes a corruption of the stack pointer and several registers in any AVR interrupt with non-empty stack frame. Previously, the callee-saved registers were popped before restoring the stack pointer, causing the pointer math to use the wrong base value while also corrupting the caller's register. This change fixes the code to restore the stack pointer last before exiting the interrupt service routine.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This is a great patch, thanks @couchand!
LGTM - do you need someone to commit this for you?