Atmel SAM4S-XPLD Atmel ATSAM4S-XPLD ATSAM4S-XPLD Hoja De Datos

Los códigos de productos
ATSAM4S-XPLD
Descargar
Página de 1125
 515
SAM4S [DATASHEET]
11100E–ATARM–24-Jul-13
Some additional Interrupt modes can be enabled/disabled by writing in the PIO_AIMER (Additional Interrupt Modes
Enable Register) and PIO_AIMDR (Additional Interrupt Modes Disable Register). The current state of this selection can
be read through the PIO_AIMMR (Additional Interrupt Modes Mask Register)
These Additional Modes are:
Rising Edge Detection
Falling Edge Detection
Low Level Detection
High Level Detection
In order to select an Additional Interrupt Mode: 
The type of event detection (Edge or Level) must be selected by writing in the set of registers; PIO_ESR (Edge 
Select Register) and PIO_LSR (Level Select Register) which enable respectively, the Edge and Level Detection. 
The current status of this selection is accessible through the PIO_ELSR (Edge/Level Status Register).
The Polarity of the event detection (Rising/Falling Edge or High/Low Level) must be selected by writing in the set 
of registers; PIO_FELLSR (Falling Edge /Low Level Select Register) and PIO_REHLSR (Rising Edge/High Level 
Select Register) which allow to select Falling or Rising Edge (if Edge is selected in the PIO_ELSR) Edge or High or 
Low Level Detection (if Level is selected in the PIO_ELSR). The current status of this selection is accessible 
through the PIO_FRLHSR (Fall/Rise - Low/High Status Register).
When an input Edge or Level is detected on an I/O line, the corresponding bit in PIO_ISR (Interrupt Status Register) is
set. If the corresponding bit in PIO_IMR is set, the PIO Controller interrupt line is asserted.The interrupt signals of the
thirty-two channels are ORed-wired together to generate a single interrupt signal to the interrupt controller.
When the software reads PIO_ISR, all the interrupts are automatically cleared. This signifies that all the interrupts that
are pending when PIO_ISR is read must be handled. When an Interrupt is enabled on a “Level”, the interrupt is
generated as long as the interrupt source is not cleared, even if some read accesses in PIO_ISR are performed. 
Figure 30-7. Event Detector on Input Lines (Figure represents line 0)
30.5.10.1Example
If generating an interrupt is required on the following:
Rising edge on PIO line 0
Falling edge on PIO line 1
Rising edge on PIO line 2
Event Detector
0
1
0
1
1
0
0
1
Edge
Detector
Falling Edge
Detector
Rising Edge
Detector
PIO_FELLSR[0]
PIO_FRLHSR[0]
PIO_REHLSR[0]
Low Level
Detector
High Level
Detector
PIO_ESR[0]
PIO_ELSR[0]
PIO_LSR[0]
PIO_AIMDR[0]
PIO_AIMMR[0]
PIO_AIMER[0]
Event detection on line 0
Resynchronized input on line 0