QSPI Interface
QSPI (Quad Serial Peripheral Interface) is an extension of the SPI interface. Compared to traditional SPI, which uses a single data line for transmission, QSPI uses four data lines to transfer data in parallel, increasing data throughput while maintaining the serial interface wiring approach. It is suitable for small-size, high-resolution, or high-refresh-rate LCDs.
In LCD applications, QSPI is used by the same interface peripheral to handle both command transmission and pixel data transfer. The LCD driver chip receives initialization commands, register parameters, and image data, and uses different display refresh methods depending on whether it integrates GRAM (Graphics RAM).
Interface Signals
QSPI LCDs typically include the following signals:
| Signal | Description |
|---|---|
SCLK | QSPI clock signal |
CS | Chip select, typically active low |
IO0–IO3 | Four data lanes for transmitting commands, parameters, and pixel data |
RST | LCD reset signal |
BL | Backlight control signal |
QSPI handles only the interface communication with the display controller. LCDs with touch functionality typically use a separate I2C connection for the touch controller; the touch controller's address, reset, and interrupt signals are determined by the specific product.
Hardware Driver Framework
The hardware driving method for QSPI LCDs depends on whether the LCD driver chip integrates GRAM.
QSPI LCD with Built-in GRAM
Driver chips with built-in GRAM can store full or partial image data internally. The host sends commands and partial pixel data via QSPI, and the driver chip writes the received data to its internal GRAM, then refreshes the screen according to the panel's timing.
This operating mode is similar to SPI/I80 LCDs: the host does not need to continuously output full-frame RGB data, and image refresh is primarily handled by the LCD driver chip. Taking the SPD2010 as an example, its QSPI interface is used for transmitting commands and display data, while touch functionality is typically connected via a separate I2C interface.
QSPI LCD without Built-in GRAM
Some QSPI driver chips lack sufficient internal GRAM, requiring the host to continuously transmit display data to maintain panel refresh. This operating mode requires a framebuffer on the host side, and the timing relationship between data transmission and panel refresh is closer to that of an RGB LCD.
Therefore, QSPI does not directly determine the framebuffer size required by the system. When designing a display application, you should confirm whether the driver chip integrates GRAM, as well as the target resolution, pixel format, refresh rate, and available SRAM/PSRAM capacity of the host.
ESP-IDF Software Framework
In ESP-IDF, QSPI LCDs are typically developed using the esp_lcd component. The software can be divided into the following three layers:
- SDK Layer: ESP-IDF provides the QSPI peripheral driver and the
esp_lcdgeneral API for initializing the interface, transmitting commands and pixel data, and performing operations such as display inversion, mirroring, and refresh. - Driver Layer: The LCD driver component completes reset, initialization commands, and display parameter configuration for the specific controller, and creates an LCD device handle of type
esp_lcd_panel_handle_t. The interface device typically uses a handle of typeesp_lcd_panel_io_handle_t. - APP Layer: The application uses the general LCD API or a GUI framework such as LVGL to implement images, text, animations, and touch interaction.
Even with the same LCD driver chip, different screens may have different initialization commands, resolutions, pixel formats, and timing parameters. When porting a driver, always refer to the hardware documentation and initialization parameters for the specific screen.
Common QSPI Driver Components
Various QSPI LCD drivers are already available in Espressif's esp_lcd and related ESP components. Common controllers include:
AXS15231BGC9B71SH8601SPD2010ST77903ST77916ST77922CO5300
Driver components are continuously updated with ESP-IDF and ESP component repositories. Before using them, verify the interface modes, initialization parameters, and target ESP chip version supported by the component.
Resources
For the QSPI LCD development process and the esp_lcd software framework, refer to the Espressif LCD Development Guide.