Atmel Xplained Pro Evaluation Kit ATSAM4E-XPRO ATSAM4E-XPRO Fiche De Données

Codes de produits
ATSAM4E-XPRO
Page de 1506
SAM4E [DATASHEET]
Atmel-11157D-ATARM-SAM4E16-SAM4E8-Datasheet_12-Jun-14
722
Figure 34-7.
Event Detector on Input Lines (Figure Represents Line 0) 
Example of interrupt generation on following lines:
Rising edge on PIO line 0
Falling edge on PIO line 1
Rising edge on PIO line 2
Low-level on PIO line 3
High-level on PIO line 4
High-level on PIO line 5
Falling edge on PIO line 6
Rising edge on PIO line 7
Any edge on the other lines
 details the required configuration for this example.
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
Table 34-2.
Configuration for Example Interrupt Generation
Configuration
Description
Interrupt Mode
All the interrupt sources are enabled by writing 32’hFFFF_FFFF in PIO_IER.
Then the additional interrupt mode is enabled for lines 0 to 7 by writing 32’h0000_00FF in 
PIO_AIMER.
Edge or Level Detection
Lines 3, 4 and 5 are configured in level detection by writing 32’h0000_0038 in PIO_LSR. 
The other lines are configured in edge detection by default, if they have not been previously 
configured. Otherwise, lines 0, 1, 2, 6 and 7 must be configured in edge detection by writing 
32’h0000_00C7 in PIO_ESR.
Falling/Rising Edge or Low/High-Level 
Detection
Lines 0, 2, 4, 5 and 7 are configured in rising edge or high-level detection by writing 
32’h0000_00B5 in PIO_REHLSR.
The other lines are configured in falling edge or low-level detection by default if they have 
not been previously configured. Otherwise, lines 1, 3 and 6 must be configured in falling 
edge/low-level detection by writing 32’h0000_004A in PIO_FELLSR.