This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC43xx deep sleep wake up

Hi,

I'm trying to put my LPC4337 into deep sleep but it won't wake up when I bring the WAKEUP0 line low. Here is my code:

sleep = os_suspend(); // Suspend RTX thread scheduler

//TODO: Try to get lower power mode (see below)

LPC_PMC->PD0_SLEEP0_HW_ENA = 0x01; // Select M4 core LPC_PMC->PD0_SLEEP0_MODE = 0x003000AA; SCB->SCR = 0x04; // Set SLEEPDEEP LPC_EVENTROUTER->CLR_STAT = EVENTROUTER_CLR_STAT_WAKEUP0_CLRST_Msk; LPC_EVENTROUTER->SET_EN = EVENTROUTER_SET_EN_WAKEUP0_SETEN_Msk;

__WFI(); // Enter Power-down mode

io_control(LED303, OFF); os_resume(sleep); // Resume RTX thread scheduler

The hardware seems fine and registers are set correctly.

The documentation states:

Remark: Before entering Deep-sleep mode, program the CGU as follows:
• Switch the clock source of all base clocks to the IRC.
• Put the PLLs in power-down mode.

How do I go about doing this?
Is there any example code?

Thanks

0