English
Language : 

SAM4L Datasheet, PDF (913/1185 Pages) ATMEL Corporation – ATSAM ARM-based Flash MCU
ATSAM4L4/L2
The CATB also depends on the acquisition clock (CLK_ACQ). This clock can be configured to
be either a dedicated generic clock (GCLK), or a dedicated RC oscillator. The GCLK must be
enabled in the System Control Interface (SCIF) before the CATB can be used. The RC oscillator
is automatically enabled when needed. The RC oscillator and GCLK used is specified in the
Module Configuration section.
34.5.4 Interrupts
The CATB interrupt request line is connected to the NVIC. Using the CATB interrupt requires the
NVIC to be configured first.
34.5.5
Direct Memory Access
The CATB can use DMA to switch its configuration when sensing multiple sensors. Two Periph-
eral DMA channels must be configured: One for transferring configuration and state data into the
CATB, and one for storing the updated values back to RAM.
34.5.6
Debug Operation
When an external debugger forces the CPU into debug mode, the CATB continues normal oper-
ation. If the CATB is configured in a way that requires it to be periodically serviced by the CPU
through interrupts or similar, improper operation or data loss may result during debugging. Care
must be taken when accessing the DMA register when the CATB is in DMA mode, as accessing
this register can be misinterpreted as DMA handshakes by the CATB.
34.6 Functional Description
34.6.1
Principle of Operation
The CATB module detects touch by measuring change in sensor capacitance. The capacitance
is measured by charging the sensor to a potential, and then timing the discharge through a resis-
tor, yielding a measurement reflecting the current RC value. The Capacitance Counter block in
Figure 34-1 and Figure 34-2 performs the charge/discharge cycling, and reports measured val-
ues to the filter.
Figure 34-2. CATB Signal Filter
Filter
-
Capacitance
Counter
measured
IDLE
Idle Tracker
correction
RAW Noise filter
Averaging
filter
LEVEL
42023C–SAM–02/2013
As shown in Figure 34-2, the filter receives the measured values, subtracts a bias (the IDLE
value), and filters away noise before using this as a correction value for the Idle Tracker. The fil-
tered signal is further smoothed before yielding the filtered LEVEL signal.
The application can record and process the acquired LEVEL values in order to implement
advanced touch-detection algorithms, or use the configurable thresholds to generate interrupts.
913