LPC546XX: Fix deepsleep implementation

Add a check to return to 220MHz on LPC54628

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
pull/6468/head
Mahesh Mahadevan 2018-03-26 16:30:43 -05:00
parent 72011173fc
commit 9a1e749780
3 changed files with 8 additions and 6 deletions

View File

@ -26,8 +26,8 @@ void hal_sleep(void)
void hal_deepsleep(void)
{
LPC_CLOCK_INTERNAL_IRC();
LPC_CLOCK_INTERNAL_IRC;
/* Enter Deep Sleep mode */
POWER_EnterDeepSleep(APP_EXCLUDE_FROM_DEEPSLEEP);
LPC_CLOCK_RUN();
LPC_CLOCK_RUN;
}

View File

@ -25,8 +25,9 @@
SYSCON_PDRUNCFG_PDEN_SRAM0_MASK | SYSCON_PDRUNCFG_PDEN_SRAM1_2_3_MASK)
/* Defines used by the sleep code */
#define LPC_CLOCK_INTERNAL_IRC BOARD_BootClockFRO12M
#define LPC_CLOCK_RUN BOARD_BootClockFROHF48M
#define LPC_CLOCK_INTERNAL_IRC BOARD_BootClockFRO12M()
#define LPC_CLOCK_RUN ((SYSCON->DEVICE_ID0 == 0xFFF54628) ? \
BOARD_BootClockPLL220M() : BOARD_BootClockFROHF48M())
#define DEVICE_ID_LENGTH 24

View File

@ -25,8 +25,9 @@
SYSCON_PDRUNCFG_PDEN_SRAM0_MASK | SYSCON_PDRUNCFG_PDEN_SRAM1_2_3_MASK)
/* Defines used by the sleep code */
#define LPC_CLOCK_INTERNAL_IRC BOARD_BootClockFRO12M
#define LPC_CLOCK_RUN BOARD_BootClockFROHF48M
#define LPC_CLOCK_INTERNAL_IRC BOARD_BootClockFRO12M()
#define LPC_CLOCK_RUN ((SYSCON->DEVICE_ID0 == 0xFFF54628) ? \
BOARD_BootClockPLL220M() : BOARD_BootClockFROHF48M())
#define DEVICE_ID_LENGTH 24