Unified Multi-Touch Driver

I am trying to use Toradex Unified Multi-Touch Driver, this drivers is working well for some screen resolution (1024x768 for example) but not for screen resoluation I have to use i.e. 1024x600.

If I set screen resolution with 1024x768 resolution, driver is correctly loaded, I have the correct message on debug serial console but nothing if I set screen resolution to 1024x600. And on this case handle returned by CreateFile is 0xffffffff.

Dear @Blachere,

The multi-touch solution doesn’t depend on the display resolution, calibration data is mapped according to the touch screen resolution, not the display resolution. If calibration data is correct and the touch controller reporting correct data then touch should work. GWES is mapping touch coordinates with the display coordinates then acting on that.

I guess you must use two different resolution displays?
Could you dump serial debug messages for the 1024x600 resolution display and share the log with us?
Could you confirm the Touch controller is detecting by using the I2ctool?
Also, share changes for the 1024x600 display, let us try to verify that.
Did you confirm the Reset and Interrupt pins are functioning properly.

Dear Raja,

Bellow serial debug message with screen resolution set to 1024x600 (I used Toradex DisplayTool for that)

    Toradex Bootloader 1.5 for iMX6 Built Jun 24 2019
    Splash screen is enabled.
    Colibri iMX6DL 512MB 1.1A Serial: 10626434
    SPL enabled version.
    Using 16MB of IPU memory and 32MB of GPU memory.
    CPU is running at 984MHz.
    Using eMMC boot partition (size: 4096 sectors).
    Initializing L2 Cache.
    
    Press [SPACE] to enter Bootloader Menu
    
    System ready!
    Preparing for download...
    Loading compressed image...
    Reading image from sector 40962.
    Extracting 39962452 bytes from compressed image of 25278872 bytes
    .......................
    
    Done.
    Launching image at 10200000.
    
    Toradex Windows CE 8.0 1.5
     for iMX6 Built on Jun 24 2019
    Colibri iMX6 DualLite 512MB
    Wait mode Disabled
    SMP support enabled
    CPU0 started
    CPU1 started
    RTC origin set to: 2006/01/01.
    Registry - loading version 24 from 16386.
    Registry loaded.
    Loading GPIO Multiplexer...
    Failed(0) Loading GPIO Multiplexer (1 ms)
    Loading Clock...
    GPU enabled.
    DVFS not enabled.
    Done Loading Clock (13 ms)
    Loading SD Bus...
    Done Loading SD Bus (0 ms)
    Loading I2C1...
    Loading I2C2...
    Done Loading I2C1 (8 ms)
    Done Loading I2C2 (16 ms)
    Loading eMMC...
    Loading UARTB...
    Loading UARTC...
    Loading SPI1...
    Loading SPI2...
    Loading Image Processing Unit...
    Loading 2D/3D Graphic Accelerator...
    Multiplexing must be specified for non standard SPI port.
    Done Loading UARTB (20 ms)
    Done Loading SPI1 (14 ms)
    Failed(0) Loading SPI2 (13 ms)
    Done Loading UARTC (23 ms)
    Done Loading Image Processing Unit (12 ms)
    Loading SD card...
    Done Loading eMMC (45 ms)
    Loading external SD interface...
    Loading USB OTG...
    Loading UARTA...
    Port is used for OS debug!
    Failed(0) Loading UARTA (3 ms)
    Failed(0) Loading external SD interface (14 ms)
    Loading USB Host Controller...
    Loading PMIC...
    Loading Audio...
    Done Loading USB OTG (64 ms)
    Done Loading PMIC (30 ms)
    Done Loading 2D/3D Graphic Accelerator (110 ms)
    Waiting for flash disk \Flashdisk for 30 seconds
    Loading Ethernet...
    Loading Display...
    Loading iMX6 PCIE driver...
    Failed(0) Loading iMX6 PCIE driver (3 ms)
    Done Loading USB Host Controller (73 ms)
    GPU2D enabled.
    Done Loading Display.
    Turning display ON.
    Done Loading SD card (336 ms)
    Ethernet: Disconnected
    Done Loading Ethernet (337 ms)
    Loading HDCP v6...
    Done Loading HDCP v6 (0 ms)
    Loading DHCP v4...
    Done Loading DHCP v4 (0 ms)
    Done Loading Audio (670 ms)
    Folder mounted
    Loading USB OTG Host...
    Done Loading USB OTG Host (32 ms)
    Ethernet: Connected at:  100Mbps full duplex
    SoftRTC disabled
    RTC Time restored (19.03.2020 10:28:10)
    RTCSync: Completed.
    Ilitk Touch Panel - IT done : 33 194 no Unified Touch Driver...aborted
    Display: 1024x600@60Hz PCLK: 52000000
    Loading PP...
    Done Loading PP (2 ms)
    Loading NETUI...
    Done NETUI
    Got a valid IP Address: 192.168.0.6
    Debugger IP Address: 192.168.0.6
    RTC Time set (19.03.2020 10:28:11)
    RTCSync: Completed.

As we can see unified touch driver isn’t loaded.
I didn’t used I2ctool but I wrote an application to get touch from panel trough I2C and I get the rigth data.

For information my touch screen isn’t fully working, I don’t have display (HW not available yet) so I use CERHOST for display.
Reset pin of touch panel chip (ILITEK) isn’t connected to colobri because not available on my HW.
But if I set screen resolution to 1024x768, I am able to use touch panel and Unified drivers (except for top screen lines, I guess upper to 600px).

Thank you for your help,

Dear Raja,

I progressed a bit from my previous comment.

I am now able to set the right screen resolution with Unified MultiTouch drivers loaded well.
To do that, I experimented the following:
Every time I update something into the registry [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Touch] it is necessary to delete key Filter and reboot.
I don’t understand why I have to that, but I seems to be necessary.

My issue now is related coordinates I have to pass to DeviceIOControl.

My screen resolution is 1024x600 and my touch panel resolution is 16384x9600.

Do I have to convert touch panel coordinates into screen coordinate or there a registry key to set that?

Dear @Blachere,

You need to manually calculate touch calibration points as shown in below picture

and set the values in the registry : [HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\TOUCH]
“CalibrationData”=“511,410 254,192 254,624 764,624 768,196”

or

Run touch calibration application, follow the calibration pattern. After the calibration, take out
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\TOUCH from the registry for your reference and save the registry to preserve the calibration.

Still, if touch is not working then you can enable debug messages from the touch solution by setting the below registry here: https://developer.toradex.com/knowledge-base/capacitive-multi-touch-solution#Debug_Messages_Control and try to debug the problem.

Please do let us know touch screen orientation with display and let me try to share CalibrationData to you.

Dear Raja,

I succeded to fix all issues I had.
I calibrated manually touch panel with following coordinates rules:

  1. center of touch panel
  2. top left, coordinates are 20% from the border
  3. bottom left, coordinates are 20% from the border
  4. bottom right, coordinates are 20% from the border
  5. top right, coordinates are 20% from the border

So for a touch panel 1024x600, “512,300,205,480,205,120,819,120,819,480”.
With that my touch panel is working very well.

Only strange point is related to key registry [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Touch] Filter, if I change something into Touch registries, I have to remove this key, save and reboot.
Otherwise drivers isn’t loaded on boot, do you understand why?

Thank you for you help

Dear @Blachere,

Thank you for your reply. Sorry, I can’t able to really test this.

I checked the cab installer, the Cab installer not creating the filter key under the [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Touch]. Is that key present default or Filter key is creating automatically whenever you do changes for the touch registry?

The LoadFilter is used for debug information about the driver loading. You can delete that by removing this key :

[HKEY_LOCAL_MACHINE\Drivers\Filters\{28D1E69E-59EB-416a-96C4-D30FA2EAD0BD}\LoadFilter]
    "DLL"="LoadFilter.dll"

Let us know, is this helps you?

Maybe, you need to do changes related to this documentation here : https://developer.toradex.com/knowledge-base/busenum2 to avoid driver loading issue

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Touch\DependsOn]
	"I2C2"="Drivers\Builtin\I2C1"
	"FlashDisk"="Drivers\\Builtin\\Wait4FlashDisk"

Dear Raja,
Thank for your answer, as I said before my touchpanel is working but sometimes, on boot, drivers isn’t loaded.
Temporary solution I identified to fix the problem is to remove the “Filter” key into [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Touch].
To fix this issue I tried your first suggestion, I let you informed if issue appears again.
Thanks

Dear Raja,
Unfurtunatly, I still have the issue, suggestion that consist to remove [HKEY_LOCAL_MACHINE\Drivers\Filters{28D1E69E-59EB-416a-96C4-D30FA2EAD0BD}\LoadFilter] key and to add DependOn keys arn’t working.

Please find bellow debug console content when drivers isn’t loaded.

Toradex Bootloader 1.5 for iMX6 Built Jun 24 2019
Splash screen is enabled.
Colibri iMX6DL 512MB 1.1A Serial: 10626435
SPL enabled version.
Using 16MB of IPU memory and 32MB of GPU memory.
CPU is running at 984MHz.
Using eMMC boot partition (size: 4096 sectors).
Initializing L2 Cache.
Configuring pin 59
Configuring pin 81

Press [SPACE] to enter Bootloader Menu

System ready!
Preparing for download...
Loading compressed image...
Reading image from sector 40962.
Extracting 39962452 bytes from compressed image of 25278872 bytes
.......................

Done.
Launching image at 10200000.

Toradex Windows CE 8.0 1.5
 for iMX6 Built on Jun 24 2019
Colibri iMX6 DualLite 512MB
Wait mode Disabled
SMP support enabled
CPU0 started
CPU1 started
RTC origin set to: 2006/01/01.
Registry - loading version 45 from 2.
Registry loaded.
GPU enabled.
DVFS not enabled.
Port is used for OS debug!
Multiplexing must be specified for non standard SPI port.
Waiting for flash disk \Flashdisk for 30 seconds
Loading Display...
GPU2D enabled.
Done Loading Display.
Turning display ON.
Ethernet: Disconnected
Folder mounted
Ethernet: Connected at:  100Mbps full duplex
SoftRTC disabled
Reading RTC failed.
No external RTC found
RTCSync: Completed.
Display: 1024x600@60Hz PCLK: 52000000
Loading NETUI...
Done NETUI
Got a valid IP Address: 192.168.0.85
Debugger IP Address: 192.168.0.85
Ilitk Touch Panel - IT done : 33 194 no Unified Touch Driver...aborted

Do you have any other suggestion to understand why Unified Touch Drivers isn’t loaded sometime .

Reminder, the only solution I fount to have the drivers working again is to remove [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Touch] Filter key.

Thanks for your help,