handle reset  after Wakeup from deep power down?

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by MaDeh on Tue Aug 20 08:03:44 MST 2013
I'm working on a battery powered application.
To save as much energy as possible the LPC1833 is set to deep power down from time to time.
The controller can be woken up with an Wakeup0 interrupt.
Everything works fine instead the case that after waking up from deep power down mode the Controller resets and the whole initialisation routine will be executed again.
This takes to much time and is not required.
For this I need to differentiate the last interrup befor the reset occures.

Now my question:
Is it possible to figure out if the last reset was due to a watchdog, wakeup interrup or a POR.
I tried it by checking out the Event Status Register of the Event Router(if Wakeup was set or not) but it seems tobe that all bits are set to 1 after an reset.
Is there an usual way to figure out the last reset reason.    
Hopfully somebody is able to help me.

thanks in advanced and with best regards, marcus