
38
Atmel ATmega16/32/64/M1/C1 [DATASHEET]
7647K–AVR–12/13
7.
System Control and Reset
7.1
Resetting the AVR
during reset, all I/O registers are set to their initial values, and the program starts execution from the reset Vector. The
instruction placed at the reset vector must be a JMP – Absolute Jump – instruction to the reset handling routine. If the program
never enables an interrupt source, the interrupt vectors are not used, and regular program code can be placed at these
locations. This is also the case if the reset vector is in the application section while the interrupt vectors are in the boot section
parameters of the reset circuitry.
The I/O ports of the AVR are immediately reset to their initial state when a reset source goes active. This does not require any
clock source to be running.
After all reset sources have gone inactive, a delay counter is invoked, stretching the internal reset. This allows the power to
reach a stable level before normal operation starts. The time-out period of the delay counter is defined by the user through the
7.2
Reset Sources
The Atmel ATmega16/32/64/M1/C1 has four sources of reset:
●
Power-on reset. The MCU is reset when the supply voltage is below the power-on reset threshold (VPOT).
●
External reset. The MCU is reset when a low level is present on the RESET pin for longer than the minimum pulse
length.
●
Watchdog reset. The MCU is reset when the watchdog timer period expires and the watchdog is enabled.
●
Brown-out reset. The MCU is reset when the supply voltage VCC is below the brown-out reset threshold (VBOT) and the
brown-out detector is enabled.
Figure 7-1.
Reset Logic
Power-on Reset
Circuit
Brown-out
Reset Circuit
MCU Status
Register (MCUSR)
Reset Circuit
Pull-up Resistor
BODLEVEL [2.. 0]
S
Q
R
DATA BUS
CK
SUT[1:0]
CKSEL[3:0]
COUNTER
RESET
INTERNAL
RESET
TIMEOUT
Spike
Filter
RESET
VCC
Delay Counters
Watchdog
Timer
Watchdog
Oscillator
Clock
Generator
PORF
BORF
WDRF
EXTRF