12.07.2015 Views

ATmega32A Datasheet - Sunrom Technologies

ATmega32A Datasheet - Sunrom Technologies

ATmega32A Datasheet - Sunrom Technologies

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ATmega32A</strong>9. Power Management and Sleep Modes9.1 Sleep ModesSleep modes enable the application to shut down unused modules in the MCU, thereby savingpower. The AVR provides various sleep modes allowing the user to tailor the power consumptionto the application’s requirements.Figure 8-1 on page 25 presents the different clock systems in the <strong>ATmega32A</strong>, and their distribution.The figure is helpful in selecting an appropriate sleep mode. Table 9-1 shows thedifferent clock options and their wake-up sources.Table 9-1.Active Clock Domains and Wake Up Sources in the Different Sleep ModesActive Clock domains Oscillators Wake-up SourcesSleep Modeclk CPUclk FLASHclk IOclk ADCclk ASYMain ClockSource EnabledTimer OscillatorEnabledINT2INT1INT0TWI AddressMatchTimer2SPM / EEPROMReadyADCOtherI/OIdle X X X X X (2) X X X X X XADC NoiseReductionX X X X (2) X (3) X X X XPower-down X (3) XPower-save X (2) X (2) X (3) X X (2)Standby (1) X X (3) XExtendedStandby (1) X (2) X X (2) X (3) X X (2)Notes: 1. External Crystal or resonator selected as clock source.2. If AS2 bit in ASSR is set.3. Only INT2 or level interrupt INT1 and INT0.To enter any of the six sleep modes, the SE bit in MCUCR must be written to logic one and aSLEEP instruction must be executed. The SM2, SM1, and SM0 bits in the MCUCR Registerselect which sleep mode (Idle, ADC Noise Reduction, Power-down, Power-save, Standby, orExtended Standby) will be activated by the SLEEP instruction. See Table 9-2 on page 37 for asummary.If an enabled interrupt occurs while the MCU is in a sleep mode, the MCU wakes up. The MCUis then halted for four cycles in addition to the start-up time, it executes the interrupt routine, andresumes execution from the instruction following SLEEP. The contents of the Register File andSRAM are unaltered when the device wakes up from sleep. If a Reset occurs during sleepmode, the MCU wakes up and executes from the Reset Vector.9.2 Idle ModeWhen the SM2:0 bits are written to 000, the SLEEP instruction makes the MCU enter Idle mode,stopping the CPU but allowing SPI, USART, Analog Comparator, ADC, Two-wire Serial Inter-8155C–AVR–02/1133

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!