Skip to content

Commit 7e26876

Browse files
committed
Sleep API Update. Call Board RUN function as some platforms need more than setting the clock mode.
Signed-off-by: Mahadevan Mahesh <[email protected]>
1 parent 020ace1 commit 7e26876

File tree

1 file changed

+2
-5
lines changed
  • targets/TARGET_Freescale/TARGET_KSDK2_MCUS/api

1 file changed

+2
-5
lines changed

targets/TARGET_Freescale/TARGET_KSDK2_MCUS/api/sleep.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "sleep_api.h"
1717
#include "cmsis.h"
1818
#include "fsl_smc.h"
19+
#include "fsl_clock_config.h"
1920

2021
void sleep(void) {
2122
SMC_SetPowerModeProtection(SMC, kSMC_AllowPowerModeAll);
@@ -37,11 +38,7 @@ void deepsleep(void) {
3738
* need to enter PEE mode manually.
3839
*/
3940
if (mode == kMCG_ModePEE) {
40-
/* Wait for PLL lock. */
41-
while (!(MCG_S_LOCK0_MASK & MCG->S))
42-
{
43-
}
44-
CLOCK_SetPeeMode();
41+
BOARD_BootClockRUN();
4542
}
4643
#endif
4744
}

0 commit comments

Comments
 (0)