Callbacks tested, awaking from deep sleep tested.
Waking up from deep sleep looks amazing for me. It really works.
Now it's time to set up runtime system checks, but this is some kind of black magic for me.
Look in documentation:
I-Locked. Kernel locked and regular interrupt sources disabled. I-Class APIs are invokable from this state.
now find I-Class:
"I", I-Class APIs are invokable only from the I-Locked or S-Locked states. See System States.
Hmm... what the differences between invokable and non invokable code? What instructions (or coding technique, or statements) are forbidden in invokable code?