Software Interrupt
pjv
Posts: 1,903
Hi All;
Does anyone know of a method to invoke an interrupt from software?
Preferably some trick that does not use a write to an I/O pin or messing with the RTCC?
Peter (pjv)
·
Does anyone know of a method to invoke an interrupt from software?
Preferably some trick that does not use a write to an I/O pin or messing with the RTCC?
Peter (pjv)
·
Comments
Jim
My use for it is in my RTOS; its's nice to get a copy of the state of the processor without affecting that state of the very registers that need saving.
My current approach is somewhat unelegant, and I would like to improve and shorten it.
I know that in both the SX28 and SX52 and interrupt can be forced if one has an RB bit enabled for MULTI-WAKEUP, and then in software setting (or as the case may be, clearing) that bit. But this gives new complications with interrupt determinism if one also still requires response to the RTCC roll-over interrupt.
Oh well....will have to write some code on iterrupt entry to take care of that. I just hate these work-arounds.
As far as pushing stuff onto the stacks, and popping them on return, this can also be done while NOT in interrupt. In fact, that is the basis of my RTOS. Just push the state you want onto the stacks, and then execute an RETI to cause the processor to assume that state. Works great, but has some potential conflicts with SXSKey debugging.
Peter