3.10.2.7.1.1 MCUCR – MCU Control Register

Name: MCUCR
Offset: 0x00E
Reset: 0x00

Bit 76543210 
 Reserved[2:0]  SPIIO IVSEL IVCE 
Access R/WR/WR/WR/WR/WR/W 
Reset 000000 

Bits 7:5 – Reserved[2:0] PB7HS, PB7LS, PB4HS, PUD, ENPS

These bits are port-related and, therefore, not discussed here. A description of these bits can be found in Alternate Port Functions.

Bit 2 – SPIIO  SPI Interrupt Only

If the SPIIO bit is ‘1’, all interrupts are blocked except for the SPI interrupts SPI, SRX_FIFO and STX_FIFO. For all non-SPI interrupts, it is as if the I bit in SREG is cleared. This is designed to keep interrupt routines from other interrupting sources. To keep the SPI interface responsive even during interrupt execution, the SPI interrupt is still passed to the AVR.

Bit 1 – IVSEL  Interrupt Vector Select

When the IVSEL bit is cleared (‘0’), the interrupt vectors are placed at the start of the ROM memory. When this bit is set (‘1’), the interrupt vectors are moved to the beginning of the boot loader Flash. Refer to the Fuse Low Byte for further details. To avoid unintentional changes of the interrupt vector tables, a special write procedure must be followed to change the IVSEL bit:
  1. Write the interrupt vector change enable (IVCE) bit to ‘1’.
  2. Within four cycles, write the desired value to IVSEL while writing a ‘0’ to IVCE.

Interrupts are automatically disabled while this sequence is executed. Interrupts are disabled if the cycle IVCE is set and 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 automatic disabling.

Note: If interrupt vectors are placed in the boot loader section and boot lock bit BLB02 is programmed, interrupts are disabled while executing from the application section. If interrupt vectors are placed in the application section and boot lock bit BLB12 is programmed, interrupts are disabled while executing from the boot loader section. Refer to the Memory Access via SPM/LPM for details on boot lock bits.

Bit 0 – IVCE Interrupt Vector Change Enable

The IVCE bit must be written to logic ‘1’ to enable changing the IVSEL bit. IVCE is cleared by hardware four cycles after it is written or when IVSEL is written. Setting the IVCE bit disables interrupts, as explained in the preceding description.