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

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


The following commit(s) were added to refs/heads/master by this push:
     new da3fb9c  arch: xtensa: Call the waiti instruction in up_idle()
da3fb9c is described below

commit da3fb9c94f8dc57c2a89d0aa00ae88650b98337b
Author: Masayuki Ishikawa <[email protected]>
AuthorDate: Fri Mar 6 13:00:37 2020 +0900

    arch: xtensa: Call the waiti instruction in up_idle()
    
    Signed-off-by: Masayuki Ishikawa <[email protected]>
---
 arch/xtensa/src/common/xtensa_idle.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/xtensa/src/common/xtensa_idle.c 
b/arch/xtensa/src/common/xtensa_idle.c
index f6e2c3f..9ac16d4 100644
--- a/arch/xtensa/src/common/xtensa_idle.c
+++ b/arch/xtensa/src/common/xtensa_idle.c
@@ -92,4 +92,11 @@ void up_idle(void)
   leave_critical_section(flags);
 #endif
 #endif
+
+  /* This would be an appropriate place to put some MCU-specific logic to
+   * sleep in a reduced power mode until an interrupt occurs to save power
+   */
+
+  asm("waiti 0");
+
 }

Reply via email to