Bring the Elecrow's GT911 out of reset through the V3.0's PCA9557 (0.2.95, firmware 0.2.81)
CI / checks (push) Waiting to run
CI / firmware (add-on) (push) Blocked by required conditions
CI / firmware (min_version) (push) Blocked by required conditions

A unit's touch never answered: "touchscreen is marked FAILED: Calibration error" at setup, the GT911 still in reset
behind the PCA9557 (I2C 0x18) of the V3.0 board. The board file declares the expander as ESPHome's pca9554 (the same
register map) and hands the GT911 driver its reset (IO0) and interrupt (IO1) pins on it, so the driver runs Elecrow's
own sequence: reset low with the interrupt line low, reset high, 56 ms, address 0x5D. A V2.0 without the expander boots
its GT911 by the pull-up as before. The bus is scanned at boot for the log.
This commit is contained in:
Xandrossian
2026-09-21 12:54:18 -07:00
parent a3ef7f09a1
commit da28d19961
7 changed files with 50 additions and 27 deletions
+6 -5
View File
@@ -52,14 +52,15 @@ class BoardFile(unittest.TestCase):
self.assertIn('blue: [15, 7, 6, 5, 4]', TEXT)
self.assertIn('sda: GPIO19', TEXT)
self.assertIn('scl: GPIO20', TEXT)
self.assertIn('scan: false', TEXT)
self.assertIn('scan: true', TEXT)
self.assertIn('address: 0x5D', TEXT)
self.assertIn('pin: GPIO2', TEXT)
# The USB pins are the touch I2C: the header that frees them, and no interrupt pin or I/O expander.
# The USB pins are the touch I2C: the header that frees them.
self.assertIn('<esphome/components/smart_display/elecrow_usb_phy.h>', TEXT)
code = '\n'.join(line for line in TEXT.split('\n') if not line.lstrip().startswith('#'))
self.assertNotIn('interrupt_pin', code)
self.assertNotIn('pca9557', code.lower())
# The V3.0's PCA9557 (as ESPHome's pca9554, the same registers) brings the GT911 out of reset (firmware 0.2.81).
self.assertIn('address: 0x18', TEXT)
for pin, number in (('reset_pin', 0), ('interrupt_pin', 1)):
self.assertIn(f' {pin}:\n pca9554: touch_expander\n number: {number}', TEXT)
self.assertIn('assertion_level: SILENT', TEXT)
def test_the_flash_fits_by_three_measures(self):