English
Language : 

SAM4L Datasheet, PDF (919/1185 Pages) ATMEL Corporation – ATSAM ARM-based Flash MCU
42023C–SAM–02/2013
ATSAM4L4/L2
• LENGTH_COUNT: Number of samples over threshold
– This value is used to track how many samples that have crossed the threshold
(THRESH.RTHRESH and THRESH.FTHRESH), and is compared to
THRESH.LENGTH. This field should be initialized to zero.
• THRESH.LENGTH: Threshold length
• THRESH.DIR: Threshold direction
• THRESH.RTHRESH: Threshold, integer part
• THRESH.FTHRESH: Threshold, fractional part
– Refer to corresponding fields in Section 34.7.7 ”Threshold Register” on page 930.
• IDLE.RIDLE: Sensor Idle Value, integer part
• IDLE.FIDLE: Sensor Idle Value, fractional part
– Refer to corresponding fields in Section 34.7.3 ”Sensor Idle Level” on page 926.
• LEVEL.RLEVEL: Sensor Relative Level, integer part
• LEVEL.FLEVEL: Sensor Relative Level, fractional part
– Refer to corresponding fields in Section 34.7.4 ”Sensor Relative Level” on page 927
• CMPSTATE: Comparator state
– Internal state used by noise filter. This field should be initialized to zero.
• TCHSTATE: Touch state
– State bit used for hysteresis.
0: The sensor is out of touch.
1: The sensor is in touch
• TIMING.TIDLE: Timing constant for the Idle value
• TIMING.TLEVEL: Timing constant for the relative level
– Refer to corresponding fields in Section 34.7.6 ”Filter Timing Register” on page 929.
• RAW.RAWB: Sensor raw value B
• RAW.RAWA: Sensor raw value A
– Refer to corresponding fields in Section 34.7.5 ”Sensor Raw Value” on page 928.
• STATUSSEL: Selection of status bit
– The CATB only has one common interrupt for in- and out-of-touch events
respectively. To assist the software to quickly determine which sensor caused a
interrupt, additional bits in the In- and Out-of-Touch Status registers (INTCH and
OUTTCH) can be updated. The value in this field select which bit that should be
updated. Refer to the Module Configuration section for details on how many such
bits that are implemented.
• PINSEL.PINSEL: Pin selection
– Refer to corresponding field in Section 34.7.8 ”Pin Selection Register” on page 931.
To enable DMA transfers, the user needs to setup the following:
1. Write the individual sensor configurations into an array in RAM, according to the layout
in Table 34-2.
2. Enable the Peripheral DMA Controller in circular mode, pointing it to the RAM array.
Two channels are needed: One for writing to the CATB, and one for reading from the
CATB.
919