Deep Power Down ok! But can't wake up!

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Deep Power Down ok! But can't wake up!

342 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by broque on Thu Oct 24 11:40:14 MST 2013
I am at the end of a project and now i cannot finish it because of low power mode issue (LPC1112/202, IRC Oscillator, No PLL, Reset pin (0.0) and wake up pin (1.4) are externally pulled up.)

I can enter deep power down mode but after wakeup (by WAKEUP PIN) cpu does not reset itself.


Stages:

[list=1]
  [*]Power On
  [*]Prints "Starting normal..."
  [*]Prints "Tick:1" //after wait 1 seconds
  [*]Prints "Tick:2" //after wait 1 seconds
  [*]Prints "Tick:3" //after wait 1 seconds
  [*]Prints "ENTERING POWER DOWN MODE!\nBYE"
  [*]Prints 0x00 and then nothing been happening
  [*]i pull Power pin low and then high, nothing happening (it is in power down-mode so reset pin does not work)
  [*]i pull WAKEUP pin low and then high, nothing happening
  [*]i pull Power pin low and then high, system resets and Prints "Starting from deep down..."
[/list]

Why when i pull WAKEUP pin low and then high and system does not restart itself? (as mentioned in user manual and AN11027)

My code here:

#include "LPC11xx.h"                            /* LPC11xx definitions        */
#include "stdio.h"
#include "string.h" 
#include "uart.h"
#include "sysTime.h"

#define DPDEN (1<<1)
#define DPDFLAG (1<<11)
#define IS_WAKE_FROM_DDOWN ( ( LPC_PMU->PCON & DPDFLAG ) == DPDFLAG )
    
void deep_power_down(){
printf("ENTERING POWER DOWN MODE!\n");
printf("BYE\n");

// Specify DPDEN to power control register
LPC_PMU->PCON = DPDEN;

// Specify Deep Power-down mode before entering mode
SCB->SCR |= (1<<2);

// Enable IRC before deep power-down mode
LPC_SYSCON->PDRUNCFG &= ~( (1<<0) | (1<<1) );
// Enter deep power-down mode
__WFI();
return;
}

int main(void)
{    
int tick; 
SystemInit();
UARTInit(19200); // Initialize serial port
if ( IS_WAKE_FROM_DDOWN ){
LPC_PMU->PCON |= DPDFLAG;
printf("Starting from deep down...\n");
} else {
printf("Starting normal...\n");
}
tick = 0;
while(1)
{  
tick++;
if ( tick > 3 ){
tick = 0;
deep_power_down();
}
delay_ms(1000);
printf("Tick:%u\n",tick);
}
}

Labels (1)
0 Kudos
0 Replies