Giter Club home page Giter Club logo

esp32-s3-rgb-panel's People

Contributors

w00ng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

esp32-s3-rgb-panel's Issues

Unable to build lvgl_demo example

I'm on Windows 10, and I've just installed the latest master branch of the ESP-IDF on my system (commit hash 01d014c42def8d0c19e1ce55c07de6761e092ffa).
From within an ESP-IDF 5.0 PowerShell terminal, I've cloned the repository and tried to build it using the following commands:

git clone --recursive [email protected]:W00ng/ESP32-S3-RGB-Panel.git wywy-s3-rgb
cd .\wywy-s3-rgb\
git submodule update --init --recursive
cd .\examples\lvgl_demo\
idf.py build

Unfortunately this results in the following error:

Executing action: all (aliases: build)
Running cmake in directory c:\gitrepo\wywy-s3-rgb\examples\lvgl_demo\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32s3 -DCCACHE_ENABLE=1 c:\gitrepo\wywy-s3-rgb\examples\lvgl_demo"...
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.36.1.windows.1")
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/esp/tools-master/tools/xtensa-esp32s3-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/esp/tools-master/tools/xtensa-esp32s3-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/esp/tools-master/tools/xtensa-esp32s3-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32s3
-- Project sdkconfig file C:/gitrepo/wywy-s3-rgb/examples/lvgl_demo/sdkconfig
C:/gitrepo/wywy-s3-rgb/examples/lvgl_demo/sdkconfig:525 CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240 was replaced with CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240
C:/gitrepo/wywy-s3-rgb/examples/lvgl_demo/sdkconfig:526 CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ was replaced with CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ
C:/gitrepo/wywy-s3-rgb/examples/lvgl_demo/sdkconfig:551 CONFIG_ESP32S3_SPIRAM_SUPPORT was replaced with CONFIG_SPIRAM
C:/gitrepo/wywy-s3-rgb/examples/lvgl_demo/sdkconfig:590 CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC_SYSTIMER was replaced with CONFIG_NEWLIB_TIME_SYSCALL_USE_RTC_HRT
C:/gitrepo/wywy-s3-rgb/examples/lvgl_demo/sdkconfig:594 CONFIG_ESP32S3_RTC_CLK_SRC_INT_RC was replaced with CONFIG_RTC_CLK_SRC_INT_RC
C:/gitrepo/wywy-s3-rgb/examples/lvgl_demo/sdkconfig:598 CONFIG_ESP32S3_RTC_CLK_CAL_CYCLES was replaced with CONFIG_RTC_CLK_CAL_CYCLES
C:/gitrepo/wywy-s3-rgb/examples/lvgl_demo/sdkconfig:599 CONFIG_ESP32S3_DEEP_SLEEP_WAKEUP_DELAY was replaced with CONFIG_ESP_SLEEP_DEEP_SLEEP_WAKEUP_DELAY
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of time_t
-- Check size of time_t - done
-- Found Python3: C:/esp/tools-master/python_env/idf5.0_py3.8_env/Scripts/python.exe (found version "3.8.7") found components: Interpreter
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
Hardlink created for C:\gitrepo\wywy-s3-rgb\examples\lvgl_demo\build\esp-idf\mbedtls\mbedtls\library\error.c <<===>> C:\Espressif\frameworks\esp-idf-master\components\mbedtls\mbedtls\library\error.c
Hardlink created for C:\gitrepo\wywy-s3-rgb\examples\lvgl_demo\build\esp-idf\mbedtls\mbedtls\library\version_features.c <<===>> C:\Espressif\frameworks\esp-idf-master\components\mbedtls\mbedtls\library\version_features.c
Hardlink created for C:\gitrepo\wywy-s3-rgb\examples\lvgl_demo\build\esp-idf\mbedtls\mbedtls\library\ssl_debug_helpers_generated.c <<===>> C:\Espressif\frameworks\esp-idf-master\components\mbedtls\mbedtls\library\ssl_debug_helpers_generated.c
Hardlink created for C:\gitrepo\wywy-s3-rgb\examples\lvgl_demo\build\esp-idf\mbedtls\mbedtls\library\ssl_debug_helpers_generated.h <<===>> C:\Espressif\frameworks\esp-idf-master\components\mbedtls\mbedtls\library\ssl_debug_helpers_generated.h
-- App "lvgl_demo" version: 49e2d8b
-- Adding linker script C:/gitrepo/wywy-s3-rgb/examples/lvgl_demo/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-master/components/esp_system/ld/esp32s3/sections.ld.in
-- Adding linker script C:/Espressif/frameworks/esp-idf-master/components/esp_rom/esp32s3/ld/esp32s3.rom.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-master/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-master/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-master/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-master/components/esp_rom/esp32s3/ld/esp32s3.rom.version.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-master/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib-time.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-master/components/soc/esp32s3/ld/esp32s3.peripherals.ld
CMake Error at C:/Espressif/frameworks/esp-idf-master/tools/cmake/component.cmake:312 (message):
  Include directory 'C:/gitrepo/wywy-s3-rgb/examples/lvgl_demo/main/include'
  is not a directory.
Call Stack (most recent call first):
  C:/Espressif/frameworks/esp-idf-master/tools/cmake/component.cmake:486 (__component_add_include_dirs)
  main/CMakeLists.txt:1 (idf_component_register)


-- Configuring incomplete, errors occurred!

How to resolve this? It seems that this repository is not working at the moment.

Visible tearing/glitches

When going through the LVGL widgets demo as well as my own LVGL demo, I can see visible "tearing" / glitches.
In other words, you can see which parts of the screen are being updated.

I went through the code supplied in this repository and I noticed that the LVGL display driver was not configured to use Direct mode, which I think it should given that it has an RGB peripheral and you typically only want to update the buffer once the entire frame has been updated.

I changed lv_port_disp_init in components\lvgl\porting\lv_port_disp.c to:

  • use a single draw buffer of LCD_WIDTH * LCD_HEIGHT * sizeof(lv_color_t) bytes
  • allocate the buffer in PSRAM (MALLOC_CAP_SPIRAM) as it wouldn't fit in the internal RAM
    ** also used heap_caps_aligned_alloc instead of heap_caps_malloc (with 64 byte alignment), but that doesn't seem to make a real difference
  • Set disp_drv.direct_mode = 1; before calling lv_disp_drv_register

For my own demo code this improved the experience quite a lot, but the framerate dropped for screens that only had a little animation going on.
For the LVGL widgets demo, the tearing itself became less noticable, but I got a lot of other glitches.

I think both issues might have to do with both LVGL and the RGB peripheral having to access to PSRAM.

Probably it would be better if the frame buffer would only be updated at most once "in between" frame transfers.
I've also posted a question on the Espressif forum related to this.

ESP-S3 RGB-PANLE

Lcd is not working . still is off state

DISP-PIN =3V or NC?
IMG20231009170913
IMG20231009170854

Terminal output
31) boot: Multicore bootloader
I (35) boot: chip revision: v0.1
I (39) boot.esp32s3: Boot SPI Speed : 80MHz
I (44) boot.esp32s3: SPI Mode : DIO
I (48) boot.esp32s3: SPI Flash Size : 2MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label Usage Type ST Offset Length
I (69) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (77) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (84) boot: 2 factory factory app 00 00 00010000 00100000
I (92) boot: End of partition table
I (96) esp_image: segment 0: paddr=00010020 vaddr=3c050020 size=41e10h (269840) map
I (153) esp_image: segment 1: paddr=00051e38 vaddr=3fc93100 size=03080h ( 12416) load
I (156) esp_image: segment 2: paddr=00054ec0 vaddr=40374000 size=0b158h ( 45400) load
I (169) esp_image: segment 3: paddr=00060020 vaddr=42000020 size=49f10h (302864) map
I (223) esp_image: segment 4: paddr=000a9f38 vaddr=4037f158 size=03f68h ( 16232) load
I (233) boot: Loaded app from partition at offset 0x10000
I (234) boot: Disabling RNG early entropy source...
I (245) cpu_start: Multicore app
I (245) octal_psram: vendor id : 0x0d (AP)
I (246) octal_psram: dev id : 0x02 (generation 3)
I (249) octal_psram: density : 0x03 (64 Mbit)
I (254) octal_psram: good-die : 0x01 (Pass)
I (259) octal_psram: Latency : 0x01 (Fixed)
I (265) octal_psram: VCC : 0x01 (3V)
I (270) octal_psram: SRF : 0x01 (Fast Refresh)
I (276) octal_psram: BurstType : 0x01 (Hybrid Wrap)
I (281) octal_psram: BurstLen : 0x01 (32 Byte)
I (287) octal_psram: Readlatency : 0x02 (10 cycles@Fixed)
I (293) octal_psram: DriveStrength: 0x00 (1/1)
I (298) esp_psram: Found 8MB PSRAM device
I (303) esp_psram: Speed: 40MHz
I (307) cpu_start: Pro cpu up.
I (310) cpu_start: Starting app cpu, entry point is 0x403753e8
0x403753e8: call_start_cpu1 at /home/nadeem/Documents/esp-idf/components/esp_system/port/cpu_start.c:154

I (0) cpu_start: App cpu up.
I (1048) esp_psram: SPI SRAM memory test OK
I (1057) cpu_start: Pro cpu start user code
I (1057) cpu_start: cpu freq: 160000000 Hz
I (1057) cpu_start: Application information:
I (1060) cpu_start: Project name: lvgl_demo
I (1066) cpu_start: App version: 1
I (1070) cpu_start: Compile time: Oct 9 2023 15:29:47
I (1076) cpu_start: ELF file SHA256: c56fcc63e45b75e9...
I (1082) cpu_start: ESP-IDF: v5.1.1-dirty
I (1088) cpu_start: Min chip rev: v0.0
I (1093) cpu_start: Max chip rev: v0.99
I (1098) cpu_start: Chip rev: v0.1
I (1103) heap_init: Initializing. RAM available for dynamic allocation:
I (1110) heap_init: At 3FC96FA8 len 00052768 (329 KiB): DRAM
I (1116) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (1123) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (1129) heap_init: At 600FE010 len 00001FD8 (7 KiB): RTCRAM
I (1136) esp_psram: Adding pool of 8192K of PSRAM memory to heap allocator
I (1144) spi_flash: detected chip: generic
I (1148) spi_flash: flash io: dio
W (1152) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (1165) sleep: Configure to isolate all GPIO pins in sleep state
I (1172) sleep: Enable automatic switching of GPIO sleep configuration
I (1179) app_start: Starting scheduler on CPU0
I (1184) app_start: Starting scheduler on CPU1
I (1184) main_task: Started on CPU0
I (1194) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (1204) main_task: Calling app_main()
I (1204) gpio: GPIO[39]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1214) gpio: GPIO[48]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1224) gpio: GPIO[47]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1234) st7701: st7701 register init
I (1394) gpio: GPIO[38]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1394) lv_port_disp: Install RGB panel driver
I (1434) lv_port_disp: Turn on LCD backlight

assert failed: lv_port_disp_init lv_port_disp.c:101 (buf2)

Backtrace: 0x4037597e:0x3fc9a8b0 0x4037ae05:0x3fc9a8d0 0x40381051:0x3fc9a8f0 0x42024dae:0x3fc9aa10 0x42009862:0x3fc9aaf0 0x42049737:0x3fc9ab20 0x4037d4bd:0x3fc9ab50
0x4037597e: panic_abort at /home/nadeem/Documents/esp-idf/components/esp_system/panic.c:452

0x4037ae05: esp_system_abort at /home/nadeem/Documents/esp-idf/components/esp_system/port/esp_system_chip.c:84

0x40381051: __assert_func at /home/nadeem/Documents/esp-idf/components/newlib/assert.c:81

0x42024dae: lv_port_disp_init at /home/nadeem/Documents/ESP32-S3-RGB-Panel-square-screen/components/lvgl/porting/lv_port_disp.c:101 (discriminator 1)

0x42009862: app_main at /home/nadeem/Documents/ESP32-S3-RGB-Panel-square-screen/examples/lvgl_demo/main/main.c:44

0x42049737: main_task at /home/nadeem/Documents/esp-idf/components/freertos/app_startup.c:208 (discriminator 13)

0x4037d4bd: vPortTaskWrapper at /home/nadeem/Documents/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:162

When i upload the code in MCU. code is crase

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.