<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by DisplayEngineer on Medium]]></title>
        <description><![CDATA[Stories by DisplayEngineer on Medium]]></description>
        <link>https://medium.com/@displayengineer?source=rss-92b7b01c40a0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by DisplayEngineer on Medium</title>
            <link>https://medium.com/@displayengineer?source=rss-92b7b01c40a0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 23:31:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@displayengineer/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[PlatformIO espressif32 8.0.0 just broke a pile of CYD and TFT builds]]></title>
            <link>https://medium.com/@displayengineer/platformio-espressif32-8-0-0-just-broke-a-pile-of-cyd-and-tft-builds-32665a59c7fa?source=rss-92b7b01c40a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/32665a59c7fa</guid>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[platformio]]></category>
            <category><![CDATA[cyd]]></category>
            <category><![CDATA[tft]]></category>
            <category><![CDATA[arduino]]></category>
            <dc:creator><![CDATA[DisplayEngineer]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 02:18:35 GMT</pubDate>
            <atom:updated>2026-10-21T02:18:35.161Z</atom:updated>
            <content:encoded><![CDATA[<h4>espressif32 8.0.0 broke CYD builds overnight. Pin 7.1.3, or fix esptool + partitions for 8.x.</h4><p>I upgraded PlatformIO on Monday morning, hit build on a Cheap Yellow Display sketch that had been fine last week, and watched it die before the bootloader image even existed.</p><p>The log looked like a Python joke I wasn’t in on. Something about esptool, line 1, the word ELF, and SyntaxError: source code cannot contain null bytes. For a second I thought my penv was corrupted. Then I noticed the date on the platform release.</p><p><a href="https://github.com/platformio/platform-espressif32/releases/tag/v8.0.0">platform-espressif32 v8.0.0</a> went out on 2026–10–19 at 10:23 UTC, tagged by valeros. Arduino core jumped to v3.3.12 (IDF v5.5.5). ESP-IDF framework is v6.1. They switched to prebuilt esptool binaries v5.4, added 72 new boards, and the config line is the usual:</p><pre>platform = espressif32 @ ~8.0.0</pre><p>If your platformio.ini just said platform = espressif32 with no pin, PlatformIO quietly pulled 8.0.0. That is how a bunch of CYD and TFT projects woke up broken on Tuesday. Same Monday, same platform bump, three different failure modes depending on what your sketch was doing.</p><p>I’m not going to pretend I recompiled every sketch on my desk. I work at a display module company (Display Engineer / displayengineer.com), so I see a lot of these boards come through support threads and GitHub noise. What follows is what other repos actually did in the first day, and what I’d pin for a typical 4MB CYD TFT sketch until I’ve retested it myself.</p><h3>The null-bytes error is the loudest one</h3><p>FluidDial-CYD hit it first that I noticed. Issue <a href="https://github.com/dJOS1475/FluidDial-CYD/issues/14">#14</a> is closed now, but the diagnosis is worth keeping.</p><p>PlatformIO was running the prebuilt esptool ELF through Python:</p><pre>.../penv/bin/python .../tool-esptool/esptool --chip esp32 elf2image ...</pre><p>Python opened a native binary, saw null bytes, and quit. Same trap showed up in their build_merged.py, which still called python esptool.py for the web-installer merge step. So even if the main pio run path had been patched somehow, the merged image for the web installer would have failed the same way.</p><p>The issue author suggested pinning to 7.1.3. The maintainer went further back: espressif32@6.12.0, because that&#39;s what every published release of FluidDial had been tested on. Not 7.1.3. Deliberate. Fresh clone, known toolchain, hardware already validated. They also fixed the merge script path so it wouldn&#39;t trip the same way later. The note about wiping the cached platform under ~/.platformio/platforms/espressif32 is easy to miss — if PIO already resolved 8.0.0 once, a pin in the ini alone may not be enough until you force a re-fetch.</p><p>fwiw that matches how I’d treat a shipping CYD product firmware. If the last good flash was on 6.12.0, don’t “upgrade into” a major platform bump on a Monday just because PlatformIO offered you one.</p><h3>Flash size is the quiet one</h3><p>countdown-esp32 took the opposite route. Their <a href="https://github.com/nvorkinn/countdown-esp32/pull/14">PR #14</a> (merged) bumps to 8.0.0 on purpose.</p><p>Firmware came out around 1.47 MB. Default app slot is 1.25 MB. checkprogsize failed with numbers like 1,471,308 / 1,474,128 against a 1,310,720 limit. They switched to board_build.partitions = huge_app.csv — 3 MB app slot, no second OTA slot. Fine for a device that doesn&#39;t do OTA. Not fine if you were counting on the dual-app layout and planned to push updates over the air later.</p><p>Their merge script had the same python esptool problem. On 8.0.0 you have to call the native binary and use the hyphenated CLI names (merge-bin, --flash-mode, and friends). The PR notes, honestly, that nothing was hardware-verified at merge time. CI was the first full build. That&#39;s the kind of honesty I wish more upgrade PRs put in the description.</p><p>So if you’re staring at a “sketch grew by a couple hundred KB” after the core 3.x bump, you’re not imagining it. Arduino-ESP32 3.x is heavier. A tight 4MB CYD layout that was already near the default app ceiling will fail checkprogsize before you ever see the panel light up. I&#39;d rather catch that in the size check than flash a half-broken image and wonder why the boot loop looks different this week.</p><h3>BLE is the sneaky one</h3><p>berbel-remote isn’t a display project, but the failure mode will hit anyone who bolted NimBLE onto a CYD for a remote or a phone companion app.</p><p><a href="https://github.com/tfohlmeister/berbel-remote/pull/7">PR #7</a> (merged) pins to 7.1.3. On 8.0.0 the sketch <em>builds</em>, then NimBLEDevice::init() aborts with ESP_ERR_INVALID_STATE from esp_bt_controller_init(). Core 3.x frees the BLE controller memory in initArduino() unless bleInUse() / btInUse() is overridden. NimBLE-Arduino 1.4.3 doesn&#39;t override it. The release notes for 8.0.0 even flag that Arduino-ESP32 3.x does not yet include the full Bluetooth refactoring planned for v4.0, so this kind of mismatch was always going to show up somewhere.</p><p>Flash use on esp32dev went from about 55% to 73% on 8.0.0 in their local check. Again: builds, then dies at runtime. Easy to misread as a wiring or board problem if you only look at the serial log after flash and start probing the TFT pins.</p><p>I’d keep that in mind for any CYD sketch that does BLE + TFT. The display init can look fine while BLE is already dead.</p><h3>What I’d actually put in platformio.ini</h3><p>For a typical 4MB CYD / TFT Arduino sketch that I haven’t retested on 8.0.0 yet, I’d pin. Something like:</p><pre>; last known-good for this sketch — do not float to 8.x yet<br>platform = espressif32 @ 7.1.3</pre><p>Or, if the project was always built on an older line like FluidDial, pin that exact version:</p><pre>platform = espressif32 @ 6.12.0</pre><p>7.1.3 is the safe “recent but not 8” choice a lot of people are landing on. 6.12.0 is the “this is what we shipped” choice. Jumping to 8.0.0 is fine only when you’ve got partition headroom, you’ve stopped calling python esptool / python esptool.py in custom scripts, and you&#39;ve actually run the thing on hardware — especially if NimBLE or other BLE stacks are in the mix.</p><p>If you do move to 8.0.0, the three things that bit people in the first 24 hours were the esptool invocation (native binary, not Python), the app partition size (huge_app or a custom table once you’re over about 1.25 MB), and BLE init assumptions that were true on core 2.x and are not on 3.x. Fix those first. Don’t start rewriting your TFT driver.</p><p>I’m leaving ESPHome out of the “just pin this” advice on purpose. ESPHome users are on a different stack — YAML, usually mipi_spi / IDF under the hood, not a hand-rolled PlatformIO Arduino sketch. This whole piece is Arduino / PlatformIO sketch land. Don&#39;t copy a platform = line into an ESPHome config and expect it to mean the same thing.</p><h3>Where this leaves the CYD pages</h3><p>We keep a compatible note for the common 2.8&quot; CYD board at <a href="https://www.displayengineer.com/compatible/esp32-2432s028r-cyd">displayengineer.com/compatible/esp32–2432s028r-cyd</a>, and there’s a small set of example configs on <a href="https://github.com/qiren/esphome-tft-display-examples">github.com/qiren/esphome-tft-display-examples</a>. The GitHub repo is more ESPHome-oriented; the compatible page is the one I’d open if you’re wiring a PIO Arduino sketch to that panel and just need pin / driver context.</p><p>Neither of those is a magic “works on 8.0.0” badge. I haven’t walked every example through this platform bump. What I have seen, in public repos within a day of the release, is three different sane reactions: pin to the last tested line (FluidDial → 6.12.0), pin to the last pre-8 line (berbel → 7.1.3), or take 8.0.0 with partition and script fixes and admit hardware verification is still pending (countdown).</p><p>If your build started failing on or after 2026–10–19 with null bytes in esptool, or with a sudden checkprogsize fail, or with NimBLE aborting on a board that used to boot, check your platform pin before you rewire the TFT.</p><p>I’d start there. Then flash one board you can afford to mess with for an afternoon, and only then decide whether 8.0.0 is worth the partition surgery.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32665a59c7fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving a Sunton 4.3-inch ESP32-S3 screen off rpi_dpi_rgb before it’s gone]]></title>
            <link>https://medium.com/@displayengineer/moving-a-sunton-4-3-inch-esp32-s3-screen-off-rpi-dpi-rgb-before-its-gone-f5e3eda0e057?source=rss-92b7b01c40a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5e3eda0e057</guid>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[esphome]]></category>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[home-assistant]]></category>
            <dc:creator><![CDATA[DisplayEngineer]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 16:21:02 GMT</pubDate>
            <atom:updated>2026-10-20T16:21:02.932Z</atom:updated>
            <content:encoded><![CDATA[<p>I was going through an old ESPHome config for the Sunton ESP32–8048S043C, the 4.3-inch 800x480 board with the GT911 touch panel, and the compile log had this in it:</p><pre>WARNING The &#39;rpi_dpi_rgb&#39; component is deprecated, it is recommended to use &#39;mipi_rgb&#39; instead.</pre><p>That line has been there since April, and I’d been ignoring it like most people. What changed is <a href="https://github.com/esphome/esphome/pull/20691">PR #20691</a>, merged last week. It puts a date on it: the warning now says the component “will be removed in ESPHome 2027.5.0, migrate to ‘mipi_rgb’ instead.” It ships in 2026.11, so there are about six months left.</p><p>So I sat down and did the move on paper. I want to be upfront about what that means. The YAML below comes from the <a href="https://esphome.io/components/display/mipi_rgb/">mipi_rgb docs</a>, the mipi_rgb source on the 2026.9.1 release branch and two community configs for this board. It passes esphome config and builds with ESPHome 2026.9.1, but I haven&#39;t flashed this exact file to a board yet. Treat every number as a starting point.</p><h3>There’s no preset for this board</h3><p>My first hope was a one-line model:. The docs list presets for the Sunton ESP32-8048S050 and ESP32-8048S070, the Waveshare ESP32-S3-Touch-LCD-4.3 and a handful of others. The 8048S043 isn&#39;t one of them, not on esphome.io, not on next.esphome.io, and not in the models/ folder on the dev branch either.</p><p>That leaves model: RPI. In mipi_rgb that means a panel with no SPI configuration port, so no init sequence gets sent. That fits this board. The panel is an ST7262-class 800x480 TFT and the ESP32 just streams 16-bit RGB at it with DE, HSYNC, VSYNC and PCLK.</p><p>One odd thing I noticed while reading the source: the ESP32–8048S050 preset uses exactly the pins and porch values people publish for the 043. Same DE/HSYNC/VSYNC/PCLK pins, same 8/4/8 timings, same data pins, 16MHz. It’s tempting to just write model: ESP32-8048S050. I didn&#39;t, because &quot;the numbers happen to match&quot; isn&#39;t something I&#39;d want to recommend before seeing it on a real board.</p><h3>The defaults moved, and that’s the trap</h3><p>This is the part I’d have tripped over. If you copy your old display block and tidy it up by deleting the lines that “are probably defaults anyway”, the panel won’t get the same timing.</p><p>I checked by running esphome config on 2026.9.1 with the timing lines removed. With model: RPI, the resolved config came back with pclk_frequency: 40000000.0 and every porch and pulse width set to false, so zero. The docs page says the pclk default is 8MHz, but the schema in the source falls back to 40MHz for any model that doesn&#39;t set its own, and RPI doesn&#39;t. The old rpi_dpi_rgb defaulted to 16MHz with non-zero porches, so a config that leaned on those defaults was quietly getting sane values.</p><p>So keep every timing line explicit. Here’s the version I’d start from. Pins and timings come from the <a href="https://github.com/esphome/esphome-devices/blob/main/src/docs/devices/Sunton-ESP32-8048S043C/index.md">esphome-devices page for this board</a> and Ryan Ewen’s <a href="https://community.home-assistant.io/t/esp32-8048s043-sunton-4-3-cyd-config/780603">config thread on the HA forum</a>, and they agree with each other.</p><pre># Written from docs + source, NOT flashed to hardware yet.<br>esp32:<br>  variant: esp32s3<br>  board: esp32-s3-devkitc-1<br>  flash_size: 16MB<br>  framework:<br>    type: esp-idf<br>    advanced:<br>      execute_from_psram: true<br>    sdkconfig_options:<br>      CONFIG_ESP32S3_DATA_CACHE_64KB: y<br>      CONFIG_ESP32S3_DATA_CACHE_LINE_64B: y</pre><pre>psram:<br>  mode: octal<br>  speed: 80MHz</pre><pre>display:<br>  - platform: mipi_rgb<br>    id: main_display<br>    model: RPI<br>    dimensions:<br>      width: 800<br>      height: 480<br>    de_pin: GPIO40<br>    hsync_pin: GPIO39<br>    vsync_pin: GPIO41<br>    pclk_pin: GPIO42<br>    pclk_frequency: 16MHz<br>    pclk_inverted: true<br>    hsync_pulse_width: 4<br>    hsync_back_porch: 8<br>    hsync_front_porch: 8<br>    vsync_pulse_width: 4<br>    vsync_back_porch: 8<br>    vsync_front_porch: 8<br>    data_pins:<br>      red: [45, 48, 47, 21, 14]<br>      green: [5, 6, 7, 15, 16, 4]<br>      blue: [8, 3, 46, 9, 1]</pre><p>If you leave out lambda, pages and LVGL, mipi_rgb draws its test card on its own. That&#39;s a nice first boot, since you can see straight away whether the colours and the corner marker are where they should be.</p><p>Ryan has already moved his own repo to mipi_rgb with model: RPI (<a href="https://github.com/RyanEwen/esphome-lvgl/blob/main/devices/ESP32-8048S043.yaml">his current file</a>). He runs 14MHz and the comment next to it literally says &quot;unsure about this&quot;. Honest, and kind of the point of the next bit.</p><h3>Flicker and drift are usually PSRAM, not the panel</h3><p>An 800x480 frame at 16 bits is 768,000 bytes, so it lives in PSRAM. Reading mipi_rgb.cpp, the driver puts the frame buffer in PSRAM and sets a bounce buffer of 10 lines (width * 10 pixels). The CPU copies lines from PSRAM into internal RAM and the LCD peripheral reads from there. When that copy can&#39;t keep up, you get the image crawling sideways or rolling, which Espressif calls drift.</p><p>Espressif’s <a href="https://docs.espressif.com/projects/esp-faq/en/latest/software-framework/peripherals/lcd.html">LCD FAQ</a> is blunt about the causes. Octal PSRAM at 80MHz tops out somewhere around 22MHz pixel clock in their testing. Bounce buffer mode needs CONFIG_ESP32S3_DATA_CACHE_LINE_64B, or the screen may drift. And PSRAM is blocked while flash is being written, which happens with Wi-Fi, OTA and so on, unless code runs from PSRAM. That last one is why I used execute_from_psram: true. It sets CONFIG_SPIRAM_XIP_FROM_PSRAM, which in ESP-IDF 5.5 just selects the old SPIRAM_FETCH_INSTRUCTIONS and SPIRAM_RODATA pair that most community configs still list by hand.</p><p>The forum history lines up with that. In the long <a href="https://community.home-assistant.io/t/esp32-s3-4-3inch-capacitive-touch-display-from-waveshare/658279">Waveshare 4.3 thread</a>, a config with PSRAM at 120MHz flickered all over the place for the next person who tried it, and the answer that stuck was that 80MHz “seems to get rid of the screen flickering”. Further down, someone whose board kept resetting fixed it by adding the psram: block they&#39;d left out. clydebarrow, who maintains these drivers, also told one person their YAML worked fine for him and to suspect the 5V supply, which is worth remembering before you spend an evening on porch values.</p><p>The pixel clock matters too. In a <a href="https://github.com/lovyan03/LovyanGFX/discussions/672">LovyanGFX discussion</a> about this exact board, the poster found 15MHz was “only this value normal”. So 16MHz isn’t sacred. If the image wobbles, step down a megahertz or two before touching anything else.</p><p>Two more I’d keep in my back pocket. If the screen only twitches when a DS18B20 updates, read <a href="https://community.home-assistant.io/t/lvgl-twitches-with-dallas-ds18b20-temperature-sensor/828773">this thread</a>. People on the 8048S050 and 8048S070 saw that, and the cause seems to be one_wire holding interrupts off. And there’s an open issue (<a href="https://github.com/esphome/issues/issues/7248">esphome/issues#7248</a>) where the 10-line bounce buffer fails on panels whose height isn’t a multiple of 10. 480 is fine, but the 480x272 cousin, the ESP32–4827S043, gets a solid white screen. The reporter checked and mipi_rgb has the same line, so switching drivers won’t fix that one.</p><h3>Red and blue swapped after the move</h3><p>This one is subtle and it’s in the source, not the docs. In rpi_dpi_rgb, color_order decided which pin list went where on the bus, and the default was BGR. In mipi_rgb, since <a href="https://github.com/esphome/esphome/pull/12309">PR #12309</a> in December 2025, the data pins always go on the bus as blue, green, red, and color_order only ends up in the MADCTL byte of the SPI init sequence. With model: RPI there is no init sequence. As far as I can read the code, color_order does nothing on this board.</p><p>The good news is that both community configs for the 043 used color_order: RGB, which gives the same order as mipi_rgb now does. So those pin lists carry over unchanged. If your old file never set color_order, it was using BGR, and after migrating red and blue will swap. Fix it by swapping the lists under red: and blue:, not by flipping color_order. The Waveshare 7-inch preset had a red/blue mix-up of its own back in <a href="https://github.com/esphome/esphome/issues/10772">#10772</a>, so this isn&#39;t hypothetical.</p><p>Each list is least significant bit first, per the docs. If colours are wrong but not simply swapped, check that before anything else.</p><h3>Touch and backlight are their own components</h3><p>mipi_rgb only does pixels. The GT911 sits on I2C, and on this board that’s GPIO19 and GPIO20, which are also the S3’s USB-Serial-JTAG pins, so ESPHome prints a warning for both on every build. That’s expected here. Neither community config sets an interrupt_pin, so the touch is polled. If the controller doesn&#39;t show up at 0x5D, the address and reset quirks are in our <a href="https://www.displayengineer.com/guides/gt911-touch-not-working">GT911 troubleshooting guide</a>.</p><pre>i2c:<br>  sda: GPIO19<br>  scl: GPIO20</pre><pre>touchscreen:<br>  - platform: gt911<br>    id: main_touch<br>    display: main_display</pre><pre>output:<br>  - platform: ledc<br>    id: backlight_pwm<br>    pin: GPIO2<br>    frequency: 1220Hz</pre><pre>light:<br>  - platform: monochromatic<br>    id: backlight<br>    name: Backlight<br>    output: backlight_pwm<br>    restore_mode: ALWAYS_ON</pre><p>The backlight is GPIO2 on both configs I copied, driven through LEDC so you can dim it from Home Assistant. If the log says the display set up fine but the glass is dark, look here first. If you rotate the screen, expect to play with the touchscreen transform. Ryan&#39;s file uses swap_xy and mirror_y with the rotation set in LVGL.</p><p>If you get this onto a board before I do and a number turns out wrong, tell me. I’d rather fix it here than have you chase my typo. The SPI panel side of the same migration is in our <a href="https://github.com/qiren/esphome-tft-display-examples">ESPHome display examples repo</a>.</p><p><em>I work at DisplayEngineer, a display module maker, so RGB timing tables are a normal part of my week.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5e3eda0e057" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GC9A01 Round Display on ESP32-S3 with ESPHome mipi_spi: Fixing the Blank Screen, Colours and…]]></title>
            <link>https://medium.com/@displayengineer/gc9a01-round-display-on-esp32-s3-with-esphome-mipi-spi-fixing-the-blank-screen-colours-and-919bcc89948d?source=rss-92b7b01c40a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/919bcc89948d</guid>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[electronics]]></category>
            <category><![CDATA[esphome]]></category>
            <dc:creator><![CDATA[DisplayEngineer]]></dc:creator>
            <pubDate>Sun, 18 Oct 2026 16:20:56 GMT</pubDate>
            <atom:updated>2026-10-18T16:20:56.336Z</atom:updated>
            <content:encoded><![CDATA[<h3>GC9A01 Round Display on ESP32-S3 with ESPHome mipi_spi: Fixing the Blank Screen, Colours and Orientation</h3><h3>A symptom-by-symptom bring-up guide for 1.28-inch 240x240 round TFTs after the ili9xxx → mipi_spi migration</h3><p>ESPHome now prints The &#39;ili9xxx&#39; component is deprecated, it is recommended to use &#39;mipi_spi&#39; instead when you compile an old display config. That warning sent a lot of people to the new mipi_spi driver this year, and the GitHub issue tracker shows the usual results: screens that stay black, colours that look wrong, and the cryptic Invalid offsets. error.</p><p>This post walks through bringing up the most common round panel, a 1.28-inch 240×240 IPS TFT with a GC9A01(A) controller, on an ESP32-S3 with mipi_spi. It is organised by symptom, because that is how you will meet these problems on the bench.</p><blockquote><strong><em>Status of the code below:</em></strong><em> the YAML is written from the ESPHome documentation, the </em><em>mipi_spi source code and the GitHub issues linked at the end. </em><strong><em>I have not run this exact file on hardware yet</em></strong><em>, so treat every value as a starting point and check it against your own panel.</em></blockquote><h3>1. What you are actually driving</h3><p>A 1.28&quot; round module is a square 240×240 controller with a circular piece of glass in front of it. The GC9A01A has 129,600 bytes of GRAM, exactly 240 × 240 × 18 bits. Most 1.28&quot; panels quote an active area of Ø32.4 mm with a 0.135 mm pixel pitch, and 240 × 0.135 mm = 32.4 mm, so the visible circle is the circle inscribed in the 240×240 square. Pixels in the four corners are addressable but you will never see them.</p><p>Two practical consequences:</p><ul><li><strong>Offsets are zero.</strong> Unlike a 240×240 ST7789 panel, which uses only part of a 240×320 controller, the GC9A01A’s native size <em>is</em> 240×240. If your image looks shifted, the cause is almost never a missing offset (see section 5).</li><li><strong>Design for a circle.</strong> Keep text and touch targets inside a radius of about 120 px from the centre (120, 120). Anything in the corners is clipped by the glass.</li></ul><h3>2. Wiring and ESP32-S3 pin choice</h3><p>Bare panels and breakout boards label the pins differently. Many breakouts print <strong>SCL/SDA</strong>, which are SPI clock and data here, not I²C. Waveshare’s board uses DIN/CLK for the same signals.</p><ul><li><strong>VCC</strong>: Function: 3.3 V supply (check if your breakout has a regulator); Example ESP32-S3 GPIO: 3V3</li><li><strong>GND</strong>: Function: Ground; Example ESP32-S3 GPIO: GND</li><li><strong>SCL / CLK / SCK</strong>: Function: SPI clock; Example ESP32-S3 GPIO: GPIO12</li><li><strong>SDA / DIN / MOSI</strong>: Function: SPI data in; Example ESP32-S3 GPIO: GPIO11</li><li><strong>DC (sometimes RS)</strong>: Function: Data/command select; Example ESP32-S3 GPIO: GPIO9</li><li><strong>CS</strong>: Function: Chip select, active low; Example ESP32-S3 GPIO: GPIO10</li><li><strong>RST</strong>: Function: Reset, active low; Example ESP32-S3 GPIO: GPIO14</li><li><strong>BL</strong>: Function: Backlight enable / PWM; Example ESP32-S3 GPIO: GPIO13</li></ul><p>The ESP32-S3 routes SPI through its GPIO matrix, so almost any free pins will work. Espressif’s GPIO documentation lists a few pins to avoid:</p><ul><li><strong>GPIO26 to GPIO32</strong> are normally used by the SPI flash and PSRAM.</li><li>On modules with <strong>octal PSRAM or octal flash</strong> (the R8 parts, for example the popular N16R8 boards), <strong>GPIO33 to GPIO37</strong> are taken as well.</li><li><strong>GPIO0, 3, 45 and 46</strong> are strapping pins.</li><li><strong>GPIO19 and 20</strong> are USB-JTAG by default.</li></ul><p>Keep the wires short. ESPHome’s documentation says outright that DuPont leads limit the SPI speed you can reach.</p><h3>3. A minimal starting config (untested)</h3><pre># UNTESTED - written from the ESPHome docs; verify on your hardware.<br>esp32:<br>  board: esp32-s3-devkitc-1<br>  framework:<br>    type: esp-idf</pre><pre>psram:            # only if your module has PSRAM<br>  mode: octal     # ESP32-S3 has no default; N16R8-type modules use octal<br>  speed: 80MHz</pre><pre>spi:<br>  id: display_spi<br>  clk_pin: GPIO12<br>  mosi_pin: GPIO11</pre><pre>output:<br>  - platform: ledc<br>    id: backlight_pwm<br>    pin: GPIO13</pre><pre>light:<br>  - platform: monochromatic<br>    id: backlight<br>    name: &quot;Display Backlight&quot;<br>    output: backlight_pwm<br>    restore_mode: ALWAYS_ON</pre><pre>display:<br>  - platform: mipi_spi<br>    id: round_display<br>    model: GC9A01A<br>    spi_id: display_spi<br>    cs_pin: GPIO10<br>    dc_pin: GPIO9<br>    reset_pin: GPIO14<br>    data_rate: 10MHz        # driver default; raise later<br>    invert_colors: true     # IPS GC9A01 panels usually need this (see section 4)<br>    show_test_card: true    # remove once geometry and colours are correct</pre><p>Notice what is <strong>not</strong> in this file: no dimensions, no rotation, no transform. The GC9A01A model already knows it is 240×240. Get the native orientation right first and add rotation afterwards. The ESPHome maintainers recommend exactly that order in issue #17074.</p><p>show_test_card: true is the most useful line here. According to the ESPHome display docs, it draws red, green and blue bars that fade to black and white, the letters R, G and B, a rectangle around the edges, and a marker at the 0,0 corner, which should sit at the top left. On a round panel the corners of that rectangle are cut off, but the bars, the letters and the edge marks near the centre lines are still enough to diagnose almost everything below.</p><h3>4. Symptom → fix</h3><p><strong>Backlight off / screen completely dark.</strong> The mipi_spi driver does not control the backlight. The docs say so explicitly and point you to a separate GPIO, optionally dimmed with a ledc output and a monochromatic light, as in the config above. If your breakout ties BL straight to 3.3 V, the backlight should glow as soon as the board is powered. Depending on the module, BL can be active high or active low.</p><p><strong>Backlight on, but the screen stays white or shows random noise.</strong> The controller never received a valid init sequence. Check, in this order:</p><ol><li>DC and CS are on the GPIOs you declared. Swapped DC/CS is the classic mistake.</li><li>Ground is shared between the ESP32 and the module.</li><li>RST is either wired to the GPIO in reset_pin or tied high. A floating reset line may leave the controller stuck in reset.</li><li>data_rate: drop to the 10 MHz default, or lower, before you suspect anything else.</li><li>SPI mode: mipi_spi uses MODE0 when a CS pin is configured and MODE3 for single-bit SPI without CS. If your breakout has no CS pin, leave cs_pin out of the config. Don&#39;t force a mode until you have checked this.</li></ol><p><strong>Black shows as white and colours look like a photo negative.</strong> Set invert_colors: true. mipi_spi defaults it to false, but IPS GC9A01 panels generally need inversion on. ESPHome&#39;s own preset for the Sunton ESP32-2424S012, a 1.28&quot; round board with a GC9A01A, is the GC9A01A model plus invert_colors=True.</p><p><strong>Red and blue are swapped (the “R” bar on the test card is blue).</strong> Change color_order. The default is bgr, and some panels need rgb. The documentation notes that this only changes the order sent to the panel. The ESPHome frame buffer is always RGB, so you do not need to touch your lambdas or LVGL colours.</p><p><strong>Text is mirrored.</strong> The GC9A01A model in ESPHome sets mirror_x: true by default. If your panel&#39;s rows or columns are wired the other way, override it with a transform: block. All three keys are required:</p><pre>transform:        # UNTESTED - only if the image is mirrored<br>      swap_xy: false<br>      mirror_x: false<br>      mirror_y: false</pre><p>Use transform only to fix a mirrored axis, and do not combine it with rotation. One user in #17074 reported garbled, striped output with both set, and a clean image after removing rotation:.</p><p><strong>Invalid offsets. at compile time, or the screen is chopped into rearranged blocks.</strong> Both showed up after the migration, in #17074 (ILI9341 and ILI9488) and #17440 (ILI9342 → ILI9341). The common cause was a dimensions: block that disagreed with the model&#39;s native geometry, usually width and height swapped by hand to get landscape. For a 240×240 GC9A01A you have no reason to set dimensions at all. If you must set it, the workaround confirmed in both issues was to state every geometry field explicitly:</p><pre>dimensions:       # only if you really need to override the model<br>      width: 240<br>      height: 240<br>      offset_width: 0<br>      offset_height: 0<br>      pad_width: 0<br>      pad_height: 0</pre><p>The maintainer’s advice for rotation is to leave the display in its native orientation and set rotation (0/90/180/270) on the display or in LVGL. That lets the driver use the controller&#39;s hardware rotation, and in LVGL the touch coordinates rotate automatically.</p><h3>5. Adding LVGL</h3><p>Once the test card looks right, remove show_test_card, then add these two lines to the display:</p><pre>auto_clear_enabled: false<br>    update_interval: never</pre><p>Then add an LVGL block:</p><pre>lvgl:<br>  displays:<br>    - round_display<br>  buffer_size: 25%    # recommended when you have no PSRAM; 100% is the default with PSRAM</pre><p>The mipi_spi docs note that when LVGL is used the display driver does not need its own buffer, because LVGL allocates one. A full 240×240 RGB565 frame is 240 × 240 × 2 = 115,200 bytes. That fits comfortably in PSRAM but is a big bite of internal SRAM, which is why the 25% figure exists.</p><p>For round UIs, LVGL’s arc, meter-style scales and centred labels work well. Lay them out from the centre rather than from the top-left corner.</p><h3>6. A bring-up order that saves time</h3><ol><li>Power and backlight only. Confirm the glow.</li><li>Minimal YAML, show_test_card: true, 10 MHz, no rotation or dimensions.</li><li>Fix colours: invert_colors, then color_order.</li><li>Fix mirroring with transform, only if needed.</li><li>Add rotation.</li><li>Raise data_rate step by step. Stop at the first artefact and back off one step.</li><li>Add LVGL.</li></ol><p>If you are still unsure whether your panel is really a GC9A01 (look-alike boards exist), check the FPC marking and the controller notes in our <a href="https://www.displayengineer.com/guides/round-display-gc9a01-esp32">GC9A01 round display + ESP32 guide</a> and the <a href="https://www.displayengineer.com/driver-ic/gc9a01">GC9A01 driver IC page</a>, which links the public controller datasheet.</p><p><em>Disclosure: I work for Display Engineer, a display module manufacturer.</em></p><h3>Sources</h3><ul><li>ESPHome, MIPI SPI display driver: <a href="https://esphome.io/components/display/mipi_spi/">https://esphome.io/components/display/mipi_spi/</a></li><li>ESPHome, display component (show_test_card, rotation): <a href="https://esphome.io/components/display/">https://esphome.io/components/display/</a></li><li>ESPHome, LVGL graphics (auto_clear_enabled, update_interval: never, buffer_size): <a href="https://esphome.io/components/lvgl/">https://esphome.io/components/lvgl/</a></li><li>ESPHome, PSRAM (ESP32-S3 mode has no default): <a href="https://esphome.io/components/psram/">https://esphome.io/components/psram/</a></li><li>ESPHome, SPI bus: <a href="https://esphome.io/components/spi/">https://esphome.io/components/spi/</a></li><li>ESPHome, monochromatic light: <a href="https://esphome.io/components/light/monochromatic/">https://esphome.io/components/light/monochromatic/</a> and LEDC output: <a href="https://esphome.io/components/output/ledc/">https://esphome.io/components/output/ledc/</a></li><li>ESPHome source, GC9A01A model (mirror_x=True, 240×240): <a href="https://github.com/esphome/esphome/blob/dev/esphome/components/mipi_spi/models/ili.py">https://github.com/esphome/esphome/blob/dev/esphome/components/mipi_spi/models/ili.py</a></li><li>ESPHome source, Sunton ESP32–2424S012 preset (invert_colors=True): <a href="https://github.com/esphome/esphome/blob/dev/esphome/components/mipi_spi/models/cyd.py">https://github.com/esphome/esphome/blob/dev/esphome/components/mipi_spi/models/cyd.py</a></li><li>esphome/esphome #17074, “Invalid offsets” after 2026.6.1: <a href="https://github.com/esphome/esphome/issues/17074">https://github.com/esphome/esphome/issues/17074</a></li><li>esphome/esphome #17440, colours/scrambled blocks after ili9xxx → mipi_spi: <a href="https://github.com/esphome/esphome/issues/17440">https://github.com/esphome/esphome/issues/17440</a></li><li>Espressif, ESP32-S3 GPIO summary (flash/PSRAM, strapping and USB-JTAG pins): <a href="https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/api-reference/peripherals/gpio.html">https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/api-reference/peripherals/gpio.html</a></li><li>GalaxyCore GC9A01A datasheet (Rev 1.0, 129,600-byte GRAM, SPI modes), as hosted by Waveshare: <a href="https://files.waveshare.com/upload/5/5e/GC9A01A.pdf">https://files.waveshare.com/upload/5/5e/GC9A01A.pdf</a></li><li>Waveshare 1.28inch LCD Module wiki (Ø32.4 mm display, 0.135 mm pixel pitch, inscribed-circle explanation): <a href="https://www.waveshare.com/wiki/1.28inch_LCD_Module">https://www.waveshare.com/wiki/1.28inch_LCD_Module</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=919bcc89948d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>