
54
ATmega8515(L)
2512A–AVR–04/02
Moving Interrupts between
Application and Boot Space
The GeneralInterrupt Control Registercontrols the placement of the InterruptVector
table.
General Interrupt Control
Register – GICR
• Bit 1 – IVSEL: Interrupt Vector Select
When the IVSEL bit iscleared(zero), the InterruptVectors are placed at the startof the
Flash memory. When thisbit isset (one), the InterruptVectors aremoved to the begin-
ning of the Boot Loadersection of the Flash.Theactual address of the startof the Boot
Flash section isdeterminedbythe BOOTSZ Fuses.Refer to the section “Boot Loader
Support–Read-While-Write Self-Programming” on page 162 fordetails.Toavoid unin-
tentionalchanges ofInterruptVector tables, a specialwrite proceduremust be followed
to change the IVSEL bit:
1. Write the InterruptVectorChange Enable (IVCE) bit to one.
2. Within four cycles, write the desired value to IVSEL while writing a zerotoIVCE.
Interruptswill automatically be disabledwhilethissequenceis executed. Interrupts are
disabled in the cycle IVCE isset, and theyremain disabled until after theinstruction fol-
lowing the write to IVSEL. If IVSEL is not written, interruptsremain disabledforfour
cycles.The I-bit in the Status Register is unaffectedbythe automaticdisabling.
Note:IfInterruptVectors are placed in the Boot Loadersection andBoot Lock bit BLB02 ispro-
grammed, interrupts are disabledwhileexecuting from theApplication section. If
InterruptVectors are placed in theApplication section andBoot Lock bit BLB12 ispro-
gramed, interrupts are disabledwhileexecuting from the Boot Loadersection. Refer to
the section “Boot LoaderSupport–Read-While-Write Self-Programming” on page 162
fordetails on Boot Lock bits.
Bit 76543 210
INT1 INT0 INT2 – – – IVSEL IVCE GICR
Read/Write R/W R/W R/W RRRR/W R/W
Initial Value00000000
Komentarze do niniejszej Instrukcji