AnsweredAssumed Answered

Power down on LPC11u6x

Question asked by Arturas Jonkus on Oct 8, 2018
Latest reply on Oct 16, 2018 by jeremyzhou

I am doing step-by-step setting-up of putting LPC11u67 device to power-down. However, even after doing everything exactly as I am told by manual, device can't get back from power-down. Maybe my code could provide some things that I understood in a wrong way.

Chip_SYSCTL_EnableStartPin(2); // Getting PIN INT to wake up device

Chip_SYSCTL_EnablePeriphWakeup((1 << 20) | (1 << 12)); // GINT0 interrupt wake-up | RTC wake-up

 

// Not needing BOD and WDT on sleep

Chip_SYSCTL_SetDeepSleepPD(SYSCTL_DEEPSLP_BOD_PD | SYSCTL_DEEPSLP_WDTOSC_PD);

 

// Switching to IRC as main clock

Chip_SYSCTL_PowerUp(SYSCTL_POWERDOWN_IRC_PD);
/* Wait for at least 580uS for osc to stabilize */
for (i = 0; i < 2500; i++) {}

Chip_Clock_SetMainClockSource(SYSCTL_MAINCLKSRC_IRC);

 

// Turn on IRC, Flash, SysOsc and PLL on wakeup

Chip_SYSCTL_SetWakeup(~(SYSCTL_SLPWAKE_IRCOUT_PD | SYSCTL_SLPWAKE_IRC_PD |                                                         SYSCTL_SLPWAKE_FLASH_PD | SYSCTL_SLPWAKE_SYSOSC_PD |                                                                SYSCTL_SLPWAKE_SYSPLL_PD));

Chip_RTC_SetAlarm(LPC_RTC, Settings.nextHeartbeatTimeStamp);

 

// Go to power down

Chip_PMU_PowerDownState(LPC_PMU);

 

// Setup device from beginning - power on crystal and setup PLL

Chip_SetupXtalClocking();

Outcomes