This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:multiasm:piot:chapter_4_12 [2024/09/27 20:57] – pczekalski | en:multiasm:piot:chapter_4_12 [2025/05/31 07:01] (current) – marcin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Energy Efficiency ====== | ====== Energy Efficiency ====== | ||
| + | |||
| + | There are five sleep modes to select from: | ||
| + | * Idle Mode | ||
| + | * Power Down | ||
| + | * Power Save | ||
| + | * Standby | ||
| + | * Extended Standby | ||
| + | |||
| + | To enter any of the sleep modes, the Sleep Enable bit in the Sleep Mode Control Register (SMCR.SE) must be written to ' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | **Idle Mode** | ||
| + | |||
| + | When the SM[2:0] bits are set to ' | ||
| + | |||
| + | **Power-Down Mode** | ||
| + | |||
| + | When the SM[2:0] bits are set to ' | ||
| + | |||
| + | **Power-Save Mode** | ||
| + | |||
| + | When the SM[2:0] bits are set to ' | ||
| + | |||
| + | **Standby Mode** | ||
| + | |||
| + | When the SM[2:0] bits are set to ' | ||
| + | |||
| + | **Extended Standby Mode** | ||
| + | |||
| + | When the SM[2:0] bits are set to ' | ||
| + | |||
| + | |||
| + | |||
| + | AVR® 8-bit microcontrollers include several sleep modes to save power. The AVR device can also lower power consumption by shutting down the clock for select peripherals via a register setting. That register is called the Power Reduction Register (PRR). | ||
| + | |||
| + | {{: | ||
| + | |||
| + | The PRR provides a runtime method to stop the clock to select individual peripherals. The current state of the peripheral is frozen, and the I/O registers cannot be read or written. Resources used by the peripheral when stopping the clock will remain committed. Hence, the peripheral should, in most cases, be disabled before stopping the clock. Waking up a module, which is done by clearing the bit in PRR, puts the module into the same state as before shutdown. | ||
| + | PRR clock shutdown can be used in Idle mode and Active mode to significantly reduce the overall power consumption. In all other sleep modes, the clock is already stopped. | ||
| + | |||
| + | Tips to Minimize Power Consumption | ||
| + | * Analog to Digital Converter (ADC): Disable the ADC before entering sleep modes to save power. | ||
| + | * Analog Comparator: Disable the Analog Comparator in Idle and ADC Noise Reduction modes if not used. | ||
| + | * Brown-Out Detector (BOD): Turn off the BOD if not needed, as it consumes power in all sleep modes. | ||
| + | * Internal Voltage Reference: Disable it if not needed by the ADC, Analog Comparator, or BOD. | ||
| + | * Watchdog Timer: Turn off the Watchdog Timer if not needed, as it consumes power in all sleep modes. | ||
| + | * Port Pins: Configure port pins to minimize power usage, ensuring no pins drive resistive loads. | ||
| + | * On-chip Debug System: Disable the On-chip debug system if not needed, as it consumes power in sleep modes. | ||
| + | |||