6 years, 6 months ago.

How to revert back to normal mode from DeepPowerDown?

Did i miss out something in this program?

#include "mbed.h"
#include "PowerControl/PowerControl.h"
#include "PowerControl/EthernetPowerControl.h"

DigitalOut led1 (LED1);
int a;
int main()
    while(1) {
        if(a == 4){ DeepPowerDown(); }
        a = a + 1;
        led1 = !led1;
Comment on this question

1 Answer

4 years, 8 months ago.

[This is an old thread, but in case anyone comes here:] "The LPC17xx can wake up from Deep power-down mode via the RESET pin or an alarm match event of the RTC" (datasheet section There is an obvious third option not listed here, which is power on reset (POR). All reset the LPC1768 and then you check the flag(s) to see if it is an RTC alarm rather than Power On Reset (POR) or RESET pin pulse. As such, it will start your code from the beginning each time. Therefore you will never pass the a == 4 situation.

You need to log in to post a question