65
7679H–CAN–08/08
AT90CAN32/64/128
• 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 disable
interrupts, as explained in the IVSEL description above. See Code Example below.
Assembly Code Example
Move_interrupts:
; Get MCUCR
in  r16, MCUCR
mov  r17, r16
; Enable change of Interrupt Vectors
ori  r16, (1<<IVCE)
out  MCUCR, r16
; Move interrupts to Boot Flash section
ori  r17, (1<<IVSEL)
out  MCUCR, r17
ret
C Code Example
void Move_interrupts(void)
{
uchar  temp;
/* Get MCUCR*/
temp = MCUCR;
/* Enable change of Interrupt Vectors */
MCUCR = temp | (1<<IVCE);
/* Move interrupts to Boot Flash section */
MCUCR = temp | (1<<IVSEL);
}