Skip to content
Display Engineer
Troubleshooting

CST816S Touch Not Working? I2C Scan, Chip ID, Interrupt and Sleep Fixes

A step-by-step checklist for a CST816S capacitive touch controller that isn't found on I2C, fails at start-up, gives no touch events or reports the wrong coordinates, with the settings for ESPHome, ESP-IDF, Arduino and Linux.

DEDisplay Engineer Applications Team · Display application engineersUpdated Nov 17, 2026

Start here: match the symptom

Symptom

Most likely cause

Go to

Nothing at 0x15 on an I2C scan

Normal for this chip when nobody is touching it; otherwise power or reset

Step 1

Driver fails at start-up with a chip-ID or probe error

The driver reads the ID while the chip is not answering

Step 2

Chip is found, but no touch events arrive

Interrupt pin not wired, wrong edge, or the driver only reads on interrupt

Step 3

Touch works, then stops answering between touches

Auto sleep

Step 4

Touches land in the wrong place, mirrored or rotated

Axis swap or mirror settings, or a read that starts at the wrong register

Step 5

Chip ID is not what the driver expects

A different CST8xx variant on the board

Step 6

The register addresses and timings below come from four open drivers: the Linux hynitron-cst816x driver, Espressif's esp_lcd_touch_cst816s component, ESPHome's cst816 component and the fbiego CST816S Arduino library. Links are in the Sources section. For the register map itself see our CST816S page.

1. An empty I2C scan is often normal

The CST816S uses 7-bit I2C address 0x15. Unlike most touch controllers, it does not answer all the time. Espressif's README puts it this way: the chip "only responds to I2C commands after an event, such as a touch detection. Do not expect it to respond on init." After a touch it asserts its interrupt line and answers I2C reads for a short time.

So before changing any wiring:

  1. Run the I2C scanner again while a finger is on the glass.
  2. If 0x15 appears only while touching, the chip, power and bus are fine. Go to Step 2.
  3. If it never appears, check the supply at the display connector, the pull-ups on SDA and SCL, and the reset line. Reset is active low: a reset pin that is left low, or driven by the wrong GPIO, keeps the chip silent.

On boards where the touch controller shares the bus with another device, a scan that finds the other device proves the bus works. On the Waveshare ESP32-S3-Touch-LCD-1.28, for example, the IMU sits on the same SDA 6 / SCL 7 pair.

2. Start-up fails on the chip ID

Most drivers read the chip ID from register 0xA7 right after reset. If the chip is not answering at that moment, start-up fails even though the hardware is good. Each stack has a switch for this:

Stack

What it does at start-up

How to skip the ID read

ESPHome cst816

Reads 0xA7; marks the component failed if the read fails or the ID is unknown

skip_probe: true

ESP-IDF esp_lcd_touch_cst816s

Reads 0xA7 and logs IC id

Set CONFIG_ESP_LCD_TOUCH_CST816S_DISABLE_READ_ID to y in menuconfig

fbiego CST816S (Arduino)

Reads the version registers but does not check the result

Nothing to change

Linux hynitron-cst816x

Does not read an ID at probe

Nothing to change

ESPHome's documentation says skip_probe "may be required for some variants (e.g. CST816S) that do not respond to i2c commands except after touches are registered". Espressif's README adds that for some chips reading the ID may cause initialization to fail.

Reset timing used by each driver

If your own code resets the chip, use timings at least as long as a driver that is known to work:

Driver

Reset low for

Wait after release

Linux hynitron-cst816x

50 ms

100 ms

Espressif esp_lcd_touch_cst816s

200 ms

200 ms

fbiego CST816S

5 ms

50 ms

ESPHome cst816

5 ms

30 ms

The reset pin is optional in the Linux, Espressif and ESPHome drivers. If the board ties reset to another line, such as the LCD reset, leave it unset in the touch driver so the display is not reset a second time.

3. Found, but no touch events

Check the interrupt pin first

The four drivers treat the interrupt line differently, and this is the most common reason for "detected but dead":

Driver

Interrupt pin

Edge

Linux hynitron-cst816x

Required: probe fails with irq request failed without it

From the device tree

fbiego CST816S

Required in practice: available() only returns true after the interrupt handler has run

Passed to begin()

ESPHome cst816

Optional; without it the component polls

Falling edge

Espressif esp_lcd_touch_cst816s

Optional; falling edge when levels.interrupt = 0

Set by levels.interrupt

With the fbiego library, a wrong IRQ pin number gives exactly this symptom: begin() succeeds, and available() never returns true.

Polling has a catch

Because the chip only answers for a short time after a touch, a polling loop sees failed I2C reads between touches. That is expected. Do not treat one failed read as a fatal error, and do not re-initialise the bus on every failure.

Espressif's README notes a second effect: reading the data several times during one event returns the last sampled position. If you poll faster than the chip samples, you get repeated points, not new ones.

ESPHome writes one register after start-up

After the ID check, ESPHome writes 0x70 to register 0xFA, which its source names the interrupt control register with the "motion" bits enabled. If your own driver behaves differently from ESPHome on the same board, compare what you write to 0xFA with ESPHome's value.

4. Touch works, then the chip stops answering

The CST816S goes to sleep on its own. The fbiego library exposes the registers involved:

Register

Use in the fbiego library

0xFE

Auto sleep: writing a non-zero value disables it, 0x00 enables it

0xF9

Auto sleep time, in seconds

0xA5

Writing 0x03 puts the chip in standby (the library pulses reset first)

ESPHome's source lists the same 0xFE register as "disable auto sleep" and a sleep register at 0xE5.

If you need to read registers at any time, for example to poll without an interrupt, write a non-zero value to 0xFE once the chip is awake. The write itself has to happen while the chip is answering: right after reset, or during a touch. The fbiego library's own sleep routine works the same way: it pulses reset first, then writes the register.

5. Touches land in the wrong place

Know which register your read starts at

The drivers start their read at different registers, and a hand-written driver that mixes two of them is off by one byte:

Driver

Read starts at

Bytes

Where X and Y are

ESPHome cst816

0x00

13

Finger count at index 2, X at 3–4, Y at 5–6

Linux hynitron-cst816x

0x01

6

Gesture, finger count, then X and Y

fbiego CST816S

0x01

6

Same layout as Linux

Espressif esp_lcd_touch_cst816s

0x02

5

Finger count, then X and Y

In every driver X and Y are 12-bit: the low 4 bits of the high byte, then the low byte. If your X jumps by 256 or 4096, the high-nibble mask is missing.

Swap and mirror

The chip reports coordinates in the panel's native orientation. When the display is rotated in software, the touch has to follow:

  • ESP-IDF: set swap_xy, mirror_x and mirror_y in the flags of esp_lcd_touch_config_t, and set x_max and y_max to the panel resolution.
  • ESPHome: use the transform options of the base touchscreen component. If you set no calibration, the cst816 component takes the raw range from the display's native width and height.
  • Arduino with LVGL: apply the same rotation in the read callback that you applied to the display.

Change one setting at a time and test the four corners.

One finger only

The CST816S reports a single finger plus a gesture code. Espressif's driver caps the point count at 1. Pinch and two-finger gestures are not available with this controller.

6. Check which chip is actually fitted

Boards sold with "CST816" touch carry several different parts. ESPHome's source recognises these IDs from register 0xA7:

Chip

ID

CST816S

0xB4

CST816T

0xB5

CST816D

0xB6

CST820

0xB7

CST716

0x20

CST826 (0x11) and CST836 (0x13) return 0 at 0xA7, and ESPHome reads their ID from 0xAA instead.

A driver that accepts only one ID rejects a board that works fine with another. Public configurations for the same board can also disagree: for the capacitive ESP32-2432S024, one project names the controller CST816S and another CST820, both at address 0x15. Read the ID during a touch and compare it with the table before deciding the board is faulty.

Touch pins on common boards

Board

SDA

SCL

INT

RST

Notes

Waveshare ESP32-S3-Touch-LCD-1.28

6

7

5

13

Bus shared with the QMI8658 IMU

ESP32-2432S024, capacitive version

33

32

21

25

CST816S or CST820, depending on the source

LilyGO T-Display-S3, Touch version

18

17

16

21

CST816-series; early units used a CST328 at 0x1A

The sources for each row are on the linked board page.

Still stuck

  • Run the board vendor's own touch demo. If it works, the hardware is good and the problem is in your configuration.
  • If touches appear that nobody made, see the ghost-touch notes on our CST816S page.
  • For a round 1.28″ display with this controller, our GC9A01 round display guide covers the display side.

Frequently asked questions

Why does my I2C scanner not find the CST816S?

The CST816S only answers on I2C for a short time after a touch event, so a scan at boot usually finds nothing at 0x15. Run the scan while touching the screen. If it still does not appear, check power, the SDA and SCL pull-ups and that the reset pin is not held low.

How do I fix “Failed to read chip ID” for the CST816S in ESPHome?

Add skip_probe: true to the cst816 touchscreen entry. ESPHome then skips reading the chip ID at start-up, which fails on variants that do not answer I2C until they are touched.

The CST816S is detected but I get no touch events. What should I check?

Check the interrupt pin. The Linux driver will not probe without one, and the fbiego Arduino library only reports a touch after its interrupt handler has run, so a wrong IRQ pin gives a driver that starts but never reports. ESPHome and Espressif's driver can poll without an interrupt.

Why does the CST816S stop responding between touches?

It goes to sleep automatically and only answers again after the next touch. Failed reads between touches are expected. To keep it awake, write a non-zero value to register 0xFE while the chip is answering, for example right after reset.

Sources

  1. Espressif ESP-BSP: esp_lcd_touch_cst816s README (commit fb5714e0)
  2. Espressif ESP-BSP: esp_lcd_touch_cst816s.c (commit fb5714e0)
  3. ESPHome: cst816_touchscreen.cpp (commit 0054041d)
  4. ESPHome: cst816_touchscreen.h, register and chip-ID constants (commit 0054041d)
  5. ESPHome documentation: CST816 touchscreen (skip_probe)
  6. Linux kernel: drivers/input/touchscreen/hynitron-cst816x.c (commit 666539ee)
  7. fbiego/CST816S Arduino library: CST816S.cpp (commit 11fe1fba)

Not sure which display fits your design?

Send us your size, interface and host processor. A display engineer replies within 12 hours with 2–3 options, datasheets and init code. Samples from 1 pc.