Problems with touch on 3.2 inch shield

Post Reply
webber
Posts: 36
Joined: Tue May 05, 2020 8:10 am
languages_spoken: english
ODROIDs: C2 C4 N2 XU4
Has thanked: 7 times
Been thanked: 3 times
Contact:

Problems with touch on 3.2 inch shield

Post by webber »

Apologies if this is the wrong place to ask about the 3.2 inch model, I couldn't find anywhere else.

I recently received a 3.2 inch touchscreen shield and have been unable to get the touch to work on an N2. The display itself is working just fine
I tried following the guide here https://wiki.odroid.com/accessory/displ ... id-c2n2c41

Here is the output from lsmod and the dmesg logs for the touchscreen driver

Code: Select all

root@odroid:~# lsmod
Module                  Size  Used by
fuse                  110592  3
cpufreq_ondemand       20480  0
cpufreq_powersave      16384  0
cpufreq_userspace      16384  0
cpufreq_conservative    16384  0
joydev                 24576  0
ads7846                24576  0
fb_hktft32             16384  1
fbtft                  53248  1 fb_hktft32
i2c_meson_master       20480  0
squashfs               49152  10
sch_fq_codel           20480  2
amvdec_vp9            122880  0
amvdec_vc1             65536  0
amvdec_real            45056  0
amvdec_mmpeg4          40960  0
amvdec_mpeg4           65536  0
amvdec_mpeg12         106496  0
amvdec_mmjpeg          28672  0
amvdec_mjpeg           40960  0
amvdec_h265           147456  0
amvdec_h264mvc         57344  0
amvdec_mh264          159744  0
amvdec_h264           147456  0
amvdec_avs             69632  0
stream_input          180224  8 amvdec_h265,amvdec_mh264,amvdec_h264mvc,amvdec_real,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvdec_avs
decoder_common        188416  14 amvdec_h265,amvdec_mjpeg,amvdec_mh264,amvdec_mmpeg4,amvdec_h264mvc,amvdec_mmjpeg,amvdec_real,stream_input,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvdec_avs,amvdec_vc1,amvdec_mpeg4
firmware               28672  15 amvdec_h265,amvdec_mjpeg,amvdec_mh264,amvdec_mmpeg4,amvdec_h264mvc,amvdec_mmjpeg,decoder_common,amvdec_real,stream_input,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvdec_avs,amvdec_vc1,amvdec_mpeg4
media_clock            45056  9 amvdec_h265,amvdec_mh264,decoder_common,firmware,stream_input,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvdec_avs
ip_tables              28672  0
x_tables               49152  1 ip_tables
ipv6                  466944  52
spi_meson_spicc        20480  0

Code: Select all

root@odroid:~# dmesg | grep ads
[   10.270114] ads7846 spi0.1: setup mode 0, 8 bits/w, 1000000 Hz max --> 0
[   10.270339] ads7846 spi0.1: touchscreen, irq 72
[   10.276004] ads7846 spi0.1: ads7846_probe ok! registered with irq (72)
[   67.552738] ads7846 spi0.1: SPI transfer timed out
[   67.552787] ads7846 spi0.1: spi_sync --> -110
Any help would be greatly appreciated

webber
Posts: 36
Joined: Tue May 05, 2020 8:10 am
languages_spoken: english
ODROIDs: C2 C4 N2 XU4
Has thanked: 7 times
Been thanked: 3 times
Contact:

Re: Problems with touch on 3.2 inch shield

Post by webber »

A little update, it seems to work for a very short time immediately after boot but then it stops

User avatar
odroid
Site Admin
Posts: 37753
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1910 times
Been thanked: 1183 times
Contact:

Re: Problems with touch on 3.2 inch shield

Post by odroid »

Which kernel version do you run on your N2?
Could you see a frame buffer console in a very short time? or x-window (Mate desktop)?
How is the backlight LED? Is it still on?

webber
Posts: 36
Joined: Tue May 05, 2020 8:10 am
languages_spoken: english
ODROIDs: C2 C4 N2 XU4
Has thanked: 7 times
Been thanked: 3 times
Contact:

Re: Problems with touch on 3.2 inch shield

Post by webber »

This is the Ubuntu 20 image with the 4.9.241-114 kernel. The display always works fine with console and x-window, it's just the touch driver that seems to fail a couple seconds after boot

webber
Posts: 36
Joined: Tue May 05, 2020 8:10 am
languages_spoken: english
ODROIDs: C2 C4 N2 XU4
Has thanked: 7 times
Been thanked: 3 times
Contact:

Re: Problems with touch on 3.2 inch shield

Post by webber »

Same behaviour with the ubuntu 18 image with the 4.9.241-77 kernel.

On a side note, maybe consider updating the following line in the wiki to reference the kernel version, not the OS version I think, since device tree overlays work on kernel version 4.9.230 and up
temp.png
temp.png (71.72 KiB) Viewed 197 times

webber
Posts: 36
Joined: Tue May 05, 2020 8:10 am
languages_spoken: english
ODROIDs: C2 C4 N2 XU4
Has thanked: 7 times
Been thanked: 3 times
Contact:

Re: Problems with touch on 3.2 inch shield

Post by webber »

Maybe this would be helpful too

Code: Select all

root@odroid:~# dmesg | grep spi
[    9.287621] meson-spicc ffd13000.spi: registered master spi0
[    9.288937] spi spi0.1: setup mode 0, 8 bits/w, 1000000 Hz max --> 0
[    9.289037] meson-spicc ffd13000.spi: registered child spi0.1
[    9.289050] spi spi0.0: setup mode 0, 8 bits/w, 40000000 Hz max --> 0
[    9.289105] meson-spicc ffd13000.spi: registered child spi0.0
[    9.353364] ads7846 spi0.1: setup mode 0, 8 bits/w, 1000000 Hz max --> 0
[    9.357721] ads7846 spi0.1: touchscreen, irq 72
[    9.358290] input: ADS7846 Touchscreen as /devices/platform/soc/ffd00000.cbus/ffd13000.spi/spi_master/spi0/spi0.1/input/input3
[    9.358429] ads7846 spi0.1: ads7846_probe ok! registered with irq (72)
[    9.718527] graphics fb4: fb_hktft32 frame buffer, 320x240, 150 KiB video memory, 4 KiB buffer memory, fps=20, spi0.0 at 40 MHz
[   10.892228] ads7846 spi0.1: SPI transfer timed out
[   17.836209] ads7846 spi0.1: SPI transfer timed out
[   17.836252] ads7846 spi0.1: spi_sync --> -110

webber
Posts: 36
Joined: Tue May 05, 2020 8:10 am
languages_spoken: english
ODROIDs: C2 C4 N2 XU4
Has thanked: 7 times
Been thanked: 3 times
Contact:

Re: Problems with touch on 3.2 inch shield

Post by webber »

I can restore touch functionality for another couple seconds by removing and adding the ads7846 driver again. It seems to work up until the driver decides it hasn't received a response signal so I'm not sure if it's a bug in the driver or a hardware defect

Code: Select all

root@odroid:~# dmesg | grep ads
[    9.401646] ads7846 spi0.1: setup mode 0, 8 bits/w, 1000000 Hz max --> 0
[    9.401849] ads7846 spi0.1: touchscreen, irq 72
[    9.402463] ads7846 spi0.1: ads7846_probe ok! registered with irq (72)
[   10.992656] ads7846 spi0.1: SPI transfer timed out
[   18.076633] ads7846 spi0.1: SPI transfer timed out
[   18.076675] ads7846 spi0.1: spi_sync --> -110
root@odroid:~# modprobe -r ads7846
root@odroid:~# modprobe ads7846
root@odroid:~# dmesg | grep ads
[    9.401646] ads7846 spi0.1: setup mode 0, 8 bits/w, 1000000 Hz max --> 0
[    9.401849] ads7846 spi0.1: touchscreen, irq 72
[    9.402463] ads7846 spi0.1: ads7846_probe ok! registered with irq (72)
[   10.992656] ads7846 spi0.1: SPI transfer timed out
[   18.076633] ads7846 spi0.1: SPI transfer timed out
[   18.076675] ads7846 spi0.1: spi_sync --> -110
[  130.031878] ads7846 spi0.1: setup mode 0, 8 bits/w, 1000000 Hz max --> 0
[  130.036455] ads7846 spi0.1: touchscreen, irq 72
[  130.046418] ads7846 spi0.1: ads7846_probe ok! registered with irq (72)
[  131.310956] ads7846 spi0.1: SPI transfer timed out
[  131.310994] ads7846 spi0.1: spi_sync --> -110

User avatar
odroid
Site Admin
Posts: 37753
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1910 times
Been thanked: 1183 times
Contact:

Re: Problems with touch on 3.2 inch shield

Post by odroid »

Sorry for late reply. I had a vacation.

Do you mean that touch screen worked for few seconds just after running modprobe ads7846 driver?
We will try reproducing the issue tomorrow on Ubuntu 20.04 with Kernel 4.9.241-114.

webber
Posts: 36
Joined: Tue May 05, 2020 8:10 am
languages_spoken: english
ODROIDs: C2 C4 N2 XU4
Has thanked: 7 times
Been thanked: 3 times
Contact:

Re: Problems with touch on 3.2 inch shield

Post by webber »

No worries, hope you had a good rest :)

yes, it seems to work up until the dmesg log that says "SPI transfer timed out"

User avatar
odroid
Site Admin
Posts: 37753
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1910 times
Been thanked: 1183 times
Contact:

Re: Problems with touch on 3.2 inch shield

Post by odroid »

We could reproduce the issue. :o
I think some of recent kernel updates might break the touchscreen driver functionality. :(

We might need a few working days to release a solution.

webber
Posts: 36
Joined: Tue May 05, 2020 8:10 am
languages_spoken: english
ODROIDs: C2 C4 N2 XU4
Has thanked: 7 times
Been thanked: 3 times
Contact:

Re: Problems with touch on 3.2 inch shield

Post by webber »

ooo ok. thanks for the help

Post Reply

Return to “3.5inch LCD Shield”

Who is online

Users browsing this forum: webber and 3 guests