Sleep API Update. Call Board RUN function as some platforms need more than setting the clock mode.

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
pull/2966/head
Mahadevan Mahesh 2016-10-07 11:35:34 -05:00
parent 020ace1424
commit 7e26876baf
1 changed files with 2 additions and 5 deletions

View File

@ -16,6 +16,7 @@
#include "sleep_api.h"
#include "cmsis.h"
#include "fsl_smc.h"
#include "fsl_clock_config.h"
void sleep(void) {
SMC_SetPowerModeProtection(SMC, kSMC_AllowPowerModeAll);
@ -37,11 +38,7 @@ void deepsleep(void) {
* need to enter PEE mode manually.
*/
if (mode == kMCG_ModePEE) {
/* Wait for PLL lock. */
while (!(MCG_S_LOCK0_MASK & MCG->S))
{
}
CLOCK_SetPeeMode();
BOARD_BootClockRUN();
}
#endif
}