Attention: the features and instructions contained in this article are not guaranteed to be maintained by Toradex. If they don't work, please contact our support.
The Atmel MaXTouch controllers have a configuration file saved in their internal NVRAM. On rare occasions, one may need those files for some purpose. One valid example when you want to do this is if your display is facing performance issues.
Attention: it is very likely that you don't need to get the configuration from the controller. Unless you have a reason to do so, avoid messing up with it, so you avoid permanently damaging the controller.
This article focuses on specifically how to retrieve and update the configuration from the Capacitive Touch Display 10.1" LVDS and Capacitive Touch Display 7" Parallel on Torizon. We use the mxt-app and you should read the README.md of the repo for further details.
This article complies to the Typographic Conventions for Torizon Documentation.
Build a container named
mxt-app using the Dockerfile below:
Tip: the Dockerfile provided in this article does not comply with the Torizon Best Practices Guide. It is acceptable for this use case since reading and writing to the display is something that you will only want to do manually. Avoid using
--privileged when building your application containers that will be deployed to your final product.
# Use the FROM according to your SoM architecture # linux/arm for 32-bit and linux/arm64 for 64-bit # FROM --platform=linux/arm64 ubuntu FROM --platform=linux/arm ubuntu RUN apt-get update && apt-get upgrade -y && apt-get install -y \ git \ wget \ build-essential \ autoconf \ libtool \ i2c-tools RUN git clone https://github.com/atmel-maxtouch/mxt-app.git && \ cd mxt-app && \ git checkout v1.32 && \ ./autogen.sh && \ make && \ cp mxt-app /usr/local/bin/ CMD ["/bin/bash"]
Tip: It's recommended to use the v1.32 version of the mxt-app, which was tested.
Deploy the container to the Computer on Module as explained on Deploying Container Images to TorizonCore. Once done, run with:
# cd /home/torizon # mkdir mxt # docker run --rm -it --privileged -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ -v /sys:/sys -v /home/torizon/mxt:/mxt <username>/mxt-app
You'll later either save the config file to the bind-mount /home/torizon/mxt, or load your existing configuration file from it.
In the interactive bash session inside the container, find the i2c controller and address:
## ls /sys/bus/i2c/drivers/atmel_mxt_ts/ 4-004a bind uevent unbind
In this case, it is
4-004a. If the path does not exist, make sure that you have properly followed the instructions from Setting up Displays with Torizon.
Tip: even if you don't need the existing configuration, it may be a good idea to create a backup before loading a new configuration.
In this section, you will learn how to dump the config to a file using the previously found address:
## cd /mxt ## mxt-app -d i2c-dev:4-004a --save mxt.xcfg Version:1.28-25-g927e026 Registered i2c-dev adapter:4 address:0x4a REPORTALL command issued Timeout Read config from device Saved config to mxt.xcfg in .xcfg format
## cd /mxt ## mxt-app -d i2c-dev:4-004a --save mxt.bin Version:1.28-25-g927e026 Registered i2c-dev adapter:4 address:0x4a REPORTALL command issued Timeout Read config from device Saved config to mxt.bin in OBP_RAW format
Exit the container and copy the file to your PC from /home/torizon/mxt/mxt.xcfg using, for instance,
# scp /home/torizon/mxt/mxt.xcfg <user>@<ip>:<path to save file on your PC>
In this section, you will learn how to load the config from a file.
We provide as examples the configuration files that must be used by customers affected by performance issues. The files provided are safe to use, you just have to make sure you load the file for the correct display model that you are using.
All you have to do is download the existing configuration inside the running container. If you want to keep the files around, save them to /mxt, since it is bind-mount to /home/torizon/mxt on the board outside the container.
Choose your display from the tabs below:
## cd /mxt ## wget -O mxt_10.xcfg https://docs.toradex.cn/109460-mxt_10.xcfg ## wget -O mxt_10.bin https://docs.toradex.cn/109459-mxt_10.bin
## mxt-app -d i2c-dev:4-004a --load /mxt/mxt_10.xcfg
## mxt-app -d i2c-dev:4-004a --load /mxt/mxt_10.bin
## cd /mxt ## wget -O mxt_7.xcfg https://docs.toradex.cn/109462-mxt_7.xcfg ## wget -O mxt_7.bin https://docs.toradex.cn/109461-mxt_7.bin
## mxt-app -d i2c-dev:4-004a --load /mxt/mxt_7.xcfg
## mxt-app -d i2c-dev:4-004a --load /mxt/mxt_7.bin