149
8331B–AVR–03/12
Atmel AVR XMEGA AU
13.6
Port Interrupt
Each port has two interrupt vectors, and it is configurable which pins on the port will trigger each
interrupt. Port interrupts must be enabled before they can be used. Which sense configurations
can be used to generate interrupts is dependent on whether synchronous or asynchronous input
sensing is available for the selected pin.
For synchronous sensing, all sense configurations can be used to generate interrupts. For edge
detection, the changed pin value must be sampled once by the peripheral clock for an interrupt
request to be generated.
For asynchronous sensing, only port pin 2 on each port has full asynchronous sense support.
This means that for edge detection, pin 2 will detect and latch any edge and it will always trigger
an interrupt request. The other port pins have limited asynchronous sense support. This means
that for edge detection, the changed value must be held until the device wakes up and a clock is
present. If the pin value returns to its initial value before the end of the device wake-up time, the
device will still wake up, but no interrupt request will be generated.
A low level can always be detected by all pins, regardless of a peripheral clock being present or
not. If a pin is configured for low-level sensing, the interrupt will trigger as long as the pin is held
low. In active mode, the low level must be held until the completion of the currently executing
instruction for an interrupt to be generated. In all sleep modes, the low level must be kept until
the end of the device wake-up time for an interrupt to be generated. If the low level disappears
before the end of the wake-up time, the device will still wake up, but no interrupt will be
generated.
,
, and
summarize when interrupts can be trig-
gered for the various input sense configurations.
Table 13-1.
Synchronous sense support.
Sense Settings
Supported
Interrupt Description
Rising edge
Yes
Always triggered
Falling edge
Yes
Always triggered
Any edge
Yes
Always triggered
Low level
Yes
Pin level must be kept unchanged during wake up
Table 13-2.
Full asynchronous sense support.
Sense Settings
Supported
Interrupt Description
Rising edge
Yes
Always triggered
Falling edge
Yes
Always triggered
Both edges
Yes
Always triggered
Low level
Yes
Pin level must be kept unchanged during wake up