From 2ba7ce75d7c62184d01fbd072ba4bc263bf9133b Mon Sep 17 00:00:00 2001 From: Dave Marples Date: Tue, 12 Nov 2019 08:52:21 -0600 Subject: [PATCH] arch/arm/src/imxrt/imxrt_idle.c: Y'all remember that conversation we had about why WFI might have been disabled on imxrt? Well, looks like we found the reason; https://github.com/zephyrproject-rtos/zephyr/pull/8535/commits: "The imxrt1050 is configured to use SYSTICK for the kernel timer, but SYSTICK cannot wake up the soc from low-power modes. Disable low-power modes on this soc until we have support for an alternative timer." "This fixes k_sleep on the EVKB version of the mimxrt1050_evk board. An earlier version of the board (EVK, not EVKB), had A0 silicon which by default did not enter low-power mode on a wfi." This patch reverts the WFI enable for further investigation post 8.2. With this patch in place together with the previous one my system is fully stable(*), just drinking a bit more power than I'd like. --- arch/arm/src/imxrt/imxrt_idle.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/imxrt/imxrt_idle.c b/arch/arm/src/imxrt/imxrt_idle.c index 2e7e4378bb..625230c45d 100644 --- a/arch/arm/src/imxrt/imxrt_idle.c +++ b/arch/arm/src/imxrt/imxrt_idle.c @@ -177,7 +177,15 @@ void up_idle(void) up_idlepm(); -#if 1 +/* This code is disabled due to fact CPU cannot recover from low + * power mode via SYSTICK according to: + * + * https://github.com/zephyrproject-rtos/zephyr/pull/8535/commits + * + * For further investigation post release of 8.2. + */ + +#if 0 /* Sleep until an interrupt occurs to save power. */ BEGIN_IDLE();