Content originally posted in LPCWare by DavidKiryat8 on Thu Feb 18 06:34:51 MST 2016
To recap my scenario.
1) Put the LPC1768 into Deep power-down mode after a power outage.
2) Wake up every minute and check the external power pin.
3) If still no external power go back to sleep otherwise reset.
If I disable the RTC then the LPC1768 goes to sleep till reset as I would expect but I have no way to wake my board back up.
If I leave the RTC minute interrupt, the board stays awake for a few seconds and then goes back to sleep every minute or so. The time awake is not logical.
I need more information of what state the CPU is when the RTC wakes it up.
1) How long does it take to wake up? I am using the IRC clock before going to sleep.
2) In order to read the GPIO pin P2.12 in the RTC interrupt what do I need to do?
3) What do I need to do before putting the LPC1768 back to sleep.
Do I need to set the pin directions and pull ups, clock?
Could anyone test a code snippet and send me?
Thanks