From 50362c29f701b1857e390cef05d89fcfd03df57b Mon Sep 17 00:00:00 2001 From: maclobdell Date: Thu, 13 Oct 2016 17:04:37 -0500 Subject: [PATCH] allow rtos idle loop to call sleep(); To enable power efficiency, the rtos loop should call sleep(). To my knowledge, this can be done regardless if the debugger interface is connected (at least it can on the Kinetis MCUs). If the debugger interface is connected, the device may not achieve as great of power savings, but it still can enter low power mode. Something is better than nothing. --- rtos/rtos_idle.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/rtos/rtos_idle.c b/rtos/rtos_idle.c index c1a35ef02c5..7ebdb9268f2 100644 --- a/rtos/rtos_idle.c +++ b/rtos/rtos_idle.c @@ -24,11 +24,10 @@ static void default_idle_hook(void) { - /* Sleep: ideally, we should put the chip to sleep. - Unfortunately, this usually requires disconnecting the interface chip (debugger). - This can be done, but it would break the local file system. - */ - // sleep(); + /* Sleep: Please note - for the most power savings, disconnect the. + interface chip (debugger). + */ + sleep(); } static void (*idle_hook_fptr)(void) = &default_idle_hook;