51
ATmega16M1/32M1/64M1 [DATASHEET]
8209E–AVR–11/2012
Notes:
1. When the BOOTRST Fuse is programmed, the device will jump to the Boot Loader address at reset, see
“Boot2. When the IVSEL bit in MCUCR is set, Interrupt Vectors will be moved to the start of the Boot Flash Section. The
address of each Interrupt Vector will then be the address in this table added to the start address of the Boot Flash
Section.
Table 11-2 shows reset and Interrupt Vectors placement for the various combinations of BOOTRST and IVSEL
settings. 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 or vice versa.
Note:
while “0” means programmed.
The most typical and general program setup for the Reset an d Int e rrupt Vector Addresses in
ATmega16M1/32M1/64M1 is:
Address
Labels Code
Comments
0x000
jmp
RESET
; Reset Handler
0x002
jmp
ANA_COMP_0
; Analog Comparator 0 Handler
0x004
jmp
ANA_COMP_1
; Analog Comparator 1 Handler
0x006
jmp
ANA_COMP_2
; Analog Comparator 2 Handler
0x008
jmp
ANA_COMP_3
; Analog Comparator 3 Handler
0x00A
jmp
PSC_FAULT
; PSC Fault Handler
0x00C
jmp
PSC_EC
; PSC End of Cycle Handler
0x00E
jmp
EXT_INT0
; IRQ0 Handler
0x010
jmp
EXT_INT1
; IRQ1 Handler
0x012
jmp
EXT_INT2
; IRQ2 Handler
0x014
jmp
EXT_INT3
; IRQ3 Handler
0x016
jmp
TIM1_CAPT
; Timer1 Capture Handler
0x018
jmp
TIM1_COMPA
; Timer1 Compare A Handler
0x01A
jmp
TIM1_COMPB
; Timer1 Compare B Handler
0x01C
jmp
TIM1_OVF
; Timer1 Overflow Handler
0x01E
jmp
TIM0_COMPA
; Timer0 Compare A Handler
0x020
jmp
TIM0_COMPB
; Timer0 Compare B Handler
0x022
jmp
TIM0_OVF
; Timer0 Overflow Handler
29
0x0038
WDT
Watchdog time-out interrupt
30
0x003A
EE READY
EEPROM ready
31
0x003C
SPM READY
Store program memory ready
Table 11-2.
Reset and interrupt vectors placement in Atmel ATmega16M1/32M1/64M1
BOOTRST
IVSEL
Reset address
Interrupt vectors start address
1
0
0x000
0x001
1
0x000
Boot reset address + 0x002
0
Boot Reset Address
0x001
0
1
Boot Reset Address
Boot reset address + 0x002
Table 11-1.
Reset and interrupt vectors. (Continued)
Vector
no.
Program
address
Source
Interrupt definition