1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/pm_layered
Marian Buschsieweke a3e7abc2e2
sys/pm: Fix behavior of fallback pm_off() implementation
- pm_off() should prevent other threads from getting executed after it is
  called, as it should turn off the MCU completely according to its doc
    - Previously, the fallback implementation would still allow other threads
      to continue working
    - Simply disabling IRQs and never enabling them again should make sure
      the MCU behaves like it would be completely off
- pm_off() should reduce the power consumption as much as possible
    - Previously, when IRQs came after the call to pm_set_lowest() in the
      fallback implementation of pm_off(), `while(1) {}` got executed at full
      power consumption
    - Just calling `pm_set(0);` in a loop while make sure that lowest power mode
      is restored if the MCU wakes up again.
    - The check if the lowest power mode is available is skipped, as no code
      gets executed afterwards anyway
2020-04-29 12:08:12 +02:00
..
Makefile drivers: add layered power modes module 2017-01-12 11:24:15 +01:00
pm.c sys/pm: Fix behavior of fallback pm_off() implementation 2020-04-29 12:08:12 +02:00