This issue’s topic:
RTOS as the software platform, and some products have higher requirements for low power consumption. This article discusses how to handle the low power characteristics of microcontrollers in RTOS.RTOS used.RTOS generally adopts a time-slice round-robin preemptive task scheduling mechanism. In practical applications, the general low-power design ideas are as follows:-
When the
Idletask is running, enter low power mode; -
Under appropriate conditions, wake up the
MCUthrough interrupts or external events.
OS system timer generates an interrupt, it will wake the MCU from low power mode. However, frequently entering/exiting low power mode prevents the MCU from entering deep sleep.Tickless Idle Mode is to keep the MCU in low power mode as much as possible when it is idle.MCU between low power mode and running mode).RTOS comes from a certain periodic timer in the hardware (most Cortex-M series cores use SysTick), and the RTOS task scheduler can anticipate the trigger time of the next periodic task (or timer task).RTOS from entering unnecessary time interrupts, thus allowing it to stay in low power mode for a longer time. At this time, the clock of RTOS is no longer periodic but dynamic (no interrupts will occur on the original clock baseline, i.e., Tickless).MCU is awakened, provide compensation for the system clock in some way.MCU may be awakened by two situations: dynamically adjusted system clock interrupts or sudden external events. In either case, the time the MCU spent in low power mode can be calculated using some timer running in low power mode, and software compensation for system time can be performed after the MCU wakes up;MCU.MCU low power characteristics, different MCUs can use different peripherals (mainly timers) in different low power modes. The system clock of RTOS can be appropriately adjusted.Due to recent changes in the WeChat public platform push rules, many readers have reported not seeing updated articles in time. According to the latest rules, it is recommended to click on “Recommended Reading, Share, Collect, etc.” more often to become a regular reader.
Recommended Reading:
-
Official Announcement: 51-year-old Meng Wanzhou has a new identity!
-
Within a day, two factories in Dongguan announced closure.
-
Is a monthly salary of 10,000 untrue? Exposed Tesla’s Chinese factory maliciously withholding performance bonuses.
Please click 【See】 to give the editor a thumbs up
