From 8dda796e6a8af59412c9e7c21ef96873a7c6d50a Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Tue, 26 May 2020 21:29:01 +0900 Subject: [PATCH] arch: imxrt: Set the low power mode to 'remain in run mode' NOTE: now imxrt can wake up from wfi --- arch/arm/src/imxrt/imxrt_clockconfig.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/src/imxrt/imxrt_clockconfig.c b/arch/arm/src/imxrt/imxrt_clockconfig.c index 9bdc9b470f..e5d13ebc34 100644 --- a/arch/arm/src/imxrt/imxrt_clockconfig.c +++ b/arch/arm/src/imxrt/imxrt_clockconfig.c @@ -678,5 +678,11 @@ void imxrt_clockconfig(void) reg = getreg32(IMXRT_CCM_CGPR); reg |= CCM_CGPR_INT_MEM_CLK_LPM; putreg32(reg, IMXRT_CCM_CGPR); + + /* Remain in run mode */ + + modifyreg32(IMXRT_CCM_CLPCR, + CCM_CLPCR_LPM_MASK, + CCM_CLPCR_LPM_RUN); #endif }