Datasheet

924
42023E–SAM–07/2013
ATSAM4L8/L4/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 935.
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 931.
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 932
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 934.
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 933.
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 936.
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.