Power down on LPC11u6x

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

Power down on LPC11u6x

1,101 Views
arty
Contributor II

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();

Labels (1)
Tags (2)
0 Kudos
5 Replies

898 Views
arty
Contributor II

One more thing - on wakeup only certain amount of things are optionally powered back up (IRC, BOD, FLASH, TS, etc.). Does that mean that after wakeup I should reinitialize a device as a whole? Does that mean that my UART which I use for modem handling is not going to work because of wake up?

0 Kudos

898 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Arturas Jonkus,
Thanks for your reply.
1) Does that mean that after wake up I should reinitialize a device as a whole?
-- No, you needn't do that.
2)  Does that mean that my UART which I use for modem handling is not going to work because of wake up?
-- No, I don't think so.
Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

898 Views
arty
Contributor II

This example doesn't seem to switch between RC clock and external clock, is that right? User manual suggest doing so I was wondering if that's absolutely required.

0 Kudos

898 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Arturas Jonkus,

Thanks for your reply.

1) This example doesn't seem to switch between RC clock and external clock, is that right?

-- Yes, it's not the absolutely required.


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

898 Views
jeremyzhou
NXP Employee
NXP Employee

Hi
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
To provide the fastest possible support, I'd highly recommend you to refer to the periph_pmu demo in the LPCOpen library.
Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos