Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-src by
Diff: targets/hal/TARGET_Freescale/TARGET_KLXX/sleep.c
- Revision:
- 363:12a245e5c745
- Parent:
- 82:0b31dbcd4769
- Child:
- 499:d0e9408fd176
--- a/targets/hal/TARGET_Freescale/TARGET_KLXX/sleep.c Tue Oct 21 16:30:07 2014 +0100 +++ b/targets/hal/TARGET_Freescale/TARGET_KLXX/sleep.c Thu Oct 23 09:45:08 2014 +0100 @@ -30,9 +30,11 @@ //Very low-power stop mode void deepsleep(void) { +#if ! defined(TARGET_KL43Z) //Check if PLL/FLL is enabled: uint32_t PLL_FLL_en = (MCG->C1 & MCG_C1_CLKS_MASK) == MCG_C1_CLKS(0); - +#endif + SMC->PMPROT = SMC_PMPROT_AVLLS_MASK | SMC_PMPROT_ALLS_MASK | SMC_PMPROT_AVLP_MASK; SMC->PMCTRL = SMC_PMCTRL_STOPM(2); @@ -41,6 +43,7 @@ __WFI(); +#if ! defined(TARGET_KL43Z) //Switch back to PLL as clock source if needed //The interrupt that woke up the device will run at reduced speed if (PLL_FLL_en) { @@ -50,5 +53,5 @@ #endif MCG->C1 &= ~MCG_C1_CLKS_MASK; } - +#endif }