English
Language : 

SAM4L Datasheet, PDF (918/1185 Pages) ATMEL Corporation – ATSAM ARM-based Flash MCU
ATSAM4L4/L2
4. The updated data is written back to memory, overwriting the previous configuration and
state
5. The DMA write pointer is incremented, and the next write to memory will write the data
for sensor 2
Using the ring buffer feature of the DMA controller, the system will go cyclically through the sen-
sors set up in memory.
Detected touch events for different sensor configurations are reported in the In-touch Status bits
in the In-Touch Registers (INTCHn.INTCHm), and in the Out-of-Touch Status bits in the Out-of-
Touch Registers (OUTTCHn.OUTTCHm). When bits in these registers are set, the ISR.INTCH
or ISR.OUTTCH bits are also set. The switched data contains the following:
• Timing information (as described in the TIMING register)
• Current IDLE and LEVEL values
• Threshold configuration (as described in the THRESH register)
• Current Touch State (TCHSTATE); zero being out-of touch, selecting THRESH for monitoring,
and one being in-touch, selecting THRESH/2 for monitoring
• Status Bit Select (STATUSSEL), selecting INTCHn.INTCHm, and OUTTCHn.OUTTCHm
• Internal states for the DSP (should be initialized to zero); Length Count (LENGTH_COUNT),
counting samples beyond thresholds, and Comparator State (CMPSTATE), a filter cache
Table 34-2. Layout of Data in Memory for One Sensor Configuration
Byte/Bit
7
6
5
4
3
2
1
0
0
-
LENGTH_COUNT[4:3]
THRESH.LENGTH[4:0]
1
THRESH.DIR
LENGTH_COUNT[2:0]
THRESH.RTHRESH[7:4]
2
THRESH.RTHRESH[3:0]
THRESH.FTHRESH[11:8]
3
THRESH.FTHRESH[7:0]
4
-
-
-
-
IDLE.RIDLE[15:12]
5
IDLE.RIDLE[11:4]
6
IDLE.RIDLE[3:0]
IDLE.FIDLE[11:8]
7
IDLE.FIDLE[7:0]
8
-
-
-
-
-
-
-
-
9
-
-
-
-
LEVEL.RLEVEL[7:4]
10
LEVEL.RLEVEL[3:0]
LEVEL.FLEVEL[11:8]
11
LEVEL.FLEVEL[7:0]
12
CMPSTATE TCHSTATE
-
-
TIMING.TIDLE[11:8]
13
TIMING.TIDLE[7:0]
14
-
-
-
-
TIMING.TLEVEL[11:8]
15
TIMING.TLEVEL[7:0]
16
RAW.RAWB[7:0]
17
RAW.RAWA[7:0]
18
STATUSSEL[7:0]
19
PINSEL.PINSEL[7:0]
42023C–SAM–02/2013
918