Skip to content

Add support for V2 boards (CO5300 panel, CST820 touch) - #1

Open
pablogfb wants to merge 1 commit into
GhostlyActive:mainfrom
pablogfb:v2-board-support
Open

Add support for V2 boards (CO5300 panel, CST820 touch)#1
pablogfb wants to merge 1 commit into
GhostlyActive:mainfrom
pablogfb:v2-board-support

Conversation

@pablogfb

Copy link
Copy Markdown

Waveshare ships two incompatible revisions of the ESP32-S3-Touch-AMOLED-1.8 under the same name. Boards from around 2026-05 are V2: a CO5300 panel instead of the SH8601, and a CST820 touch controller at 0x15 instead of the FT3168 at 0x38.

The failure mode is unhelpful — a V1 build on a V2 board leaves the screen black while the firmware runs perfectly over serial, so it reads as a driver bug rather than a hardware mismatch. That's what sent me here.

Selected with -DBOARD_V2=1 via a new env:esp32-s3-amoled-v2. Defaults to V1, so existing builds are unaffected.

What changed

  • Panel driver becomes Arduino_CO5300, with a column offset of 16 — the CO5300's visible 368 columns start at panel RAM column 16, and without the offset the image is shifted and wraps.
  • Touch address becomes 0x15. Nothing else in touch.cpp changes: FT3168 and CST820 share the FocalTech-style register map, so the existing reads of 0x02 for finger count and 0x03..0x06 for coordinates are already correct.
  • platformio.ini gains a [base] section that both envs extend.

The queued-DMA streaming path in display.cpp needed no changes at all — the CO5300 accepts the same write-continue framing (cmd 0x32, addr 0x003C00). That was the part I expected to be painful, and it just worked; the comments there were very helpful in convincing me it was safe to leave alone.

Testing

  • V2: tested on hardware. Boots to [boot] imu=1 touch=1 pmu=1 rtc=1 fs=1 sd=0, menu renders correctly, touch responds, apps run.
  • V1: compiles, but I have no V1 board to test on. The V1 path is unchanged from main other than moving shared settings into [base], so the risk is low — but it is untested by me, and worth a sanity check on your side before merging.

Thanks for building this — the C64 BASIC environment is a delight.

Waveshare ships two incompatible revisions of the ESP32-S3-Touch-AMOLED-1.8
under the same name. Boards from around 2026-05 are V2: the panel is a CO5300
rather than an SH8601, and the touch controller is a CST820 at 0x15 rather
than an FT3168 at 0x38.

The failure mode is unhelpful — a V1 build on a V2 board leaves the screen
black while the firmware runs perfectly over serial, so it reads as a driver
bug rather than a hardware mismatch.

Selected with -DBOARD_V2=1 via a new env:esp32-s3-amoled-v2. Defaults to V1,
so existing builds are byte-for-byte unaffected.

Three changes were needed:

- The panel driver becomes Arduino_CO5300, with a column offset of 16: the
  CO5300's visible 368 columns start at panel RAM column 16, and without the
  offset the image is shifted and wraps.

- The touch address becomes 0x15. Nothing else in touch.cpp changes — FT3168
  and CST820 share the FocalTech-style register map, so the existing reads of
  0x02 for the finger count and 0x03..0x06 for coordinates are already correct.

- platformio.ini gains a [base] section the two envs extend.

The queued-DMA streaming path in display.cpp needed no changes at all: the
CO5300 accepts the same write-continue framing (cmd 0x32, addr 0x003C00).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant