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 | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | |
| PENDBC[3:0] | PENDET | ||||||||
| Access | R/W | R/W | R/W | R/W | R/W | ||||
| Reset | 0 | 0 | 0 | 0 | 0 | ||||
| Bit | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | |
| NOTSDMA | TSSCTIM[3:0] | ||||||||
| Access | R/W | R/W | R/W | R/W | R/W | ||||
| Reset | 0 | 0 | 0 | 0 | 0 | ||||
| Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | |
| TSFREQ[3:0] | |||||||||
| Access | R/W | R/W | R/W | R/W | |||||
| Reset | 0 | 0 | 0 | 0 | |||||
| Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
| TSAV[1:0] | TSMODE[1:0] | ||||||||
| Access | R/W | R/W | R/W | R/W | |||||
| Reset | 0 | 0 | 0 | 0 | |||||
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.
| Value | Description |
|---|---|
| 0 | Pen contact detection disabled. |
| 1 | Pen contact detection enabled. |
Bit 22 – NOTSDMA No TouchScreen DMA
| Value | Description |
|---|---|
| 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
| Value | Name | Description |
|---|---|---|
| 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.
| Value | Name | Description |
|---|---|---|
| 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. |
