As it turned out the Interrupt status appears to be one even when there wasn't any cause for an interrupt to occur. The question remains though, how do I detect the wakeup from deep sleep cause?
I just found the following code in blegm.c:
else if(mia_isResetReasonTimedWake()) // this function is not working (button press reset also return TRUE
Also notice that I'm using SDK 2.2.0 by now. To refine the question further, what I'm looking for is a separation
between GPIO based wakeup from deep sleep and wakeup from timed deep sleep. I don't like the ideas I have to achieve that, i.e. to measure the time since sleep start and guess whether we should behave as if we came from timed wakeup, or to develop an external circuit that stores the GPIO state during bootup.
I hope you can help.
I'm no expert, but we are using:
if ( mia_isResetReasonTimedWake() )
if ( mia_isResetReasonPor() )