65
7799D–AVR–11/10
ATmega8U2/16U2/32U2
Notes: 1. When the BOOTRST Fuse is programmed, the device will jump to the Boot Loader address at
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. Moreover, contrary to other 8K/16K
devices, the interrupt vectors spacing remains identical (2 words) for both 8KB and 16KB
versions.
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:
means unprogrammed while “0” means programmed.
11.2.1
Moving Interrupts Between Application and Boot Space
The General Interrupt Control Register controls the placement of the Interrupt Vector table.
11.3
Register Description
11.3.1
MCUCR – MCU Control Register
Bit 1 – IVSEL: Interrupt Vector Select
When the IVSEL bit is cleared (zero), the Interrupt Vectors are placed at the start of the Flash
memory. When this bit is set (one), the Interrupt Vectors are moved to the beginning of the Boot
Loader section of the Flash. The actual address of the start of the Boot Flash Section is deter-
details. To avoid unintentional changes of Interrupt Vector tables, a special write procedure must
be followed to change the IVSEL bit:
27
$0034
ANALOG COMP
Analog Comparator
28
$0036
EE READY
EEPROM Ready
29
$0038
SPM READY
Store Program Memory Ready
Table 11-2.
BOOTRST
IVSEL
Reset Address
Interrupt Vectors Start Address
1
0
0x0000
0x0002
1
0x0000
Boot Reset Address + 0x0002
0
Boot Reset Address
0x0002
0
1
Boot Reset Address
Boot Reset Address + 0x0002
Table 11-1.
Reset and Interrupt Vectors (Continued)
Vector
No.
Program
Address(2)
Source
Interrupt Definition
Bit
76543210
JTD
–
PUD
–
IVSEL
IVCE
MCUCR
Read/Write
R/W
R
R/W
R
R/W
Initial Value
0