lpcware

LPC1768 DeepPowerDown recovery

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by DavidKiryat8 on Wed Feb 10 02:34:45 MST 2016
My scenario is:
1) Enter DeepPowerDown mode
2) Wake every minute by way of the RTC
3) Check a GPIO pin and either go back to sleep or reset.

Using the PowerDown mode instead, this works.

I think that the GPIO pin may not be read correctly when woke up.
I read in one place in the user manual that GPIO is always enabled by I even re-enabled it in PCONP.

After DeepPowerDown mode, what steps must I perform in order to read a GPIO pin?


  // Turn Off PLL0 because of errata declared bug that leaves it on
  if (state.bPLL0_Running){
    pll_LPC_DisablePLL0();
    pll_LPC_DisablePLL1();
  }
  // Set CPU to use oscillator and not crystal
  pll_LPC_UseOscillator();
start_sleep:
  // Sleep
  CLKPWR_DeepPowerDown(); // no ram
  // Do we really need to wake up or can we just go back to sleep?
  LPC_SC->PCONP |= CLKPWR_PCONP_PCGPIO;
  if (!EXT_POWER_ON){
  goto start_sleep;
  }


Thanks

Outcomes