From da3fb9c94f8dc57c2a89d0aa00ae88650b98337b Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Fri, 6 Mar 2020 13:00:37 +0900 Subject: [PATCH] arch: xtensa: Call the waiti instruction in up_idle() Signed-off-by: Masayuki Ishikawa --- 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 f6e2c3f29f..9ac16d4e6c 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"); + }