ATmega88PA Automotive Atmel Corporation, ATmega88PA Automotive Datasheet - Page 67

no-image

ATmega88PA Automotive

Manufacturer Part Number
ATmega88PA Automotive
Description
Manufacturer
Atmel Corporation
9223B–AVR–09/11
Interrupts will automatically be disabled while this sequence is executed. Interrupts are dis-
abled in the cycle IVCE is set, and they remain disabled until after the instruction following the
write to IVSEL. If IVSEL is not written, interrupts remain disabled for four cycles. The I-bit in
the Status Register is unaffected by the automatic disabling.
Note:
• Bit 0 – IVCE: Interrupt Vector Change Enable
The IVCE bit must be written to logic one to enable change of the IVSEL bit. IVCE is cleared
by hardware four cycles after it is written or when IVSEL is written. Setting the IVCE bit will dis-
able interrupts, as explained in the IVSEL description above. See Code Example below.
Assembly Code Example
C Code Example
Atmel ATmega48PA/88PA/168PA [Preliminary]
Move_interrupts:
void Move_interrupts(void)
{
}
; Enable change of Interrupt Vectors
ldi r16, (1<<IVCE)
out MCUCR, r16
; Move interrupts to Boot Flash section
ldi r16, (1<<IVSEL)
out MCUCR, r16
ret
/* Enable change of Interrupt Vectors */
MCUCR = (1<<IVCE);
/* Move interrupts to Boot Flash section */
MCUCR = (1<<IVSEL);
If Interrupt Vectors are placed in the Boot Loader section and Boot Lock bit BLB02 is pro-
grammed, interrupts are disabled while executing from the Application section. If Interrupt
Vectors are placed in the Application section and Boot Lock bit BLB12 is programed, interrupts
are disabled while executing from the Boot Loader section. Refer to the section
Support – Read-While-Write Self-Programming” on page 277
for details on Boot Lock bits.
“Boot Loader
67

Related parts for ATmega88PA Automotive