-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
ESP32-4827S043 flickering problem #273
Comments
Do you have the config of using this display using LovyanGFX? |
yes! class LGFX : public lgfx::LGFX_Device{ public:LGFX(void){ { auto cfg = _panel_instance.config(); { auto cfg = _panel_instance.config_detail(); { auto cfg = _light_instance.config(); { Arduino_GFX_Library: Arduino_RGB_Display gfx = new Arduino_RGB_Display( |
you can see that there is a difference in the prefer_speed (900000/12000000), changing this value from 8000000 to 12000000 don't feel any difference. |
wild guess it is related to pclk_idle_high, could you please help to test again with latest code? |
Of course I'm willing to do all the tests you deem appropriate |
Any news? |
just released v1.3.4, please try PDQgraphicstest |
you may also try align the prefer_speed to 12000000 |
Version 1.3.4 made things worse.
I tried to change the display parameters without success. 145.mp4 |
can you also test 0, 1 option? |
a1.mp4a2.mp4a3.mp4 |
any code? |
I do not understand |
what decalaration code are you using? |
the prefer frequency |
#pragma GCC optimize ("Ofast")
#define TFT_BL 2
#define CS_PIN 38
#define TIRQ_PIN -1// 18
#include <SPI.h>
#include <Arduino_GFX_Library.h>
#include <XPT2046_Touchscreen.h>
#include <lvgl.h>
#include "ui.h"
Arduino_ESP32RGBPanel *rgbpanel = new Arduino_ESP32RGBPanel(
40 /* DE */, 41 /* VSYNC */, 39 /* HSYNC */, 42 /* PCLK */,
45 /* R0 */, 48 /* R1 */, 47 /* R2 */, 21 /* R3 */, 14 /* R4 */,
5 /* G0 */, 6 /* G1 */, 7 /* G2 */, 15 /* G3 */, 16 /* G4 */, 4 /* G5 */,
8 /* B0 */, 3 /* B1 */, 46 /* B2 */, 9 /* B3 */, 1 /* B4 */,
0 /* hsync_polarity */, 8 /* hsync_front_porch */, 4 /* hsync_pulse_width */, 43 /* hsync_back_porch */,
0 /* vsync_polarity */, 8 /* vsync_front_porch */, 4 /* vsync_pulse_width */, 12 /* vsync_back_porch */,
1 /* pclk_active_neg */, 9000000 /* prefer_speed */,
0 /* de_idle_high */, 0 /* pclk_idle_high */);
Arduino_RGB_Display *gfx = new Arduino_RGB_Display(
480 /* width */, 272 /* height */, rgbpanel);
#include "touch.h"
/*Change to your screen resolution*/
static uint32_t screenWidth;
static uint32_t screenHeight;
static lv_disp_draw_buf_t draw_buf;
static lv_color_t *disp_draw_buf;
static lv_disp_drv_t disp_drv;
void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p){
uint16_t w = (area->x2 - area->x1 + 1);
uint16_t h = (area->y2 - area->y1 + 1);
#if (LV_COLOR_16_SWAP != 0)
gfx->draw16bitBeRGBBitmap(area->x1, area->y1, (uint16_t *)&color_p->full, w, h);
#else
gfx->draw16bitRGBBitmap(area->x1, area->y1, (uint16_t *)&color_p->full, w, h);
#endif
lv_disp_flush_ready(disp);
}
void my_touchpad_read(lv_indev_drv_t *indev_driver, lv_indev_data_t *data){
if (touch_has_signal()){
if (touch_touched()){
data->state = LV_INDEV_STATE_PR;
data->point.x = touch_last_x;
data->point.y = touch_last_y;
}
else if (touch_released()){
data->state = LV_INDEV_STATE_REL;
}
}else{
data->state = LV_INDEV_STATE_REL;
}
}
void setup(){
Serial.begin(115200);
ts.begin();
ts.setRotation(0);
gfx->begin();
gfx->fillScreen(BLACK);
pinMode(TFT_BL, OUTPUT);
digitalWrite(TFT_BL, HIGH);
//analogWrite(TFT_BL, 100);
lv_init();
screenWidth = gfx->width();
screenHeight = gfx->height();
disp_draw_buf = (lv_color_t *)malloc(sizeof(lv_color_t) * screenWidth * 10);
lv_disp_draw_buf_init(&draw_buf, disp_draw_buf, NULL, screenWidth * 10);
/* Initialize the display */
lv_disp_drv_init(&disp_drv);
/* Change the following line to your display resolution */
disp_drv.hor_res = screenWidth;
disp_drv.ver_res = screenHeight;
disp_drv.flush_cb = my_disp_flush;
disp_drv.draw_buf = &draw_buf;
lv_disp_drv_register(&disp_drv);
/* Initialize the (dummy) input device driver */
static lv_indev_drv_t indev_drv;
lv_indev_drv_init(&indev_drv);
indev_drv.type = LV_INDEV_TYPE_POINTER;
indev_drv.read_cb = my_touchpad_read;
lv_indev_drv_register(&indev_drv);
ui_init();
}
void loop(){
lv_timer_handler();
delay(5);
} |
ok 2 things you still can try.
|
I did the test, there is no difference with the previous tests :( |
then I have no idea |
with the LGFX library this doesn't happen, there will be a solution! |
it should be |
anyway, when you want to do more tests I'm here :) |
I posted what works for me on these displays in lovyan gfx issues, arduino gfx actually works quite good. |
It doesn't works properly for me. I get a lot of flickering on my UIs I ported from Squareline. On another display it works fine. Yes tho, the lvgl widgets demo works properly, its weird. It seems to work better with Lovyan example you posted but I still get some flickering on screen transitions. Its on the 5" display from sunton which uses gt911. I dont know if I should open a different issue |
Please simply select the library you feel works better. |
I'm using these same displays(though the 4.3" versions) with my own project and have no flickering issues, the flickering on your side is most likely you have some misconfiguration, different sizes displays will use different configuration parameters values, this isn't a library issue but implementation issue on your side. |
I started using the makers code (sunton) which they already provide with lvgl and arduino gfx. But i had same flickering issue with all libraries and examples until i tried your lovyan config and I saw your lovyan config used 14000000 bus freq instead of the makers sunton config of 16000000 . Regards |
Hello,
for a few days now, I have been trying to get your Arduino_gfx library to work properly with the ESP32-4827S043 module (4.3 inch 480x272 display). I have configured the display parameters as you indicated, but I am experiencing image flickering (it is as if the images have varying brightness). With the same configuration, this does not happen with the LovyanGFX library. Additionally, I have tried on three other ESP32-4827S043 boards, and they all have the same issue.
How can I solve this problem?
Thanks)
The text was updated successfully, but these errors were encountered: