From 921a622ffcc1fc37ee64bc18ad6c122607749e76 Mon Sep 17 00:00:00 2001 From: maiabozaid Date: Wed, 12 Jul 2023 23:25:31 +0300 Subject: [PATCH] making the idle function efficient by using WFE instead empty while --- machines/cortex/tpl_machine_cortex.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/machines/cortex/tpl_machine_cortex.c b/machines/cortex/tpl_machine_cortex.c index cb617b413..d9ecd52e3 100644 --- a/machines/cortex/tpl_machine_cortex.c +++ b/machines/cortex/tpl_machine_cortex.c @@ -289,7 +289,10 @@ FUNC(uint8, OS_CODE) tpl_check_stack_footprint(CONST(tpl_proc_id, OS_APPL_DATA) */ void idle_function(void) { - while(1); + while(1) + { + __WFE(); + } } void tpl_init_machine()