summaryrefslogtreecommitdiff
path: root/chip/stm32/clock-stm32f0.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/stm32/clock-stm32f0.c')
-rw-r--r--chip/stm32/clock-stm32f0.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/chip/stm32/clock-stm32f0.c b/chip/stm32/clock-stm32f0.c
index 2db0244cf9..d324e8bab5 100644
--- a/chip/stm32/clock-stm32f0.c
+++ b/chip/stm32/clock-stm32f0.c
@@ -322,6 +322,11 @@ void __idle(void)
t0 = get_time();
next_delay = __hw_clock_event_get() - t0.le.lo;
+#ifdef CONFIG_LOW_POWER_IDLE_LIMITED
+ if (idle_is_disabled())
+ goto en_int;
+#endif
+
if (DEEP_SLEEP_ALLOWED &&
#ifdef CONFIG_HOSTCMD_RTC
/*
@@ -381,6 +386,9 @@ void __idle(void)
/* normal idle : only CPU clock stopped */
asm("wfi");
}
+#ifdef CONFIG_LOW_POWER_IDLE_LIMITED
+en_int:
+#endif
asm volatile("cpsie i");
}
}