xperiments-in / xtouch

Other
576 stars 54 forks source link

Support for 3.2" Display with Capacitive Touch #61

Closed jpasqua closed 6 months ago

jpasqua commented 7 months ago

Feature Description

There is a board with a 3.2" display which is very similar to the 2.8" display which is recommended. It would be nice to support this slightly larger board. I'm happy to provide sample boards if useful.

Justification

Slightly easier to read and tap than the smaller display, but the same resolution so layouts need not change.

Suggested Implementation (if you have one)

Flashing the existing code causes a boot loop after a core dump. This happens after the log message:

[XTouch][SCREEN] Setup

appears.

Screenshots or Examples (if applicable)

Sample from the log (this repeats):

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
[XTouch][SCREEN] Setup
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400f54fe  PS      : 0x00060230  A0      : 0x800d26fb  A1      : 0x3ffb2150  
A2      : 0x00000000  A3      : 0x50000000  A4      : 0x000000ef  A5      : 0x00000000  
A6      : 0x00000055  A7      : 0x00000000  A8      : 0x800f54fe  A9      : 0x3ffb2130  
A10     : 0x0000024d  A11     : 0x00000001  A12     : 0x00000000  A13     : 0x00000000  
A14     : 0x0000024d  A15     : 0x00000000  SAR     : 0x0000000a  EXCCAUSE: 0x0000001d  
EXCVADDR: 0x00000004  LBEG    : 0x40084815  LEND    : 0x4008481d  LCOUNT  : 0x00000027  

Backtrace: 0x400f54fb:0x3ffb2150 0x400d26f8:0x3ffb2170 0x400f34f6:0x3ffb21a0 0x400e6ac3:0x3ffb21c0 0x400f5480:0x3ffb2210 0x400d2c7f:0x3ffb2240 0x400db15a:0x3ffb2260 0x40113672:0x3ffb2290
smcferrin commented 7 months ago

The code is hard-coded for a 320 by 240 display. I would assume that the display you are using may have different hardware as well as a different screen resolution. No surprise that it will not boot.

jpasqua commented 7 months ago

This display is also 320x240 - just larger pixels. I've got it working with lvgl and the screen works well. However, the particular model I got has a capacitive touch screen rather than resistive. It uses the Touch_GT911 library rather than XPT2046_Touchscreen. It may not be worth the bother to support this since there is also a restive touch version of the 3.2" display which (as far as I can tell) uses the XPT2046. I've ordered a couple of those and will report my findings when they arrive. At that point I will probably just close this issue.

Dark1886 commented 7 months ago

This display is also 320x240 - just larger pixels. I've got it working with lvgl and the screen works well. However, the particular model I got has a capacitive touch screen rather than resistive. It uses the Touch_GT911 library rather than XPT2046_Touchscreen. It may not be worth the bother to support this since there is also a restive touch version of the 3.2" display which (as far as I can tell) uses the XPT2046. I've ordered a couple of those and will report my findings when they arrive. At that point I will probably just close this issue.

Generally the capacitive screens are nicer to use than resistive screens. Have you noticed the capacitive screen on this budget device to still better than a resistive touch?

kozakm00 commented 6 months ago

How about the 2,4" but with capacitive touch? Will it work?https://a.aliexpress.com/_msNFSXW

xperiments commented 6 months ago

I will close this as ATM I will only support one screen... You can fork and make the needed changes... But I have not all the devices or the time to support more...