Tasmota
Tasmota copied to clipboard
Udisplay support for rgb displays
Description:
adds new touch driver gt911 adds support for rgb displays to universal display driver => sunton esp32-s3 rgb display 800x480 the cheapest high res esp board available, very good display panel but a little slow https://www.makerfabs.com/sunton-esp32-s3-4-3-inch-ips-with-touch.html
{"NAME":"SUNTON","GPIO":[1,1,1,1,1,1,1,1,1,1,6720,704,736,672,1,1,1,1,1,640,608,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":1}
remark: this driver does heavy DMA. obviously there is a clash with RGB PSRAM DMA and a special heap call: uint32_t free_block_size = heap_caps_get_largest_free_block(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); it generates a divide by zero error when the display is enabled
there seams to be no other anomaly, everything else works without any problems
i had to disable this call by define #define RGB_DISPLAY otherwise get info crashes with zero divide error.
Checklist:
- [x] The pull request is done against the latest development branch
- [x] Only relevant files were touched
- [x] Only one feature/fix was added per PR and the code change compiles without warnings
- [x] The code change is tested and works with Tasmota core ESP8266 V.2.7.4.9
- [x] The code change is tested and works with Tasmota core ESP32 V.2.0.5
- [x] I accept the CLA.
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass
Price is really nice. But shipping :-( Do you know a other source?
Shipping was 15 euros and arrived in 8 days !
Thx. Had to create an account. Well really nice, latest S3 on board and touch is already included too + card reader. @s-hadinger Perfect for LVGL.
i forgot an info. this board is 16M_qio_opi
Really nice display ;-) The template should set the A3 GPIO too.
{"NAME":"SUNTON","GPIO":[1,1,1,1,1,1,1,1,1,1,6720,704,736,672,1,1,1,1,1,640,608,1,0,0,0,0,0,6210,1,1,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":1}
will upload a autoconfig file...
Hi,
sorry if thats not th correct place for question.
I got the ESP32-8048S043 display. I flashed it via:
I added this template
an did the autoconf with
.
I am able to connect the webinterface but dont get the display to show anything.
Does anybody have an idea what I am doing wrong?
Maybe it has something to do with the template and autoconfig as ESP32-8048S050 has ST7262 and ESP32-8048S043 has ILI9485.
Different display controller, so it needs a different display.ini to init.
So I do have to compile it?
You have to read ;-) Start here https://tasmota.github.io/docs/Displays/#universal-display-driver
Ok thanks.
Or is it this one https://github.com/arendst/Tasmota/pull/17326
No, the display I have is: ESP32-8048S043 Specifications-EN.pdf
It`s strange I cant find any information for ILI9485.
Strange managed to download the demo package from here http://www.jczn1688.com/zlxz There is no mention of a ILI9485 anywhere. Demo code Hello World for the Display
/*******************************************************************************
******************************************************************************/
#include <Arduino_GFX_Library.h>
#define GFX_BL DF_GFX_BL // default backlight pin, you may replace DF_GFX_BL to actual backlight pin
#define TFT_BL 2
/* More dev device declaration: https://github.com/moononournation/Arduino_GFX/wiki/Dev-Device-Declaration */
#if defined(DISPLAY_DEV_KIT)
Arduino_GFX *gfx = create_default_Arduino_GFX();
#else /* !defined(DISPLAY_DEV_KIT) */
/* More data bus class: https://github.com/moononournation/Arduino_GFX/wiki/Data-Bus-Class */
//Arduino_DataBus *bus = create_default_Arduino_DataBus();
/* More display class: https://github.com/moononournation/Arduino_GFX/wiki/Display-Class */
//Arduino_GFX *gfx = new Arduino_ILI9341(bus, DF_GFX_RST, 0 /* rotation */, false /* IPS */);
Arduino_ESP32RGBPanel *bus = new Arduino_ESP32RGBPanel(
GFX_NOT_DEFINED /* CS */, GFX_NOT_DEFINED /* SCK */, GFX_NOT_DEFINED /* SDA */,
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 */
);
// option 1:
// ST7262 IPS LCD 800x480
Arduino_RPi_DPI_RGBPanel *gfx = new Arduino_RPi_DPI_RGBPanel(
bus,
800 /* width */, 0 /* hsync_polarity */, 8 /* hsync_front_porch */, 4 /* hsync_pulse_width */, 8 /* hsync_back_porch */,
480 /* height */, 0 /* vsync_polarity */, 8 /* vsync_front_porch */, 4 /* vsync_pulse_width */, 8 /* vsync_back_porch */,
1 /* pclk_active_neg */, 16000000 /* prefer_speed */, true /* auto_flush */);
#endif /* !defined(DISPLAY_DEV_KIT) */
/*******************************************************************************
* End of Arduino_GFX setting
******************************************************************************/
void setup(void)
{
gfx->begin();
gfx->fillScreen(BLACK);
#ifdef TFT_BL
pinMode(TFT_BL, OUTPUT);
digitalWrite(TFT_BL, HIGH);
#endif
gfx->setCursor(10, 10);
gfx->setTextColor(RED);
gfx->println("Hello World!");
delay(5000); // 5 seconds
}
void loop()
{
gfx->setCursor(random(gfx->width()), random(gfx->height()));
gfx->setTextColor(random(0xffff), random(0xffff));
gfx->setTextSize(random(6) /* x scale */, random(6) /* y scale */, random(2) /* pixel_margin */);
gfx->println("Hello World!");
delay(1000); // 1 second
}
@gemu2015 Can you help?
sorry i can't , as long as there is no proven to work source code i am not willing to dig into this. @Rushmed you will have to compile a demo package for your display and if it is working well provide a link to the working source code.
@gemu2015 So I have to compile the code @Jason2866 sent and upload it to the device? Any recommendation for test procedure or is the test passed when "Hello World!" is shown?
yes "hello world" is enough
Ok, got it. I followed this instruction: Getting started 4.3 Inch.pdf
Now I have display output. Every every second another "Hello World" wit different color and background color is added to the screen.
FYI as in the instruction I needed to copy lv_conf.h.txt (Changed ending to .txt to be able to upload) maybe it contains some useful information.
ok, this seems to be the sunton-s3 apply the template from above (from @Jason2866 ), copy the sunton descriptor (ST7262_rgb16_display.ini) as display.ini into file system and restart.
Ok, thanks for help.
I flashed again.
Applied:
{"NAME":"SUNTON","GPIO":[1,1,1,1,1,1,1,1,1,1,6720,704,736,672,1,1,1,1,1,640,608,1,0,0,0,0,0,6210,1,1,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":1}
and copied
autoexec.be.txt
and
display.ini.txt
to file system.
Restarted bu no display output.
if you took the very first template you have to enable udisplay by setting GPIO 0 to Option A3
No, i took the second one.
your display.ini is complete garbage. it should only be a few lines
I used ST7262_rgb16_display.ini fom here and renamed it.
look at the file size, it should have only have 164 bytes
Thanks, ill` check.
Now the backlight blinks three times on startup and then stays on and lower brightness. Screen stays black.
what is in the console during boot ?
00:00:00.002-286/14 HDW: ESP32-S3 00:00:00.013-284/13 UFS: FlashFS mounted with 12588 kB free 00:00:00.021 CFG: Loaded from File, Count 26 00:00:00.023 FRC: Some settings have been reset (4) 00:00:00.026 SPI: Hardware using GPIO12(CLK), GPIO11(MOSI) and GPIO13(MISO) 00:00:00.035 TFS: File '.drvset003' not found 00:00:00.035 CFG: Energy use defaults as file system not ready or file not found 00:00:00.654 Project tasmota - Tasmota Version 12.4.0.1(lvgl-haspmota)-2_0_7(2023-02-23T21:39:11) 00:00:01.339 WIF: Connecting to AP1 Slowdazamba Channel 4 BSSId D0:21:F9:B9:64:71 in mode 11n as tasmota-8F70B4-4276... 00:00:02.096 WIF: Connected 00:00:02.349 HTP: Web server active on tasmota-8F70B4-4276 with IP address 192.168.178.219 17:19:48.153 RSL: INFO1 = {"Info1":{"Module":"SUNTON","Version":"12.4.0.1(lvgl-haspmota)","FallbackTopic":"cmnd/DVES_8F70B4_fb/","GroupTopic":"cmnd/tasmotas/"}} 17:19:48.165 RSL: INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"tasmota-8F70B4-4276","IPAddress":"192.168.178.219","IP6Global":"","IP6Local":"fe80::3685:18ff:fe8f:70b4"}} 17:19:48.178 RSL: INFO3 = {"Info3":{"RestartReason":{"Exception":28,"Reason":"LoadProhibited","EPC":"4208494b","EXCVADDR":"0000000c","CallChain":["42084948","4207c557","42075a79","420775e1","4209240b","42077601","420a9ed6","420b705c","42029536"]},"BootCount":8}} 17:19:48.201 RSL: RESULT = {"POWER":"ON"} 17:19:48.202 RSL: POWER = ON 17:19:50.949 QPC: Reset 17:19:51.946 RSL: STATE = {"Time":"2023-02-24T17:19:51","Uptime":"0T00:00:07","UptimeSec":7,"Heap":228,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":0,"POWER":"ON","Wifi":{"AP":1,"SSId":"Slowdazamba","BSSId":"D0:21:F9:B9:64:71","Channel":4,"Mode":"11n","RSSI":100,"Signal":-49,"LinkCount":1,"Downtime":"0T00:00:03"}}
this caused a reset, please delete auto exec.be maybe it is also garbage. if that doesn't not help probably it isn't exactly this display, despite the backlight matches.
maybe it is the ILI chip variant. to adapt this is much more work
why don't you buy a display known to be supported by tasmota like the one above.
it is only 25 Euros + 15 euros shipping