57.7.22 ADC Touchscreen Mode Register

This register can only be written if the WPEN bit is cleared in the ADC Write Protection Mode Register.

Name: ADC_TSMR
Offset: 0xB0
Reset: 0x00000000
Property: Read/Write

Bit 3130292827262524 
 PENDBC[3:0]   PENDET 
Access R/WR/WR/WR/WR/W 
Reset 00000 
Bit 2322212019181716 
  NOTSDMA  TSSCTIM[3:0] 
Access R/WR/WR/WR/WR/W 
Reset 00000 
Bit 15141312111098 
     TSFREQ[3:0] 
Access R/WR/WR/WR/W 
Reset 0000 
Bit 76543210 
   TSAV[1:0]  TSMODE[1:0] 
Access R/WR/WR/WR/W 
Reset 0000 

Bits 31:28 – PENDBC[3:0] Pen Detect Debouncing Period

Debouncing period = 2PENDBC ADCCLK periods.

Bit 24 – PENDET Pen Contact Detection Enable

When PENDET = 1, XPOS, YPOS, Z1, Z2 values of ADC_XPOSR, ADC_YPOSR, ADC_PRESSR are automatically cleared when ADC_ISR.PENS = 0.

ValueDescription
0 Pen contact detection disabled.
1 Pen contact detection enabled.

Bit 22 – NOTSDMA No TouchScreen DMA

ValueDescription
0 XPOS, YPOS, Z1, Z2 are transmitted in ADC_LCDR.
1 XPOS, YPOS, Z1, Z2 are never transmitted in ADC_LCDR, therefore the buffer does not contains touchscreen values.

Bits 19:16 – TSSCTIM[3:0] Touchscreen Switches Closure Time

Defines closure time of analog switches necessary to establish the measurement conditions.

The closure time is:

Switch Closure Time = (TSSCTIM × 4) ADCCLK periods.

Bits 11:8 – TSFREQ[3:0] Touchscreen Frequency

Defines the touchscreen frequency compared to the trigger frequency.

TSFREQ must be greater or equal to TSAV.

The touchscreen frequency is:

Touchscreen Frequency = Trigger Frequency / 2TSFREQ

Bits 5:4 – TSAV[1:0] Touchscreen Average

ValueNameDescription
0 NO_FILTER No filtering. Only one ADC conversion per measure.
1 AVG2CONV Averages 2 ADC conversions.
2 AVG4CONV Averages 4 ADC conversions.
3 AVG8CONV Averages 8 ADC conversions.

Bits 1:0 – TSMODE[1:0] Touchscreen Mode

When TSMOD equals 01 or 10 (i.e., 4-wire mode), channels 0, 1, 2 and 3 must not be used for classic ADC conversions. When TSMOD equals 11 (i.e., 5-wire mode), channels 0, 1, 2, 3, and 4 must not be used.

ValueNameDescription
0 NONE No touchscreen.
1 4_WIRE_NO_PM 4-wire touchscreen without pressure measurement.
2 4_WIRE 4-wire touchscreen with pressure measurement.
3 5_WIRE 5-wire touchscreen.