What is the Idle mode in AVR MCU?
শূন্য - The ZeRo
According to ATmega128RFA1 datasheet:
The Idle mode stops the CPU while allowing the SRAM, Timer/Counters, SPI port, and interrupt system to continue functioning. The Power-down mode saves the register contents but freezes the Oscillator, disabling all other chip functions until the next interrupt or hardware reset. In Power-save mode, the asynchronous timer continues to run, allowing the user to maintain a timer base while the rest of the device is sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except asynchronous timer and ADC, to minimize switching noise during ADC conversions. In Standby mode, the RC oscillator is running while the rest of the device is sleeping. This allows very fast start-up combined with low power consumption. In Extended Standby mode, both the main RC oscillator and the asynchronous timer continue to run.
Your AVR datasheet should have a chapter called something like "Power Management and sleep modes". In that you will find that "Idle" is just one of a number of levels of sleep mode offered by an AVR. You tell the sleep controller which one you'd like. Then you execute the SLEEP opcode. The CPU then stops all the clocks it offers to stop in the given mode and stops fetching opcodes. What wakes it up is some kind of interrupt ("wake up sources"). See this typical table:
So this particular AVR offers "Idle", "ADC Noise Reduction Mode", "Power-Down", and so on. More and more of the clocks are stopped as you get further down the table and consequently the amount of energy required to operate the CPU is reduced down as far a a fraction of a micro Amp. This is all to do with operating AVRs on batteries. To make the battery last as long as possible you try to make the code sleep as often as possible in the deepest sleep mode possible but which one you can use will often be determined by the wake-up source you plan to use.
This is common to pretty much all microcontrollers today: there are various levels of sleep/idle to give various levels of power saving traded-off against the options for waking the device up again...
© 2021 Microchip Technology Inc.