Resistive touch stops working until restart

Hello,

I have resistive touch screen connected to an apalis tk1 + ixora

The resistive touch works after doing a proper calibration. The problem is that sometimes touch screen stops working (and the pointer disappears). I get the following messages via when this happens dmesg

[54990.895590] apalis-tk1-k20 spi1.1: K20 FIFO Bug!
[54990.902637] input input1: Error reading data
[54991.599891] apalis-tk1-k20 spi1.1: K20 FIFO Bug!
[54991.608302] apalis-tk1-k20 spi1.1: Failed to read IRQ status: -5
[54992.562276] apalis-tk1-k20 spi1.1: K20 FIFO Bug!
[54992.573148] apalis-tk1-k20 spi1.1: Failed to read IRQ status: -5
[54993.778296] apalis-tk1-k20 spi1.1: K20 FIFO Bug!
[54993.790779] apalis-tk1-k20 spi1.1: Failed to read IRQ status: -5
[54995.220215] apalis-tk1-k20 spi1.1: K20 FIFO Bug!
[54995.227937] apalis-tk1-k20 spi1.1: Failed to read IRQ status: -5
[54995.259789] apalis-tk1-k20 spi1.1: K20 FIFO Bug!
[54995.266579] apalis-tk1-k20 spi1.1: Failed to read IRQ status: -5

Problem persists (touch won’t work, the pointer disappeared) until i restart the whole system. I don’t know what is the problem and if it can be fixed easily. If it can’t be fixed easily is there any command to restart the driver so i don’t have to restart the whole system?

Thanks in advance

Please update to our latest BSP 2.8b2 which includes various K20 fixes, retest and report back again should you still face issues.

The custom image i build was using the openembedded tools (guide from: High performance, low power Embedded Computing Systems | Toradex Developer Center) because i needed to add some extra programs and then i also downloaded the kernel sources and changed some parameters and then copied the resulting uImage to the openembedded image (and installed some kernel modules)

Is there any way to not change the openembedded image and only update the kernel source or they should be both updated?

Thanks in advance

The custom image i build was using the openembedded tools (guide from: High performance, low power Embedded Computing Systems | Toradex Developer Center) because i needed to add some extra programs

Yes, that is actually the recommended way of customising an Embedded Linux image.

and then i also downloaded the kernel sources and changed some parameters and then copied the resulting uImage to the openembedded image (and installed some kernel modules)

In general, that is fine as well. However, you may need to be careful that you get matching parts potentially being user space, K20 firmware, device tree, Linux kernel and kernel modules.

Is there any way to not change the openembedded image and only update the kernel source or they should be both updated?

Yes, you may do so as explained in the following article on our developer website. Just make sure to update device tree and kernel modules as well. Plus in this case, also the K20 firmware changed. So ultimately, you may want to update your whole custom image. Just for testing, you may also install our stock BSP 2.8b2 demo image e.g. using the Toradex Easy Installer.

Thanks in advance

You are very welcome.

One last question,

If i don’t want to rebuild kernel from source and just build a new 2.8b2 image with openembedded (with all the extra packages i need) which also builds the kernel but i want to change some of the kernel config to include some extra drivers/modules how do i do it?

as i said i normally downloaded the kernel source, changed some parameters with make nconfig and compiled it.

You may e.g. customise the Linux kernel recipe doing a bbappend as explained by my senior engineer Max in the following blog post. For simple configuration changes, you may also do it as follows.

Good morning,

As suggested previously i’ve flashed the system with a custom 2.8b2 image done via openembedded. When i start the system the calibration screen appears, but i can only press the first point, after that i can’t press any other point. It seems that the touch screen stops working as soon as i press any point on the screen. The problem is that i don’t see any message in dmesg

What is the problem?

Thanks in advance

I’ve also tried the stock 2.8b2 image with the same results (i’m not using toradex easy installer, i’m doing it the legacy way via an sd, uboot, run setupdate, run update)

edit: I’m attaching evtest log

root@apalis-tk1:~# evtest /dev/input/touchscreen0
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "apalis-tk1-k20-ts"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value      0
      Min        0
      Max     4095
    Event code 1 (ABS_Y)
      Value      0
      Min        0
      Max     4095
    Event code 24 (ABS_PRESSURE)
      Value      0
      Min        0
      Max     4095
Properties:
Testing ... (interrupt to exit)
Event: time 1526991699.985593, type 3 (EV_ABS), code 0 (ABS_X), value 49206
Event: time 1526991699.985593, type 3 (EV_ABS), code 1 (ABS_Y), value 2056
Event: time 1526991699.985593, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 15987
Event: time 1526991699.985593, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1526991699.985593, -------------- SYN_REPORT ------------

It only detected the first press, but after that no more presses are being detected

Please try attached firmware.
Instruction:

  • Download test firmware
  • execute echo -n "a" > /lib/firmware/apalis-tk1-k20.bin
  • reboot the module
  • verify that chip was erased dmesg | grep "Chip fully erased"
  • copy downloaded firmware to /lib/firmware/apalis-tk1-k20.bin on the module
  • execute rmmod apalis_tk1_k20 && modprobe apalis_tk1_k20
  • test touchscreen

with reboot the modules you mean reboot the apalis tk1 (with reboot now)?

yes, just reboot should do it.

Now the touch is working as it should. We will keep testing it to see if it stills stops working after a while like it happened in 2.8b1

There’s a small issue with the sensitivity. Sometimes when we press a point it first selects a further point and then the correct point, but it behaves like its a drag/swipe event. Do you think this might be due to the drivers? or maybe it’s because of the cable we used to connect (4 wire) that it might be too long?

Glad to hear it, fix will be included in our next release.

We haven’t experienced this issue with our screens. How long is the cable? How big is the digitizer? How often can you reproduce it?

The screen/digitizer is 13inches. I can’t see the cable cause the screen is inside a box now (but the person who made the cable and did the connections told me that it was maybe a bit long). It happens every few presses on the screen

Another thing i noticed is that if i press a point and keep it pressed the pointer keeps moving a few milimeters constantly until i stop pressing the point.

If this is not a driver issue we might try to do/use a new cable (4 wire)

Decreasing cable length and preferably shielding them may help.
Please try this firmware, it includes a bit more aggressive filtering. Let me know if the behaviour changes in any way.

I’m getting the following error now when trying the line with rmmod and modprobe

modprobe: FATAL: Module apalis-tk1-k20.bin not found in directory /lib/modules/3.10.40-2.8.2+ge81dd8a

I’ve tried reapplying the previous firmware and it also says the same error. what am i doing wrong? Should i reflash the system again and try it from 0?

there is no .bin in that command

i was using tab to autocomplete :slight_smile: it’s working now

i think it’s a bit better but we are still seeing the problem when sometimes when i click on a point the mouse cursor goes to another x (but same y where i pressed) or another y (but same x where i pressed). This is most reproducible when i click repeateadly the same point

I’ve tweaked sensitivity and filtering a bit: firmware

I think the sensitivity is much better, but still seeing problem i said with pressing repeatedly the same point. I’m attaching a piece of the log

Event: time 1527086913.354719, type 3 (EV_ABS), code 0 (ABS_X), value 290
Event: time 1527086913.354719, type 3 (EV_ABS), code 1 (ABS_Y), value 2734
Event: time 1527086913.354719, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 2
Event: time 1527086913.354719, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1527086913.354719, -------------- SYN_REPORT ------------
Event: time 1527086913.394093, type 3 (EV_ABS), code 0 (ABS_X), value 293
Event: time 1527086913.394093, type 3 (EV_ABS), code 1 (ABS_Y), value 2735
Event: time 1527086913.394093, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 1
Event: time 1527086913.394093, -------------- SYN_REPORT ------------
Event: time 1527086913.434244, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1527086913.434244, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1527086913.434244, -------------- SYN_REPORT ------------
Event: time 1527086913.729707, type 3 (EV_ABS), code 0 (ABS_X), value 296
Event: time 1527086913.729707, type 3 (EV_ABS), code 1 (ABS_Y), value 2731
Event: time 1527086913.729707, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 1
Event: time 1527086913.729707, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1527086913.729707, -------------- SYN_REPORT ------------
Event: time 1527086913.769054, type 3 (EV_ABS), code 0 (ABS_X), value 298
Event: time 1527086913.769054, type 3 (EV_ABS), code 1 (ABS_Y), value 2735
Event: time 1527086913.769054, -------------- SYN_REPORT ------------
Event: time 1527086913.808942, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1527086913.808942, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1527086913.808942, -------------- SYN_REPORT ------------
Event: time 1527086914.069851, type 3 (EV_ABS), code 0 (ABS_X), value 290
Event: time 1527086914.069851, type 3 (EV_ABS), code 1 (ABS_Y), value 2737
Event: time 1527086914.069851, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1527086914.069851, -------------- SYN_REPORT ------------
Event: time 1527086914.110000, type 3 (EV_ABS), code 0 (ABS_X), value 857
Event: time 1527086914.110000, type 3 (EV_ABS), code 1 (ABS_Y), value 2855
Event: time 1527086914.110000, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 8
Event: time 1527086914.110000, -------------- SYN_REPORT ------------
Event: time 1527086914.150062, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1527086914.150062, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1527086914.150062, -------------- SYN_REPORT ------------

As you can see we are pressing aprox point 290,2730 but the last one you can see 857, 2850 even if i was touching the same point

As we said we will also try to use another cable to check if it’s part of the problem