I'm using PUSHALL/POPALL, because of possible side effects with Interrupts.
No one ever knows exactly, what state the micro is, if an interrupt occurs! So it is the "safe mode" to save and after restore all registers in isr.
This is one possible reason of your micro error you described.
Another may be supply voltage and brown out detection!
best, michael
↧