mirror of https://github.com/ARMmbed/mbed-os.git
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
parent
020ace1424
commit
7e26876baf
|
@ -16,6 +16,7 @@
|
||||||
#include "sleep_api.h"
|
#include "sleep_api.h"
|
||||||
#include "cmsis.h"
|
#include "cmsis.h"
|
||||||
#include "fsl_smc.h"
|
#include "fsl_smc.h"
|
||||||
|
#include "fsl_clock_config.h"
|
||||||
|
|
||||||
void sleep(void) {
|
void sleep(void) {
|
||||||
SMC_SetPowerModeProtection(SMC, kSMC_AllowPowerModeAll);
|
SMC_SetPowerModeProtection(SMC, kSMC_AllowPowerModeAll);
|
||||||
|
@ -37,11 +38,7 @@ void deepsleep(void) {
|
||||||
* need to enter PEE mode manually.
|
* need to enter PEE mode manually.
|
||||||
*/
|
*/
|
||||||
if (mode == kMCG_ModePEE) {
|
if (mode == kMCG_ModePEE) {
|
||||||
/* Wait for PLL lock. */
|
BOARD_BootClockRUN();
|
||||||
while (!(MCG_S_LOCK0_MASK & MCG->S))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
CLOCK_SetPeeMode();
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue