-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esp_lcd: Fix ST7789V display offset issue (IDFGH-14575) #15332
Conversation
👋 Hello jomoly, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
The ST7789V LCD shows a 20-pixel offset issue due to missing display window initialization. This commit adds proper CASET and RASET commands in panel initialization to fix the problem. Fixes espressif#15331
335ad34
to
a96919f
Compare
What if display resolution is not 240x320? I believe these changes are device specific and should not be part of ST7789 driver implementation. |
ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, ST7789_CMD_RAMCTRL, (uint8_t[]) { | ||
st7789->ramctl_val_1, st7789->ramctl_val_2 | ||
}, 2), TAG, "io tx param failed"); | ||
|
||
// Add display window initialization | ||
// Set column address range (CASET) | ||
ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_CASET, (uint8_t[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CASET and RASET are also set in the panel_st7789_draw_bitmap
. So maybe here is duplicated.
The ST7789V LCD shows a 20-pixel offset issue due to missing display window initialization. This commit adds proper CASET and RASET commands in panel initialization to fix the problem.
Fixes #15331
Description
Fixed ST7789V LCD display offset issue by adding proper display window initialization commands (CASET/RASET) in panel_st7789_init().
Issue
Root Cause
Default initialization sequence lacks proper display window setup.
Solution
Added CASET and RASET commands to initialize display window properly:
Verification
Tested with:
Documentation
No documentation changes needed as this is a bug fix.