Crank container can't initialize capacitive touch display

Running the Crank Partner Demo Container with a monitor attached to the DVI connector works just fine. I can see the heart monitor and interact with it. However, when I try to get the same container to use the 7" Capacitive Touch Display from Toradex, it just generates an error.

I have the appropriate device tree overlays activated:

apalis-imx6-10657251:~$ docker run -it --rm --privileged -v /dev:/dev -v /boot:/boot torizon/arm32v7-debian-dev-tools
root@980c0a8feee5:/# dtconf status
Device is apalis imx6(0035)
Mounting /mnt/part
Currently active overlays:
display-lt161010-overlay.dts.dtbo
apalis-imx6-atmel-mxt-overlay.dts.dtbo
Available base device trees:
        imx6q-apalis-ixora-v1.1.dtb
        imx6q-apalis-eval.dtb
Available overlays for running kernel:
        apalis-imx6-atmel-mxt-overlay.dts:
                Atmel MXT touchscreen for the 7inch and 10inch display orderable at Toradex.
        apalis-imx6-lvds-overlay.dts:
                Enable the LVDS interface on the Apalis iMX6Q. Make sure to also select a valid display configuration.
        apalis-imx6-parallel-rgb-overlay.dts:
                Enable the parallel RGB interface on the Apalis iMX6Q. Make sure to also select a valid display configuration.
        display-edt5.7-overlay.dts:
                EDT5.7 display with a resolution of 640x480 pixel
        display-edt7-overlay.dts:
                EDT7 display with a resolution of 800x480 pixel
        display-lt161010-overlay.dts:
                LT161010 display (7inch) with a resolution of 800x480 pixel. This display can be ordered at Toradex.
        display-lt170410-overlay.dts:
                LT170410 display (10inch) with a resolution of 1280x800 pixel. This display can be ordered at Toradex.

I then followed the advice in another thread to shut down all containers, start the weston container, then start the Crank container:

apalis-imx6-10657251:~$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
apalis-imx6-10657251:~$ docker start torizon_weston_1
torizon_weston_1
apalis-imx6-10657251:~$ docker ps
CONTAINER ID        IMAGE                           COMMAND               CREATED             STATUS              PORTS               NAMES
4d446bd4df5c        torizon/arm32v7-debian-weston   "/usr/bin/entry.sh"   25 hours ago        Up 3 seconds                            torizon_weston_1
apalis-imx6-10657251:~$ docker run -it --privileged -v /home/torizon/crank/scp:/usr/crank/scp -v /dev:/dev -v /tmp:/tmp cranksoftware/torizon_imx6:6_1

Starting Crank Demo Application...
VitalsHD/1280x720.gapp
ERROR  [0.334]:Can't initialize the display
apalis-imx6-10657251:~$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
apalis-imx6-10657251:~$

But it cannot initialize the display. I suspect that it has to do with the screen having a resolution of 800x480 and the Crank application trying to run at 1280x720. But I don’t know how to change this in the Demo application. And would this cause the weston container to stop running?

What step am I missing? How can I go about debugging this?

Greetings @embedded.kyle,

Upon quick inspection I believe you’re missing an overlay. The 7’’ capacitive display used the parallel RGB display interface. By default this interface is disabled, so you need this overlay in order to enable it: https://github.com/toradex/device-tree-overlays/blob/toradex_5.4.y/overlays/apalis-imx6-parallel-rgb-overlay.dts

Please apply this overlay and let me know how it works out after that.

Best Regards,
Jeremias

I was missing that overlay. I’ve applied that overlay and the error from the Crank container is gone. But there is still nothing on the display. It will occasionally blink the backlight now and there is an error from one of the driver on boot.

Here is output of the boot showing the overlays being applied and what I think are i2c error from the touchscreen driver:

Found U-Boot script /boot.scr
3008 bytes read in 14 ms (209 KiB/s)
## Executing script at 17000000
565 bytes read in 21 ms (25.4 KiB/s)
67033 bytes read in 30 ms (2.1 MiB/s)
128 bytes read in 10 ms (11.7 KiB/s)
Applying Overlay: apalis-imx6-parallel-rgb-overlay.dts.dtbo
218 bytes read in 10 ms (20.5 KiB/s)
Applying Overlay: display-lt161010-overlay.dts.dtbo
623 bytes read in 13 ms (45.9 KiB/s)
Applying Overlay: apalis-imx6-atmel-mxt-overlay.dts.dtbo
701 bytes read in 15 ms (44.9 KiB/s)
8024576 bytes read in 229 ms (33.4 MiB/s)
8494573 bytes read in 247 ms (32.8 MiB/s)
## Flattened Device Tree blob at 12100000
   Booting using the fdt blob at 0x12100000
   Using Device Tree in place at 12100000, end 12133fff

Starting kernel ...

Starting version 243.2+
[   14.012328] atmel_mxt_ts 0-004a: __mxt_read_reg: i2c transfer failed (-6)
[   14.035218] atmel_mxt_ts 0-004a: mxt_bootloader_read: i2c recv failed (-6)
[   14.170185] atmel_mxt_ts 0-004a: mxt_bootloader_read: i2c recv failed (-6)

TorizonCore 4.0.0-devel-202007+build.17 apalis-imx6-10657251 ttymxc0

And here is dtconf confirming:

root@9aab7ed099ef:/# dtconf status
Device is apalis imx6(0035)
Mounting /mnt/part
Currently active overlays:
apalis-imx6-parallel-rgb-overlay.dts.dtbo
display-lt161010-overlay.dts.dtbo
apalis-imx6-atmel-mxt-overlay.dts.dtbo

I reseated all the connectors. Below are some pics of how I have it set up. Let me know if anything jumps out at you hardware wise:

LCD + Apalis Evaluation

Alright after taking a look at the pictures you provided, it may be the case that the connections are possibly backward. For reference take a look at the connections here: https://developer.toradex.com/knowledge-base/first-steps-with-capacitive-touch-display-7-inch-parallel#Connections_on_Ixora_Aster

While these pictures don’t show the evaluation board I believe the direction is still the same. Mainly on the display side notice how the flex cables are connected on the side with printed words facing up. Try this orientation, and see if the display works then. After getting the display working we can try and tackle the capacitive touch part of the issue.

Best Regards,
Jeremias

Great! Just had the darn cables backward. I’ve got Portainer showing on the screen after a fresh install of Torizon (after activating the overlays, of course).

I have a mouse connected via USB and that works. But I still get the i2c errors on boot and the display does not respond to touch. How do I debug this?

Glad you were able to get the display working. As a quick check did you also reverse the cables for the touch/i2c?

Also it’s hard to tell from your pictures but could you share the connections you made via jumper wires, just to make sure all the connections are correct.

Best Regards,
Jeremias