This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Can't calibrate a touchscreen with TSLIB when using the basic Rootfs

Other Parts Discussed in Thread: AM3517, TCA6416, TSC2004

Hello,

I'm trying to use the basic rootfs (base-rootfs-am3517-evm.tar.gz) (size 23MB) provided by TI in their SDK 5.03.02 for my am3517evm board, because the one used during the set-up of the board is way too big (>590 MB).

However, with this filesystem I don't know why, but when I execute ts_calibrate as soon as I touch the touchscreen all the samples have been taken and the cursor on the screen jumps 2 or 3 steps. For instance, the cursor starts at the top right corner, when I touch it, the cursor ends up in the middle of the screen. Therefore the calibration is wrong.

However, there is no issue when I use complete filesystem, the calibration run as expected. I sucessfully cross compile the new version of Tslib but that didn't fix the issue. So I'm guessing a file, a variable or a step must be missing that is not indicated in the "How to install Tslib" http://processors.wiki.ti.com/index.php/Tslib.

  • Hi Laurent,

    ts_calibrate creates a calibration file, "pointercal". It is possible this file is not accurate. This file could possibly be located in two different locations, please see this wiki for more info:

    http://processors.wiki.ti.com/index.php/How_to_Recalibrate_the_Touchscreen

  • Hi Jeff,

    Thanks for the reply, however I'm not sure this issue has anything to do with the pointercal file. I deleted the pointercal file and ts_calibrate is able to recreate the file, I think ts_calibrate doesn't use pointercal file during calibration. In my case the file is located in /etc/ because I do not use a SDcard.

    Here are my variables.

    export TSLIB_TSDEVICE=/dev/input/touchscreen0

    export TSLIB_CALIBFILE=/etc/pointercal

    export TSLIB_CONFFILE=/etc/ts.conf

    export TSLIB_PLUGINDIR=/usr/lib/ts

  • Hi Laurent,

    I followed the wiki page you mentioned. I was able to cross compile and install following this wiki article with some difficulties. My issue were just getting to the point where you can run ts_calibrate.  I had to edit /etc/ts.conf to enable -> module_raw input

    Also I got an error when running ts_calibrate: selected device is not a touchscreen I understand

    I had to edit the file input-raw.c in the plugin directory to get by that issue.

    Also below was my enviroment variables.

    TSLIB_TSDEVICE=/dev/input/touchscreen0

    TSLIB_FBDEVICE=/dev/fb0

    TSLIB_PLUGINDIR=/lib/ts

    TSLIB_CONFFILE=/etc/ts.conf

    QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0

    We build our SDK with Arago, which installs the libs at /usr/lib/ts, for this test I installed at /lib/ts.  

    Finally I talked with some people who have more experience with touchscreen, they indicated the ts.conf parameters can cause issues: below is what I was using:

    # Uncomment if you wish to use the linux input layer event interface
    module_raw input

    # Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
    # module_raw collie

    # Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
    # module_raw corgi

    # Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
    # module_raw ucb1x00

    # Uncomment if you're using an HP iPaq h3600 or similar
    # module_raw h3600

    # Uncomment if you're using a Hitachi Webpad
    # module_raw mk712

    # Uncomment if you're using an IBM Arctic II
    # module_raw arctic2

    module pthres pmin=1
    module variance delta=30
    module dejitter delta=100
    module linear
  • Hi Jeff,

    I did exactly the same, however I didn't have any issue with input-raw.c

    Are you implying that you were able to make it work?

    Are you using the base rootfs from the SDK?

    If it's the case I really don't know what to do. I copied the boot of my board if that can help. If you are interested I can also upload a video showing what happen.

    Thanks again.

    U-Boot SPL 2011.09 (Dec 15 2011 - 18:14:11)
    Texas Instruments Revision detection unimplemented


    U-Boot 2011.09 (Dec 15 2011 - 18:09:51)

    AM35XX-GP ES2.0, CPU-OPP2, L3-165MHz, Max CPU Clock 600 Mhz
    AM3517EVM Board + LPDDR/NAND
    I2C:   ready
    DRAM:  256 MiB
    WARNING: Caches not enabled
    NAND:  HW ECC [Kernel/FS layout] selected
    512 MiB
    MMC:   OMAP SD/MMC: 0
    In:    serial
    Out:   serial
    Err:   serial
    Die ID #378c00010000000001608a900b00d006
    Net:   Ethernet PHY: GENERIC @ 0x00
    DaVinci-EMAC
    Hit any key to stop autoboot:  0
    BOOTP broadcast 1
    DHCP client bound to address 10.0.5.72
    Using DaVinci-EMAC device
    TFTP from server 10.0.42.1; our IP address is 10.0.5.72
    Filename 'uImage-am3517-evm.bin'.
    Load address: 0x82000000
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             ##############################################
    done
    Bytes transferred = 2893540 (2c26e4 hex)
    ## Booting kernel from Legacy Image at 82000000 ...
       Image Name:   Linux-2.6.37
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    2893476 Bytes = 2.8 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    Linux version 2.6.37 (laurent@laurent-desktop) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #2 Wed Jan 18 03:44:02 EST 2012
    CPU: ARMv7 Processor [411fc087] revision 7 (ARMv7), cr=10c53c7f
    CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
    Machine: OMAP3517/AM3517 EVM
    Reserving 4194304 bytes SDRAM for VRAM
    Memory policy: ECC disabled, Data cache writeback
    AM3517 ES1.1 (l2cache iva sgx neon isp )
    SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x10000
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64000
    Kernel command line: console=ttyO2,115200n8 rw noinitrd root=/dev/nfs nfsroot=10.0.42.1:/home/laurent/AM3517/Rootfs/targetNFS,nolock,rsize=1024,wsize=1024 i
    p=dhcp
    PID hash table entries: 1024 (order: 0, 4096 bytes)
    Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    Memory: 252MB = 252MB total
    Memory: 242796k/242796k available, 19348k reserved, 0K highmem
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
        DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
        vmalloc : 0xd0800000 - 0xf8000000   ( 632 MB)
        lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
        modules : 0xbf000000 - 0xc0000000   (  16 MB)
          .init : 0xc0008000 - 0xc0039000   ( 196 kB)
          .text : 0xc0039000 - 0xc05596b0   (5250 kB)
          .data : 0xc055a000 - 0xc070c0a0   (1737 kB)
    NR_IRQS:375
    Clocking rate (Crystal/Core/MPU): 26.0/332/600 MHz
    omap_hwmod: i2c1: softreset failed (waited 10000 usec)
    omap_hwmod: i2c2: softreset failed (waited 10000 usec)
    omap_hwmod: i2c3: softreset failed (waited 10000 usec)
    Reprogramming SDRC clock to 332000000 Hz
    dpll3_m2_clk rate change failed: -22
    IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
    Total of 96 interrupts on 1 active controller
    GPMC revision 5.0
    Trying to install interrupt handler for IRQ368
    Trying to install interrupt handler for IRQ369
    Trying to install interrupt handler for IRQ370
    Trying to install interrupt handler for IRQ371
    Trying to install interrupt handler for IRQ372
    Trying to install interrupt handler for IRQ373
    Trying to install interrupt handler for IRQ374
    Trying to install type control for IRQ375
    Trying to set irq flags for IRQ375
    OMAP clockevent source: GPTIMER1 at 32768 Hz
    Console: colour dummy device 80x30
    Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
    ... MAX_LOCKDEP_SUBCLASSES:  8
    ... MAX_LOCK_DEPTH:          48
    ... MAX_LOCKDEP_KEYS:        8191
    ... CLASSHASH_SIZE:          4096
    ... MAX_LOCKDEP_ENTRIES:     16384
    ... MAX_LOCKDEP_CHAINS:      32768
    ... CHAINHASH_SIZE:          16384
     memory used by lock dependency info: 3951 kB
     per task-struct memory footprint: 2304 bytes
    Calibrating delay loop... 597.64 BogoMIPS (lpj=2334720)
    pid_max: default: 32768 minimum: 301
    Security Framework initialized
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    regulator: core version 0.5
    regulator: dummy:
    NET: Registered protocol family 16
    ------------[ cut here ]------------
    WARNING: at arch/arm/mach-omap2/pm.c:94 _init_omap_device+0x7c/0x9c()
    _init_omap_device: could not find omap_hwmod for iva
    Modules linked in:
    [<c00489b0>] (unwind_backtrace+0x0/0xe0) from [<c006e8ac>] (warn_slowpath_common+0x4c/0x64)
    [<c006e8ac>] (warn_slowpath_common+0x4c/0x64) from [<c006e944>] (warn_slowpath_fmt+0x2c/0x3c)
    [<c006e944>] (warn_slowpath_fmt+0x2c/0x3c) from [<c004ffa0>] (_init_omap_device+0x7c/0x9c)
    [<c004ffa0>] (_init_omap_device+0x7c/0x9c) from [<c000ff0c>] (omap2_common_pm_init+0x30/0x104)
    [<c000ff0c>] (omap2_common_pm_init+0x30/0x104) from [<c0039470>] (do_one_initcall+0xb0/0x188)
    [<c0039470>] (do_one_initcall+0xb0/0x188) from [<c0008c30>] (kernel_init+0x98/0x14c)
    [<c0008c30>] (kernel_init+0x98/0x14c) from [<c0043ad4>] (kernel_thread_exit+0x0/0x8)
    ---[ end trace 1b75b31a2719ed1c ]---
    OMAP GPIO hardware version 2.5
    OMAP GPIO hardware version 2.5
    OMAP GPIO hardware version 2.5
    OMAP GPIO hardware version 2.5
    OMAP GPIO hardware version 2.5
    OMAP GPIO hardware version 2.5
    omap_mux_init: Add partition: #1: core, flags: 0
    Display initialized successfully
    _omap_mux_init_gpio: Multiple gpio paths (2) for gpio126
    Found NOR on CS1
    Registering NOR on CS1
    hw-breakpoint: debug architecture 0x4 unsupported.
    OMAP DMA hardware revision 4.0
    bio: create slab <bio-0> at 0
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    omap_device: omap_i2c.1: new worst case activate latency 0: 30517
    omap_i2c omap_i2c.1: bus 1 rev3.12 at 400 kHz
    omap_device: omap_i2c.1: new worst case deactivate latency 0: 30517
    omap_i2c omap_i2c.2: bus 2 rev3.12 at 400 kHz
    pca953x 2-0021: interrupt support not compiled in
    omap_i2c omap_i2c.3: bus 3 rev3.12 at 400 kHz
    tca6416-keypad 3-0020: tca6416_read_reg failed, reg: 1, error: -121
    tca6416-keypad: probe of 3-0020 failed with error -121
    pca953x 3-0021: failed reading register
    pca953x: probe of 3-0021 failed with error -121
    Switching to clocksource 32k_counter
    musb-hdrc: version 6.0, otg (peripheral+host), debug=0
    musb-hdrc musb-hdrc.0: dma type: dma-cppi41
    <6>Waiting for PHY clock good...
    musb-hdrc musb-hdrc.0: USB OTG mode controller at d0810000 using DMA, IRQ 71
    NET: Registered protocol family 2
    IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
    TCP established hash table entries: 8192 (order: 4, 65536 bytes)
    TCP bind hash table entries: 8192 (order: 6, 360448 bytes)
    TCP: Hash tables configured (established 8192 bind 8192)
    TCP reno registered
    UDP hash table entries: 128 (order: 1, 12288 bytes)
    UDP-Lite hash table entries: 128 (order: 1, 12288 bytes)
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    NetWinder Floating Point Emulator V0.97 (double precision)
    omap_init_opp_table: no hwmod or odev for iva, [9] cannot add OPPs.
    AM3517  Linux PSP version 04.02.00.07 (AM3517EVM)
    VFS: Disk quotas dquot_6.5.2
    Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    JFFS2 version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.
    msgmni has been set to 474
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    OMAP DSS rev 2.0
    omapdss supply vdds_dsi not found, using dummy regulator
    OMAP DISPC rev 3.0
    omapdss supply vdda_dac not found, using dummy regulator
    OMAP VENC rev 2
    OMAP DSI rev 1.0
    Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
    omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
    omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
    console [ttyO2] enabled
    brd: module loaded
    loop: module loaded
    mtdoops: mtd device (mtddev=name/number) must be supplied
    physmap platform flash device: 08000000 at 08000000
    physmap-flash physmap-flash.0: map_probe failed
    omap2-nand driver initializing
    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xbc (Micron )
    Creating 5 MTD partitions on "omap2-nand.0":
    0x000000000000-0x000000080000 : "xloader-nand"
    0x000000080000-0x000000240000 : "uboot-nand"
    0x000000240000-0x000000280000 : "params-nand"
    0x000000280000-0x000000780000 : "linux-nand"
    0x000000780000-0x000020000000 : "jffs2-nand"
    davinci_mdio davinci_mdio: davinci mdio revision 1.5
    davinci_mdio davinci_mdio: detected phy mask fffffffe
    davinci_mdio: probed
    davinci_mdio davinci_mdio: phy[0]: device ffffffff:00, driver SMSC LAN8710/LAN8720
    vcan: Virtual CAN interface driver
    CAN device driver interface
    TI High End CAN Controller Driver 0.7
    ti_hecc ti_hecc: device registered (reg_base=d0890000, irq=24)
    usbcore: registered new interface driver cdc_ether
    usbcore: registered new interface driver dm9601
    ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    ehci-omap.0 supply hsusb0 not found, using dummy regulator
    ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
    ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
    ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
    ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
    usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb1: Product: OMAP-EHCI Host Controller
    usb usb1: Manufacturer: Linux 2.6.37 ehci_hcd
    usb usb1: SerialNumber: ehci-omap.0
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 3 ports detected
    Initializing USB Mass Storage driver...
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    usbcore: registered new interface driver usbtest
    g_ether gadget: using random self ethernet address
    g_ether gadget: using random host ethernet address
    usb0: MAC 6a:e4:b5:0c:02:95
    usb0: HOST MAC ae:4c:a6:72:a0:ec
    g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
    g_ether gadget: g_ether ready
    musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 2
    usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb2: Product: MUSB HDRC host driver
    usb usb2: Manufacturer: Linux 2.6.37 musb-hcd
    usb usb2: SerialNumber: musb-hdrc.0
    hub 2-0:1.0: USB hub found
    hub 2-0:1.0: 1 port detected
    mice: PS/2 mouse device common for all mice
    input: TSC2004 Touchscreen as /devices/virtual/input/input0
    rtc-s35390a 1-0030: rtc core: registered rtc-s35390a as rtc0
    i2c /dev entries driver
    Linux video capture interface: v2.00
    usbcore: registered new interface driver uvcvideo
    USB Video Class driver (v1.0.0)
    omap_device: omap_wdt.-1: new worst case activate latency 0: 30517
    OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    oprofile: hardware counters not available
    oprofile: using timer interrupt.
    TCP cubic registered
    Initializing XFRM netlink socket
    NET: Registered protocol family 17
    NET: Registered protocol family 15
    can: controller area network core (rev 20090105 abi 8)
    NET: Registered protocol family 29
    can: raw protocol (rev 20090105)
    can: broadcast manager protocol (rev 20090105 t)
    Registering the dns_resolver key type
    VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 1
    ThumbEE CPU extension supported.
    Power Management for TI OMAP3.
    clock: disabling unused clocks to save power
    omap_device: omap_i2c.1: new worst case activate latency 0: 91552
    rtc-s35390a 1-0030: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
    omap_vout omap_vout: Buffer Size = 3686400
    omap_vout omap_vout: : registered and initialized video device 0
    omap_vout omap_vout: Buffer Size = 3686400
    omap_vout omap_vout: : registered and initialized video device 1
    davinci_mdio davinci_mdio: resetting idled controller
    net eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=ffffffff:00, id=7c0f1)
    Sending DHCP requests .
    PHY: ffffffff:00 - Link is Up - 100/Full
    .
    DHCP/BOOTP: Reply not for us, op[2] xid[bd8ffbda]
    DHCP/BOOTP: Reply not for us, op[2] xid[bd8ffbda]
    , OK
    IP-Config: Got DHCP answer from 0.0.0.0, my address is 10.0.5.72
    IP-Config: Complete:
         device=eth0, addr=10.0.5.72, mask=255.255.0.0, gw=10.0.0.1,
         host=10.0.5.72, domain=barfield.com, nis-domain=(none),
         bootserver=0.0.0.0, rootserver=10.0.42.1, rootpath=
    VFS: Mounted root (nfs filesystem) on device 0:14.
    Freeing init memory: 196K
    udevd (595): /proc/595/oom_adj is deprecated, please use /proc/595/oom_score_adj instead.

     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            

    Arago Project http://arago-project.org am3517-evm ttyO2

    Arago 2011.09 am3517-evm ttyO2

    am3517-evm login: root

  • Hi Laurent,

    I've duplicated your issue with the base file system for SDK 05.03.02 on Am3517.  I was previously testing on another platform which does not show this issue.

    No resolution yet. I will post back when the fix is identified. As you noted, the same driver works in the full file system, but shows this issue in the base file system.

  • Hello Jeff,

    Did you have any update on that issue, were you able to get a fix ?

    Please let me know.

    Thanks

  • Laurent,

    Sorry no resolution yet. I did log the issue. Since it has not yet been fixed, I will look for a work around if possible and post back.

  • I have similar experience on AM3517 EVM (can't calibrate because touch points are too jumpy).   But once I installed OMAP35x_Graphics_SDK package which also includes bufferclass_ti.ko, drm.ko, and pvrsrvkm.ko, touchscreen is behaving normally again.  Using ts_print_raw, I was able to see only one event for touch down and one event for touch up instead of multiple up and down events for one touch.

  • Has there been a resolution for this?  Is there a work around?  I have the exact same issue with OMAP35x, TI TSC2004, tslib, and calibration.

    The root cause appears to be that a sample is taken while the PENIRQ line is high indicating a pen up event or pressure = 0.  Every time a sample is taken, it is immediately followed by a pen up event.  The calibration quickly jumps through the test points.  Apparently there is some confusion between whether the PENIRQ is used as a pen state event or as a data available event.

    Please update if a soultion or work around exists.