Display stays blank when trying basic "hello world" configuration

ESP32-S3 Reverse TFT Feather & ESPHome - Display stays blank

So received a ESP32-S3 Reverse TFT Feather for my first play with ESP32 and ESPHome.
When I received it the screen worked with supplied code but when I have tried to use it with ESPHome it just stays blank.

ESPHome version: 2023.7.0

I have gotten LED, button and NEOpixel working but pulled from my code to try and isolate the issue.

My first problem was that “adafruit_feather_esp32s3_reversetft” is not accepted as the board definition even though it is listed here: https://registry.platformio.org/platforms/platformio/espressif32/boards
So I’m using board definition of “adafruit_feather_esp32s3”.

Basically I’m unable to get the LCD to work. I found this other topic on Adafruit firum but it looks like they did not configure the power enable for the regulator.
https://forums.adafruit.com/viewtopic.php?p=954109&hilit=tft+esphome#p954109

I have configured SPI and the power_supply and then set up the display. I tried display model “Adafruit S2 TFT FEATHER 240X135” but that didn’t work so I tried a custom model with similar configuration but it still doesn’t work.

I have verified that there is 3.3V on the supply pin for the I2C bus so the power regulator is enabled. The TFT backlight is on but the display is blank.
I have changed from text to shapes and then just to a colour fill as this should be the easiest to detect if I get coordinates wrong.

I feel like it will be a simple ‘duh’ fix but I have had no success so far. Config is below.

Note: I also posted on Adafruit forum with no luck so far: https://forums.adafruit.com/viewtopic.php?t=203200

esphome:
  name: feathera
  friendly_name: featherA

esp32:
  # board: adafruit_feather_esp32s3_reversetft
  board: adafruit_feather_esp32s3

  framework:
    type: arduino

# Enable logging
logger:
  level: VERBOSE

# Enable Home Assistant API
api:
  encryption:
    key: "blah"

ota:
  password: "blah"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  fast_connect: true

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Feathera Fallback Hotspot"
    password: !secret wifi_password

captive_portal:

# SPI setup
spi:
  clk_pin: GPIO36
  mosi_pin: GPIO35

# power supply to tft
power_supply:
  - id: tft_pwr_en
    pin: GPIO7

# display setup
display:
  - platform: st7789v
    model: Custom #Adafruit S2 TFT FEATHER 240X135
    backlight_pin: GPIO45
    cs_pin: GPIO42
    dc_pin: GPIO40
    reset_pin: GPIO41
    power_supply: tft_pwr_en
    height: 240
    width: 135
    offset_height: 52
    offset_width: 40
    lambda: |-
      auto red = Color(255, 0, 0);
      it.fill(red);

So after much puzzlement I have found that if I specify “force_sw: true” for the SPI component then this works fine.
I did wonder if the lack of a MISO pin definition caused the issue so I tried that but it didn’t work.

So my assumption is that there must some setup issue with the HW SPI peripheral.

I have looked at the cpp files but I’m not familiar with the ESP32 or the structure so nothing is jumping out at me.

This is an OK workaround for now, but I think it would be nice to fix it. Does anyone have any idea?

For posterity, this was suddenly working when I tested it again in 2024. I don’t know exactly what change fixed it but now screen updates are nice and fast