LPC4357 can't wakeup from deep power down by wakeup0 pin

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

LPC4357 can't wakeup from deep power down by wakeup0 pin

597 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tkggitfk24 on Wed Mar 02 22:38:04 MST 2016
I am using the lpcopen library and Keil MCB 4357 Board. After power up, the board will enter deep power down mode, then I press the wakeup0 key, but the board can't be waked up(as good as reset).

My questions are:
1. Chip_EVRT_Init() function will clear all status bit in event router, but actually, it does not really clear all the status. the status register is read as 0x1F7FBFE, why can't be cleared?

2. After entering deep power down mode, why can't be waked up?I already enabled this.

bool power_enabled = false;
bool key_pressed = false;

int main(void)
{
    SystemCoreClockUpdate();
    Board_Init();

    DEBUGSTR("In main()\r\n");

    /* Initialize the Event Router */
    Chip_EVRT_Init();
    PMC_Evrt_Configure(EVRT_SRC_WAKEUP0);

    if (key_pressed)
    {
        DEBUGSTR("Power Enabled\r\n");
        power_enabled = true;
    }
    else
    {
        DEBUGSTR("Enter Sleep Mode in mian()\r\n");

        /* Call Pre SleepPowerDown function */
        PMC_Pre_SleepPowerDown();

        /* Goto Deep Sleep mode */
        Chip_PMC_Set_PwrState(PMC_DeepPowerDown);

        /* Wake up from Deep power down state is as good as RESET */
        while (1) {}
    }

    for(;;)
    {
        Board_LED_Toggle(0);
        DelayUs(200000);
    }
}

void EVRT_IRQHandler(void)
{
    if (Chip_EVRT_IsSourceInterrupting(EVRT_SRC_WAKEUP0)) 
    { 
        Chip_EVRT_ClrPendIntSrc(EVRT_SRC_WAKEUP0);
        
        if (power_enabled)
        {    
            power_enabled = false;
            /* Call Pre SleepPowerDown function */
            PMC_Pre_SleepPowerDown();

            /* Goto Deep Sleep mode */
            Chip_PMC_Set_PwrState(PMC_DeepPowerDown);

            /* Wake up from Deep power down state is as good as RESET */
            while (1) {} 
        }
        else
        {
            key_pressed = true;
        }
    }
}
Labels (1)
0 Kudos
2 Replies

351 Views
justinfuller
Contributor I

I'm also experiencing this issue.  Can anyone from NXP offer some insight?

0 Kudos

351 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos