Atmel SAM4L-EK Atmel ATSAM4L-EK ATSAM4L-EK Data Sheet

Product codes
ATSAM4L-EK
Page of 1204
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 
IDLE.RIDLE: Sensor Idle Value, integer part
IDLE.FIDLE: Sensor Idle Value, fractional part
– Refer to corresponding fields in 
.
LEVEL.RLEVEL: Sensor Relative Level, integer part
LEVEL.FLEVEL: Sensor Relative Level, fractional part
– Refer to corresponding fields in 
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 
RAW.RAWB: Sensor raw value B
RAW.RAWA: Sensor raw value A
– Refer to corresponding fields in 
.
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 
.
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 
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.