rzeldent / esp32-smartdisplay

PlatformIO library LVGL Drivers for Sunton Smart display boards (CYD Cheap Yellow Display). This library supports these boards without any effort. ESP32-2432S024N/R/C, ESP32-2432S028R/C, ESP32-3248S035R/C, ESP32_8048S070N/C
https://github.com/rzeldent/platformio-espressif32-sunton
GNU General Public License v3.0
399 stars 70 forks source link

doesn't work with ESP32-2432S028R #57

Closed ypyly closed 9 months ago

ypyly commented 9 months ago

Hi, I've tried the demo code and a regular one (generated by the SquareLine Studion) however the display never gets it's backlight on and there's a loop of the errors "indev_pointer_proc: X is 240 which is greater than hor. res (in lv_indev.c line #362)" in both the example and the regular one. in the demo code, the RGB LED on the back changes its colors. Please let me know, if I'm missing something

rzeldent commented 9 months ago

Hi ypyly,

I do not know exactly what you did. dev_pointer_proc: X is 240 means something is not right with the touch. No backlight is something wrong with the GPIO. Cannot determine what's wrong like this. Do you have touch? Which version are you using, have you pulled the repo or using the PlatformIo registry? Is the board correct?

rzeldent commented 9 months ago

Reproduced!

rzeldent commented 9 months ago

Found issue, is a typo in the platformio file:

image

Must be

[env:esp32-2432S028R]
board = esp32-2432S028R

Is fixed in main demo application. Explains why I did not have this issue as I do not use the demo all the time!

Thanks for reporting and enjoy!

ypyly commented 9 months ago

@rzeldent there's a same typo in examples in this repo, I've tried to create a branch/PR with a fix, but your settings forbid pushing it :) https://github.com/rzeldent/esp32-smartdisplay/blob/d224c97bde5efea8254de25d78076af801a6169e/examples/ci/platformio.ini#L89

rzeldent commented 9 months ago

Hi ypyly,

Yes, I just fixed it but this is just for CI integration and is not used elsewhere. Demo application was already fixed.

But you can always ask me to apply a PR...

On Fri, Dec 22, 2023 at 1:57 AM ypyly @.***> wrote:

there's a same typo in examples in this repo, I've tried to create a branch with a fix, but your settings forbid to push it :)

https://github.com/rzeldent/esp32-smartdisplay/blob/d224c97bde5efea8254de25d78076af801a6169e/examples/ci/platformio.ini#L89

— Reply to this email directly, view it on GitHub https://github.com/rzeldent/esp32-smartdisplay/issues/57#issuecomment-1867099422, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2ENB3JQLITRO7BOY33N7LYKTLGHAVCNFSM6AAAAABA5RSDC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRXGA4TSNBSGI . You are receiving this because you modified the open/close state.Message ID: @.***>

GregoryHlavac commented 8 months ago

Unsure what exactly this is happening for but getting a white screen with the demo now. (on v2 model but still).

rzeldent commented 8 months ago

Hi Gregory,

There were also some changes in the defines. Maybe you can do a fresh clone (with submodules)...

On Fri, Jan 19, 2024 at 11:14 PM Gregory Hlavac @.***> wrote:

Unsure what exactly this is happening for but getting a white screen with the demo now. (on v2 model but still).

— Reply to this email directly, view it on GitHub https://github.com/rzeldent/esp32-smartdisplay/issues/57#issuecomment-1901196047, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2ENBY76R6CASDLHWSFG6DYPLV4ZAVCNFSM6AAAAABA5RSDC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBRGE4TMMBUG4 . You are receiving this because you were mentioned.Message ID: @.***>

GregoryHlavac commented 8 months ago

Hi Gregory,

There were also some changes in the defines. Maybe you can do a fresh clone (with submodules)...

On Fri, Jan 19, 2024 at 11:14 PM Gregory Hlavac @.***> wrote:

Unsure what exactly this is happening for but getting a white screen with the demo now. (on v2 model but still).

— Reply to this email directly, view it on GitHub https://github.com/rzeldent/esp32-smartdisplay/issues/57#issuecomment-1901196047, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2ENBY76R6CASDLHWSFG6DYPLV4ZAVCNFSM6AAAAABA5RSDC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBRGE4TMMBUG4 . You are receiving this because you were mentioned.Message ID: @.***>

Fresh as in from what date? Just tried this last night.

rzeldent commented 8 months ago

Hi Gregory,

Just checked the normal ESP32-2432S028R. No problems. Also compiled the v2 version and tried it on my board. Also seems to work fine (even on my v1 board!)

Added a special log line to check if the special vendor config was present (see log) and this was the case.

[  2834][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi Reconnect Running
[  2842][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
[  2910][I][lvgl_ili9341.c:67] lvgl_lcd_init(): Vendor config: Present
[  3404][D][esp32-hal-adc.c:194] __analogReadMilliVolts(): eFuse Vref: Supported
[  3405][I][esp32-hal-adc.c:235] __analogReadMilliVolts(): ADC1: Characterized using eFuse Vref: 1100

PXL_20240120_225314265

Maybe some problems including the boards submodules? That happens to me quite often...

Good luck

GregoryHlavac commented 8 months ago

Fresh download on the board submodule, but upped the lv_conf log level to info; turned off wifi to remove that for now and re-ran demo and..

[   280][I][main.cpp:26] setup(): CPU: ESP32-D0WD-V3 rev3, CPU Freq: 240 Mhz, 2 core(s)
[   281][I][main.cpp:27] setup(): Free heap: 311472 bytes
[   283][I][main.cpp:28] setup(): Free PSRAM: 0 bytes
[   287][I][main.cpp:29] setup(): SDK version: v4.4.6-dirty
[Info]  (0.293, +293)    lv_init: begin         (in lv_obj.c line #106)
[Info]  (0.788, +495)    lv_obj_create: begin   (in lv_obj.c line #215)
[Info]  (0.789, +1)      lv_obj_create: begin   (in lv_obj.c line #215)
[Info]  (0.789, +0)      lv_obj_create: begin   (in lv_obj.c line #215)
[Info]  (0.799, +10)     lv_obj_create: begin   (in lv_obj.c line #215)
[Info]  (0.801, +2)      lv_obj_create: begin   (in lv_obj.c line #215)
[Info]  (0.807, +6)      lv_label_create: begin         (in lv_label.c line #75)
[Info]  (0.814, +7)      lv_label_create: begin         (in lv_label.c line #75)
[Info]  (0.820, +6)      lv_label_create: begin         (in lv_label.c line #75)
[Info]  (0.826, +6)      lv_label_create: begin         (in lv_label.c line #75)
[Info]  (0.832, +6)      lv_btn_create: begin   (in lv_btn.c line #51)
[Info]  (0.837, +5)      lv_label_create: begin         (in lv_label.c line #75)
[Info]  (0.844, +7)      lv_label_create: begin         (in lv_label.c line #75)
[Info]  (0.850, +6)      lv_label_create: begin         (in lv_label.c line #75)
[Info]  (0.856, +6)      lv_img_create: begin   (in lv_img.c line #60)
[Info]  (0.861, +5)      lv_obj_create: begin   (in lv_obj.c line #215)
[Info]  (0.867, +6)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (0.883, +16)     lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (0.886, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (0.890, +4)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (0.898, +8)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (1.019, +121)    lv_label_create: begin         (in lv_label.c line #75)
[Info]  (1.024, +5)      lv_label_create: begin         (in lv_label.c line #75)
[Info]  (1.029, +5)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (1.033, +4)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (1.394, +361)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (1.397, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (1.714, +317)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (1.717, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (2.034, +317)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (2.354, +320)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (2.357, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (2.674, +317)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (2.677, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (2.994, +317)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (3.314, +320)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (3.634, +320)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (3.637, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (3.954, +317)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (4.274, +320)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (4.594, +320)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (4.914, +320)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (5.234, +320)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (5.237, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (5.554, +317)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (5.874, +320)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (5.877, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (6.194, +317)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (6.197, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (6.514, +317)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (6.834, +320)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (7.154, +320)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (7.157, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (7.474, +317)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (7.794, +320)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (7.797, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (8.114, +317)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (8.117, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (8.434, +317)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (8.754, +320)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (8.757, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (9.074, +317)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (9.394, +320)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (9.397, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (9.714, +317)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (9.717, +3)      lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (10.034, +317)   lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (10.354, +320)   lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (10.357, +3)     lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (10.674, +317)   lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (10.834, +160)   indev_proc_press: pressed at x:94 y:206        (in lv_indev.c line #819)
[Info]  (10.874, +40)    indev_proc_press: pressed at x:96 y:207        (in lv_indev.c line #819)
[Info]  (10.914, +40)    indev_proc_release: released   (in lv_indev.c line #967)
[Info]  (10.995, +81)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (11.194, +199)   indev_proc_press: pressed at x:113 y:173       (in lv_indev.c line #819)
[Info]  (11.234, +40)    indev_proc_release: released   (in lv_indev.c line #967)
[Info]  (11.315, +81)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (11.317, +2)     lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (11.514, +197)   indev_proc_press: pressed at x:124 y:90        (in lv_indev.c line #819)
[Info]  (11.554, +40)    indev_proc_release: released   (in lv_indev.c line #967)
[Info]  (11.635, +81)    lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (11.955, +320)   lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (12.275, +320)   lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (12.595, +320)   lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (12.915, +320)   lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (12.918, +3)     lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)
[Info]  (13.235, +317)   lv_obj_update_layout: Layout update begin      (in lv_obj_pos.c line #314)

Clearly something is happening because the lvgl stuff seems to be actively doing something but the screen still remains white; early steps into this ESP32 dev stuff best suggestion of where to probably look? (Your library looked so much more pleasant than dealing with all of the other low-level stuff)

I know the screen itself works; because this project https://github.com/suchmememanyskill/CYD-Klipper (3d printer control with the same kind of screen) builds and runs fine; am aware it doesn't obviously use your library but just confusing what the significant difference here is.

AWoelfel commented 8 months ago

I have exaclty the same problem as @GregoryHlavac with my ESP32-2432S028R. I started from scratch (today); this is my first contact with any of the CYDs. So i have pulled the most resent version for the demo as well as for the boards.

I can confirm : compilation and flashing works for both; v1 & v2. Both stay in the white screen after booting the display.

Checked the LV_conf logs as well! i see the activity as describe in the prev post.

GregoryHlavac commented 8 months ago

Just tried to rebuild it and flash once more on a bare raspberry pi to rule out my desktop/windows nonsense; same problem.

I'm really not sure where that sdk-version 4.4.6-dirty is coming from but it seems to be part of the espressif 6.5.0 on pio.

rzeldent commented 8 months ago

Hi,

The sdk-version 4.4.6-dirty is indeed part of espressif 6.5.0 and this is normal. I thought this might be something but is not. Are you compiling for the right board?