Move display CS/DC off strapping pins (CS=21, DC=19) so flashing works with display connected

This commit is contained in:
2026-09-10 16:43:22 +02:00
parent 347728de6d
commit 71b0085ced
3 changed files with 26 additions and 20 deletions

View File

@@ -13,11 +13,12 @@
/* SPI2_HOST (VSPI): dedicated to the ST7789 display.
* On 7-pin ST7789 modules the display labels these SDA (MOSI) and
* SCL (SCK). */
* SCL (SCK). MISO is unused (the display never reads the bus; the RFID
* reader lives on its own SPI3 bus). */
#define HW_SPI_HOST (SPI2_HOST)
#define HW_SPI_SCK_GPIO (GPIO_NUM_18) /* display SCL */
#define HW_SPI_MOSI_GPIO (GPIO_NUM_23) /* display SDA */
#define HW_SPI_MISO_GPIO (GPIO_NUM_19) /* unused by display; kept for bus */
#define HW_SPI_MISO_GPIO (GPIO_NUM_NC) /* unused */
/* MFRC522 RFID reader - OWN SPI3_HOST (HSPI) bus, separate from the display.
* Using a independent controller avoids any bus interference between the
@@ -30,9 +31,14 @@
#define HW_RC522_RST_GPIO (GPIO_NUM_22)
/* ST7789 display - 7-pin breakout: CS / DC / RST / SDA / SCL / GND / VCC.
* SDA and SCL share the SPI bus above (SCL=HW_SPI_SCK, SDA=HW_SPI_MOSI). */
#define HW_LCD_CS_GPIO (GPIO_NUM_15)
#define HW_LCD_DC_GPIO (GPIO_NUM_2)
* SDA and SCL share the SPI bus above (SCL=HW_SPI_SCK, SDA=HW_SPI_MOSI).
*
* IMPORTANT: CS and DC are on NON-STRAPPING pins (GPIO21, GPIO19) so the
* panel never interferes with the ESP32 boot/flash. Keeping these on
* GPIO15/GPIO2 (strapping pins) blocks flashing while the display is
* connected, because the panel holds the strap lines at reset. */
#define HW_LCD_CS_GPIO (GPIO_NUM_21)
#define HW_LCD_DC_GPIO (GPIO_NUM_19)
#define HW_LCD_RST_GPIO (GPIO_NUM_4)
/* EC11 rotary encoder */