Skip to content
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

support for esp32-2432s022c board #606

Open
cosmos1978 opened this issue Jan 4, 2024 · 1 comment
Open

support for esp32-2432s022c board #606

cosmos1978 opened this issue Jan 4, 2024 · 1 comment
Labels
hardware New hardware or driver help wanted Extra attention is needed

Comments

@cosmos1978
Copy link

I recently bought some of these screens (ESP32-2432s022c)

I tried configuring it based on your github but I only am able to get some distorted images on the display. ( snow pattern )
It uses ST7789 driver and the same touch driver as your board. The difference is that the tft display uses an 8 bit parallel bus.
It also needs to use lovyanGFX since it uses pin's above 31

I have some sample code that runs perfect on the board. And I tried to map the pins like in that code but I am stuck now on this distorted image

Perhaps you have some ideas on how to get it working ?

below is the working arduino code and the platformio.ini env I created based on https://github.com/elik745i/ESP32-2432s024c since he was able to include support for the touch chipset

public:
LGFX(void)
{
{
auto cfg = _bus_instance.config();
cfg.freq_write = 25000000;
cfg.pin_wr = 4;
cfg.pin_rd = 2;
cfg.pin_rs = 16;

    cfg.pin_d0 = 15;
    cfg.pin_d1 = 13;
    cfg.pin_d2 = 12;
    cfg.pin_d3 = 14;
    cfg.pin_d4 = 27;
    cfg.pin_d5 = 25;
    cfg.pin_d6 = 33;
    cfg.pin_d7 = 32;

    _bus_instance.config(cfg);
    _panel_instance.setBus(&_bus_instance);
}

{
    auto cfg = _panel_instance.config();

    cfg.pin_cs = 17;
    cfg.pin_rst = -1;
    cfg.pin_busy = -1;

    cfg.panel_width = 240;
    cfg.panel_height = 320;
    cfg.offset_x = 0;
    cfg.offset_y = 0;
    cfg.offset_rotation = 0;
    // cfg.dummy_read_pixel = 8;
    // cfg.dummy_read_bits = 1;
    cfg.readable = false;
    cfg.invert = false;
    cfg.rgb_order = false;
    cfg.dlen_16bit = false;
    cfg.bus_shared = true;

    _panel_instance.config(cfg);
}

setPanel(&_panel_instance);

}
};

[env:esp32-2432s022c_4MB]
extends = esp32-2432s022, flash_4mb
board = esp32dev
build_flags =
${esp32-2432s022.build_flags}
${esp32.no_ps_ram}

${esp32.hspi}
-D LGFX_USE_V1=1
-D ILI9341_DRIVER=1
-D ESP32_PARALLEL=1
-D TOUCH_DRIVER=0x0820
-D HASP_USE_LGFX_TOUCH=1
-D TFT_ROTATION=0
-D TFT_WIDTH=240
-D TFT_HEIGHT=320
-D TFT_BCKL=5 ;None, configurable via web UI (e.g. 2 for D4)
-D TFT_CS=17 ; Chip select control pin
-D TFT_RST=-1 ; Reset pin
-D TFT_DC=16
-D TFT_WR=4 ; Write strobe control pin - must use a pin in the range 0-31
-D TFT_RD=2
-D TFT_D0=15 ; Must use pins in the range 0-31 for the data bus
-D TFT_D1=13 ; so a single register write sets/clears all bits
-D TFT_D2=12
-D TFT_D3=14
-D TFT_D4=27
-D TFT_D5=25
-D TFT_D6=33
-D TFT_D7=32
-D TOUCH_SDA=21
-D TOUCH_SCL=22
;-D TOUCH_IRQ=34 ; use 34-39 as these are input only pins
-D TOUCH_RST=-1 ; not used, connected to 3.3V
-D SUPPORT_TRANSACTIONS
-D TOUCH_OFFSET_ROTATION=0
;-D I2C_TOUCH_FREQUENCY=400000
;-D I2C_TOUCH_PORT=1
-D I2C_TOUCH_ADDRESS=0x15
-D SPI_FREQUENCY=65000000
-D SPI_TOUCH_FREQUENCY=2500000
-D SPI_READ_FREQUENCY=20000000
lib_deps =
${esp32-2432s022.lib_deps}
${lovyangfx.lib_deps}

@cosmos1978 cosmos1978 added the question Further information is requested label Jan 4, 2024
@gekkie
Copy link

gekkie commented Mar 20, 2024

I second this request

@fvanroie fvanroie added help wanted Extra attention is needed hardware New hardware or driver and removed question Further information is requested labels Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hardware New hardware or driver help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants