-
Notifications
You must be signed in to change notification settings - Fork 14
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
T4-S3 display driver chip strange behaviour #16
Comments
This is not a problem with the driver chip, but more like a problem with the QSPI driver. |
Partial refresh works just fine on the T-Display S3 AMOLED using the same QSPI driver, so that's not the issue. Is there a datasheet for the chip? |
T-Display S3 is a parallel interface, not QSPI |
The datasheet is already linked in the README, and all resources are outlined in the README. |
T-Display S3 AMOLED is definitely QSPI, and partial refresh works fine on it. The exact same compiled file I uploaded runs correctly on it. |
T-Display S3 AMOLED and T-Display S3 are two products.. |
Ah, I see it is there now - was not when I looked previously. Thanks. |
Which direction are you talking about? In the default factory firmware, it seems that opening the window is correct. |
The long side, near the WiFi antenna, opposite the USB, is affected. In the factory demo as built from source this is the top of the display. The required offset is about 18 pixels, it's hard to tell exactly because the screen is so black it's impossible to tell where the actual edge of the display is. I tried using the 0x23 command to turn on all pixels, which works, but then you can't see anything that's drawn :-)
|
I just tested the screen completely refreshed, added the border test, and found that pixel offset is also needed. I have not tested the screen border before. Thank you for your feedback, can you submit a fix? |
I'll let you fix your code (you just need to add 18 to the xs and xe values (or ys and ye if in portrait) in setAddrWindow.) This is my fix in ESPHome:
See https://gist.github.com/clydebarrow/ef89e9a93bd44771483b9144ae9042a1 and https://deploy-preview-3510--esphome.netlify.app/components/lvgl for more details. |
OK . Thanks . I'll fix it after the new screen arrives |
This is the set_addr_window code in my driver:
|
What's the new screen? Something exciting I hope! |
What I mean is that the screen of the T4-S3 I have is damaged and there is a problem with the border display. I need to wait until I get a new T4-S3 to solve it. |
After some more tests, using the ALL_ON (0x23) command alternating with NORMAL_DISPLAY_ON (0x13) I have determined that the correct offset value is 16. In fact, I wonder if it should really be 15 - this would make sense given that the RM6090B0 can drive a 480 wide display, so using only 450 leaves 30 spare, so half each side is 15. But 15 as an offset is unusable, since that triggers the same problem as partial refresh and results in the display data skewed at 45 degrees. |
I have worked around the odd-boundary problem on partial refresh with this in the LVGL setup:
This avoids the problem and allows partial refresh when using LVGL, with minimal impact on any other display. |
I will test it tomorrow, thanks again |
@clydebarrow It has been tested and is OK. Partial updates are normal. Thank you for your contribution. |
I'm testing on a T4-S3 AMOLED display, and have determined that when setting the address window for the display update, the starting x-position and width must both be even, otherwise the display is not updated correctly. This occurs both with my own code and I have reproduced it in the sample code.
To reproduce:
examples/lvgl/scroll/lv_example_scroll_1.c
and change the width of the scroll window to 198:Edit
src/LV_Helper.cpp
and set thefull_refresh
flag to false:Edit
src/LilyGo_AMOLED.cpp
and add a logging line to note the address window:Build and run the example. Observe the initial (full) redraw of the screen - the log line is:
And the display looks like this - all correct:
Now touch the screen and cause the window to scroll; observe the log line and note that the x-start address is an odd number:
And the screen display becomes garbled:
I have done further testing and confirmed that if the x-start of setAddrWindow is an odd number or the x-end is an even number, then the problem occurs. It seems that the chip will only set an address window of even length starting on an even boundary.
I have been unable to find a datasheet for the RM690B0 to see if this behaviour is configurable. The same code on a T-Display-S3 (using an RM67162 for which there is a datasheet) works correctly.
The compiled demo program is attached.
x.zip
The text was updated successfully, but these errors were encountered: