Unit content
Low-power modes and wake-up sources
A microcontroller can often reduce energy use by disabling clocks or power to hardware that is temporarily unnecessary.
A light sleep mode may stop the processor while leaving many peripherals running. Deeper modes can disable more of the clock tree or power domains, reducing consumption further but increasing wake-up latency and losing more volatile state.
Firmware chooses wake-up sources that are allowed to restore activity, such as a timer, GPIO edge, communication peripheral or watchdog event.
Power saving is therefore a state-transition problem: before sleeping, software must place peripherals and external hardware into suitable states; after waking, it must restore anything that did not remain powered or clocked.
The deepest state is not always best. Frequent wakeups can make transition overhead dominate, while a shallower state may respond faster and preserve more context.
Low-power design trades energy against latency, retained state and which hardware must remain able to detect the next useful event.