Datasheet
944
SAM9X35 [DATASHEET]
11055E–ATARM–10-Mar-2014
42.7.10.4 Pen Detection Status
If the pen detection measure is enabled (PENDET is set in ADC_TSMR register), the XPOS, YPOS, Z1, Z2 values
transmitted to the buffer through ADC_LCDR register are cleared (including the CHNB field), if the PENS flag of
ADC_ISR register is 0. When the PENS flag is set, XPOS, YPOS, Z1, Z2 are normally transmitted.
Therefore, using pen detection together with tag function eases the post-processing of the buffer, especially to determine
which touchscreen converted values correspond to a period of time when the pen was in contact with the screen.
When the pen detection is disabled or the tag function is disabled, XPOS, YPOS, Z1, Z2 are normally transmitted without
tag and no relationship can be found with pen status, thus post-processing may not be easy.
Figure 42-15. Buffer Structure with and without pen detection enabled
Base Address (BA)
BA + 0x02
ADC_XPOSR0
ADC_CDR88
1
BA + 0x04
8
BA + 0x06
ADC_YPOSR1
ADC_XPOSR0
BA + [(N-1) * 6]
BA + [(N-1) * 6]+ 0x02
Assuming ADC_TSMR(TSMOD) = 1, PENDET = 1
ADC_TSMR(TSAV) = ADC_TSMR(TSFREQ) = 0
ADC_CHSR = 0x000_0100 , ADC_EMR(TAG) = 1
trig.event1
DMA buer
Structure
trig.event2
trig.eventN
DMA Transfer
ADC_CDR8
ADC_YPOSR
Assuming ADC_TSMR(TSMOD) = 1, PENDET = 1
ADC_TSMR(TSAV) = ADC_TSMR(TSFREQ) = 0
ADC_CHSR = 0x000_0100 , ADC_EMR(TAG) =0
BA + 0x08
BA + 0x0A
8
00
00
ADC_CDR8
BA + [(N-1) * 6]+ 0x04
ADC_XPOSR0
ADC_CDR80
0
0
ADC_YPOSR0
ADC_XPOSR0
trig.event1
DMA buer
Structure
trig.event2
trig.eventN
ADC_CDR8
ADC_YPOSR
8
00
00
ADC_CDR8
trig.eventN+1
PENS = 1
PENS = 0
PENS = 1
PENS = 0
0
0
0
ADC_CDR8
0
0
0
ADC_CDR8
ADC_XPOSR*
ADC_YPOSR*
ADC_XPOSR*
ADC_YPOSR*
2 successive tags
cleared => PENS = 0
ADC_XPOSR*, ADC_YPOSR* can b
any value when PENS = 0