You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2020/05/26 14:30:12 UTC

[incubator-nuttx] 01/02: arch: imxrt: Set the low power mode to 'remain in run mode'

This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 8dda796e6a8af59412c9e7c21ef96873a7c6d50a
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Tue May 26 21:29:01 2020 +0900

    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 9bdc9b4..e5d13eb 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
 }