【已解决】ESP32-S3如何驱动QSPI接口的LCD?
-
- Posts: 16
- Joined: Mon Dec 14, 2020 1:02 pm
【已解决】ESP32-S3如何驱动QSPI接口的LCD?
目前项目用ESP32-S3来驱动QSPI接口的LCD,驱动IC为GC9B71(规格书参考附件)。试着在ESP-IDF的范例spi_lcd_touch_example_main基础修改了一下,没办法点亮屏,已修改部分请参考附件代码。发现应该要修改esp_lcd_panel_io_spi.c这个文件来适配QSPI的时序。
请问能否提供一些修改指南?或者类似项目参考,谢谢!
请问能否提供一些修改指南?或者类似项目参考,谢谢!
- Attachments
-
- GC9B71 DataSheet V1.0(1).pdf
- (5.71 MiB) Downloaded 1045 times
-
- spi_lcd_touch_example_main.c
- (13.53 KiB) Downloaded 1111 times
-
- esp_lcd_panel_gc9b71.c
- (11.8 KiB) Downloaded 940 times
-
- Posts: 11
- Joined: Fri Jun 23, 2023 6:49 pm
Re: ESP32-S3如何驱动QSPI接口的LCD?
目前lilygo有一款开发板配了QSPI的屏幕,你可以去他们github仓库看一下,里面有QSPI屏幕驱动,稍微改下参数应该就可以用 https://github.com/Xinyuan-LilyGO/T-Dis ... m67162.cpp
Re: ESP32-S3如何驱动QSPI接口的LCD?
请问一下是否已经点亮了吗,可以发一份资料到邮箱:1443176576@qq.com吗?
-
- Posts: 27
- Joined: Mon Oct 10, 2022 2:47 am
Re: ESP32-S3如何驱动QSPI接口的LCD?
目前官方仅适配过 ST77903 这一款 QSPI LCD(无内置 GRAM),参考 issue https://github.com/espressif/esp-idf/is ... 1622838282.
而 GC9B71 有内置 GRAM,驱动方式有很大不同,但通过自行配置 SPI 是可以实现的,关键在于发送颜色数据时 spi_transaction_t 需要使用 SPI_TRANS_MODE_QIO 标志使能 4-bit 模式,而发送命令时 spi_transaction_t 仅使用 1-bit。
而 GC9B71 有内置 GRAM,驱动方式有很大不同,但通过自行配置 SPI 是可以实现的,关键在于发送颜色数据时 spi_transaction_t 需要使用 SPI_TRANS_MODE_QIO 标志使能 4-bit 模式,而发送命令时 spi_transaction_t 仅使用 1-bit。
-
- Posts: 27
- Joined: Mon Oct 10, 2022 2:47 am
Re: ESP32-S3如何驱动QSPI接口的LCD?
可以参考 https://github.com/espressif/esp-idf/is ... 1640708335 提供的 SPD2010 示例,驱动原理是一样的。
-
- Posts: 2
- Joined: Sun Aug 06, 2023 3:37 am
Re: ESP32-S3如何驱动QSPI接口的LCD?
After using this example(SPD2010), I lit up the screen, but encountered the same problem as in the video(https://www.bilibili.com/video/BV1Lj411 ... da6a91f2ad), which has incorrect pixels when only refreshing the arc.Other shapes were normal.
i have test it on gc9b71 and SPD2010(as you have mentiented), all are exactly the same error.
i use gc9b71 example in https://github.com/DoctorTag/esp32S3_watch
I strongly suspect that this may be a bug in lvgl(no matter 8.0~8.3)
i have test it on gc9b71 and SPD2010(as you have mentiented), all are exactly the same error.
i use gc9b71 example in https://github.com/DoctorTag/esp32S3_watch
I strongly suspect that this may be a bug in lvgl(no matter 8.0~8.3)
- Attachments
-
- 圆弧出现花屏
- arc-error.jpg (47.46 KiB) Viewed 8090 times
-
- Posts: 27
- Joined: Mon Oct 10, 2022 2:47 am
Re: ESP32-S3如何驱动QSPI接口的LCD?
Sorry, I can't see the specific reason right now either.
However, the probability of LVGL having a bug is relatively low, as we've successfully run this demo on other screens.
In the next two weeks, I'll attempt to drive the SPD2010 and GC9B71 displays to see if the same issue arises.
However, the probability of LVGL having a bug is relatively low, as we've successfully run this demo on other screens.
In the next two weeks, I'll attempt to drive the SPD2010 and GC9B71 displays to see if the same issue arises.
-
- Posts: 27
- Joined: Mon Oct 10, 2022 2:47 am
Re: ESP32-S3如何驱动QSPI接口的LCD?
Good news, I successfully drive the GC9B71 QSPI LCD. The demo project is as below. Please carefully read the "README.md" and configure ESP-IDF as required. And I also have the same problem as below before. This situation occurs when I draw color bars every 2N+1 (N is an integer) rows or columns, but when I refresh every 2N (N is an integer) rows or columns, the display appears normal. So I use the below code to round the start coordinate into 2N, and round the end coordinate into 2M+1. Then register it into LVGL by rounder_cb of lv_disp_drv_t.gonghongliang wrote: After using this example(SPD2010), I lit up the screen, but encountered the same problem as in the video(https://www.bilibili.com/video/BV1Lj411 ... da6a91f2ad), which has incorrect pixels when only refreshing the arc.Other shapes were normal.
i have test it on gc9b71 and SPD2010(as you have mentiented), all are exactly the same error.
i use gc9b71 example in https://github.com/DoctorTag/esp32S3_watch
I strongly suspect that this may be a bug in lvgl(no matter 8.0~8.3)
Code: Select all
void lvgl_port_rounder_callback(struct _lv_disp_drv_t * disp_drv, lv_area_t * area)
{
uint16_t x1 = area->x1;
uint16_t x2 = area->x2;
uint16_t y1 = area->y1;
uint16_t y2 = area->y2;
// round the start of area down to the nearest even number
area->x1 = x1 > 0 ? (((x1 - 1) >> 1) << 1) : 0;
area->y1 = y1 > 0 ? (((y1 - 1) >> 1) << 1) : 0;
// round the end of area up to the nearest odd number
area->x2 = ((x2 >> 1) << 1) + 1;
area->y2 = ((y2 >> 1) << 1) + 1;
}
-
- Posts: 27
- Joined: Mon Oct 10, 2022 2:47 am
Re: ESP32-S3如何驱动QSPI接口的LCD?
请参考最新回复。seanfan@qq.com wrote: ↑Fri Jun 30, 2023 12:01 pm目前项目用ESP32-S3来驱动QSPI接口的LCD,驱动IC为GC9B71(规格书参考附件)。试着在ESP-IDF的范例spi_lcd_touch_example_main基础修改了一下,没办法点亮屏,已修改部分请参考附件代码。发现应该要修改esp_lcd_panel_io_spi.c这个文件来适配QSPI的时序。
请问能否提供一些修改指南?或者类似项目参考,谢谢!
-
- Posts: 2
- Joined: Sun Aug 06, 2023 3:37 am
Re: ESP32-S3如何驱动QSPI接口的LCD?
Code runs perfectly!
Who is online
Users browsing this forum: No registered users and 36 guests