1.5 Important Points to be Noted when using
External Interrupts
If a level triggered interrupt is
used for waking up the device from Power-down, the required level must be held long
enough for the MCU to complete the wake-up, to trigger the level interrupt. If the
level disappears before the end of the start-up time, the MCU will still wake up,
but no interrupt will be generated.
Both INT0 and INT1 should be
configured to sense level interrupt to wake up the device from sleep mode other than
idle mode.
If enabled, a level triggered interrupt will generate an interrupt request as long
as the pin is held low.
When changing the ISCn bit, an interrupt can occur. Therefore, it is recommended to
first disable INTn by clearing its Interrupt Enable bit in the EIMSK Register.
Before enabling an interrupt, it is recommended to clear the flag bit of the
corresponding interrupt because when the flag bit is set, the interrupt will be
triggered the moment we enable the interrupt.
If enabled, interrupts will be triggered even when the pins are configured as
outputs. This provides a way of generating a software interrupt.
Most of the Atmel tinyAVR devices
will have the reset pin multiplexed with some other functionality like an interrupt
source or an ADC input channel. To use an interrupt pin (multiplexed with reset pin)
the RSTDISBL (reset disable) fuse has to be programmed, otherwise the device will
reset whenever the interrupt pin goes low. Once the RSTDISBL fuse has been
programmed, the ISP interface becomes non-functional until the fuse is unprogrammed.
So programming the AVR through ISP interface is not possible. High voltage
programming should be used to unprogram the fuse.
Once the CPU enters the ISR, the global interrupt enable bit (I-bit) in SREG will be
cleared so that all other interrupts are disabled. In order to use nested
interrupts, the I-bit has to be set by software when the CPU enters an ISR.
The online versions of the documents are provided as a courtesy. Verify all content and data in the device’s PDF documentation found on the device product page.