en:multiasm:piot:chapter_4_12
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:multiasm:piot:chapter_4_12 [2026/01/10 20:35] – pczekalski | en:multiasm:piot:chapter_4_12 [2026/01/19 15:16] (current) – marcin | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| To enter any of the sleep modes, the Sleep Enable bit in the Sleep Mode Control Register (SMCR.SE) must be written to ' | To enter any of the sleep modes, the Sleep Enable bit in the Sleep Mode Control Register (SMCR.SE) must be written to ' | ||
| <figure avr_sleepmodes> | <figure avr_sleepmodes> | ||
| - | {{: | + | {{: |
| < | < | ||
| </ | </ | ||
| + | |||
| + | ^ SM2, SM1, SM0 ^ Sleep Mode ^ | ||
| + | | 000 | Idle | | ||
| + | | 001 | | | ||
| + | | 010 | Power-down | ||
| + | | 011 | Power-save | ||
| + | | 100 | Reserved | ||
| + | | 101 | Reserved | ||
| + | | 110 | Standby | ||
| + | | 111 | Extended Standby | ||
| **Idle Mode** | **Idle Mode** | ||
| Line 35: | Line 45: | ||
| When the SM[2:0] bits are set to ' | When the SM[2:0] bits are set to ' | ||
| + | ^ Layer ^ What it does ^ Your interaction | ||
| + | | HAL (Arduino + avr-libc) | Sets SMCR bits for you | Easy, high-level | ||
| + | | Assembly (sleep) | ||
| + | | Hardware (SMCR register) | Controls sleep mode | Hidden unless accessed manually | | ||
| - | 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), as presented in figure | + | Summary Table: SMCR Differences Across AVR Families |
| + | |||
| + | ^ Feature | ||
| + | | Register name | SMCR | SMCR | SLEEP.CTRL | ||
| + | | Sleep enable bit | Yes (SE) | Yes (SE) | No | | ||
| + | | Mode bits | SM1:SM0 (sometimes SM2) | SM2: | ||
| + | | Number of modes | 3–4 | 5–6 | 4 | | ||
| + | | Power save mode | Rare | Yes | Yes | | ||
| + | | Standby mode | Some models | ||
| + | | Extended Standby | ||
| + | | Architecture | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | 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), as presented in Fig. {{ref> | ||
| <figure avr_prrdetails> | <figure avr_prrdetails> | ||
| - | {{: | + | {{: |
| < | < | ||
| </ | </ | ||
| - | 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 | + | The PRR provides a runtime method to stop the clock to select individual peripherals. The peripheral is currently |
| - | The PRR clock shutdown can be used in Idle and Active modes to reduce overall power consumption | + | The PRR clock shutdown can be used in Idle and Active modes to significantly |
| + | |||
| + | PRR Differences Across AVR Families | ||
| + | |||
| + | ^ Feature | ||
| + | | PRR exists | ||
| + | | Number of registers | ||
| + | | Peripheral coverage | ||
| + | | Architecture | ||
| + | | Arduino support | ||
| - | Tips to Minimise Power Consumption | + | Tips to Minimise Power Consumption. |
| * Analogue to Digital Converter (ADC): Disable the ADC before entering sleep modes to save power. | * Analogue to Digital Converter (ADC): Disable the ADC before entering sleep modes to save power. | ||
| * Analogue Comparator: Disable the Analogue Comparator in Idle and ADC Noise Reduction modes if not used. | * Analogue Comparator: Disable the Analogue Comparator in Idle and ADC Noise Reduction modes if not used. | ||
en/multiasm/piot/chapter_4_12.1768070138.txt.gz · Last modified: by pczekalski
