Техническая Спецификация для Atmel Evaluation Kit for AT32uC3A0512, 32-Bit AVR Microcontroller Atmel ATEVK1105 ATEVK1105

Модели
ATEVK1105
Скачать
Страница из 826
107
AT32UC3A
17.5
Functional Description
17.5.1
External Interrupts
To enable an external interrupt EXTINTn must be written to 1 in register EN. Similarly, writing
EXTINTn to 1 in register DIS disables the interrupt. The status of each Interrupt line can be
observed in the CTRL register.
Each external interrupt pin EXTINTn can be configured to produce an interrupt on rising or fall-
ing edge, or high or low level. External interrupts are configured by the MODE, EDGE, and
LEVEL registers. Each interrupt n has a bit INTn in each of these registers.
Similarly, each interrupt has a corresponding bit in each of the interrupt control and status regis-
ters. Writing 1 to the INTn strobe in IER enables the external interrupt on pin EXTINTn, while
writing 1 to INTn in IDR disables the external interrupt. IMR can be read to check which inter-
rupts are enabled. When the interrupt triggers, the corresponding bit in ISR will be set. The flag
remains set until the corresponding strobe bit in ICR is written to 1.
Writing INTn in MODE to 0 enables edge triggered interrupts, while writing the bit to 1 enables
level triggered interrupts.
If EXTINTn is configured as an edge triggered interrupt, writing INTn in EDGE to 0 will trigger the
interrupt on falling edge, while writing the bit to 1 will trigger the interrupt on rising edge. 
If EXTINTn is configured as a level triggered interrupt, writing INTn in LEVEL to 0 will trigger the
interrupt on low level, while writing the bit to 1 will trigger the interrupt on high level. 
To remove spikes that are longer than the clock period in the current mode each external inter-
rupt contains a filter that can be enabled by writing 1 to INTn to FILTER.
Each interrupt line can be made asynchronous by writing 1 to INTn in the ASYNC register. This
will route the interrupt signal through the asynchronous path of the module. All edge interrupts
will be interpreted as level interrupts and the filter is disabled.
17.5.1.1
Synchronization of external interrupts
The pin value of the EXTINTn pins is normally synchronized to the CPU clock, so spikes shorter
than a CPU clock cycle are not guaranteed to produce an interrupt. In Stop mode, spikes shorter
than a 32 KHz clock cycle are not guaranteed to produce an interrupt. 
In Static mode, only unsynchronized interrupts remain active, and any short spike on this inter-
rupt will wake up the device.
17.5.1.2
Wakeup
The External interrupts can be used to wake up the part from sleep modes. The wakeup can be
interpreted in two ways. If the corresponding bit in IMR is set, then the execution starts at the
interrupt handler for this interrupt. If the bit in IMR is not set, then the execution starts from the
next instruction after the sleep instruction.
17.5.2
Non-Maskable Interrupt
The NMI supports the same features as the external interrupts, and is accessed through the
same registers. The description in 
should be followed, accessing the NMI bit
instead of the INTn bits.
32058K
AVR32-01/12