Notes: 1. When the BOOTRST Fuse is programmed, the device will jump to the Boot Loader address at
reset, see “Boot Loader Support Read-While-Write Self-Programming
ATmega16/32/64/M1/C1” on page 279.
–
2. 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.
3. These vectors are not used by ATmega32/64C1.
Table 8-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.
Table 8-2.
BOOTRST
Reset and Interrupt Vectors Placement in ATmega16/32/64/M1/C1(1)
IVSEL
Reset Address
0x000
Interrupt Vectors Start Address
0x001
1
1
0
0
0
1
0
1
0x000
Boot Reset Address + 0x002
0x001
Boot Reset Address
Boot Reset Address
Boot Reset Address + 0x002
Note:
1. The Boot Reset Address is shown in Table 24-4 on page 283. For the BOOTRST Fuse “1”
means unprogrammed while “0” means programmed.
The most typical and general program setup for the Reset and Interrupt Vector Addresses in
ATmega16/32/64/M1/C1 is:
Address Labels Code
Comments
0x000
0x002
0x004
0x006
0x008
0x00A
0x00C
0x00E
0x010
0x012
0x014
0x016
0x018
0x01A
0x01C
0x01E
0x020
0x022
0x024
0x026
0x028
0x02A
0x02C
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
jmp
RESET
; Reset Handler
ANA_COMP_0
ANA_COMP_1
ANA_COMP_2
ANA_COMP_3
PSC_FAULT
PSC_EC
; Analog Comparator 0 Handler
; Analog Comparator 1 Handler
; Analog Comparator 2 Handler
; Analog Comparator 3 Handler
; PSC Fault Handler
; PSC End of Cycle Handler
; IRQ0 Handler
EXT_INT0
EXT_INT1
EXT_INT2
EXT_INT3
TIM1_CAPT
TIM1_COMPA
TIM1_COMPB
TIM1_OVF
TIM0_COMPA
TIM0_COMPB
TIM0_OVF
CAN_INT
; IRQ1 Handler
; IRQ2 Handler
; IRQ3 Handler
; Timer1 Capture Handler
; Timer1 Compare A Handler
; Timer1 Compare B Handler
; Timer1 Overflow Handler
; Timer0 Compare A Handler
; Timer0 Compare B Handler
; Timer0 Overflow Handler
; CAN MOB,Burst,General Errors Handler
; CAN Timer Overflow Handler
; LIN Transfer Complete Handler
; LIN Error Handler
CAN_TOVF
LIN_TC
LIN_ERR
PCINT0
; Pin Change Int Request 0 Handler
58
ATmega16/32/64/M1/C1
7647F–AVR–04/09