1.5k views
in System Integration by

Hi 

We use following software components.

- Embedded Wizard Studio Pro v8.30
- Embedded Wizard Platform Package for Generic RGBA8888
- Embedded Wizard Build Environment for Generic RGBA8888
- Generic RGBA8888 NEON AddOn

Our target system specification.

- NXP i.mx6 quad and Yocto embedded linux.

---------------------------------------------------------------------------

until now, embedded wizard application working fine.

but, after linux kernel upgrade (3.10.53 -> 4.1.15), touch screen does not work. 

I checked similar questions on ask board.

Below are debug informations mentioned in the answer.

(1) ts_calibrate utility
    
    ts_calibrate utility working fine very well. 
    
(2) TargetSpecific/ew_bsp_touch.c, TouchEventThread function

    inserted debug code... as following :
    
    if ( type == 3 )
    {
        if ( code == 0 )
            TouchEventXPos = value;
        else if ( code == 1 )
            TouchEventYPos = value;

        EwPrint( "X: %d, Y: %d\n", TouchEventXPos, TouchEventYPos );
    }
    else if ( type == 1 && code == 330 )
    {
        if ( value && TouchState == 0 )
            TouchState = 1;
        else if ( !value && TouchState == 2 )
            TouchState = 3;          

        EwPrint( "X: %d, Y: %d\n", TouchEventXPos, TouchEventYPos );
    }
    
    result : 
    
    X: 0, Y: 0
    X: 0, Y: 0
    X: 0, Y: 0
    X: 0, Y: 0
    X: 0, Y: 0
    X: 0, Y: 0
    X: 0, Y: 0
    X: 0, Y: 0
    X: 0, Y: 0

(3) fbset

    mode "1280x800-64"
            # D: 74.250 MHz, H: 52.660 kHz, V: 64.376 Hz
            geometry 1280 800 1280 1600 32
            timings 13468 68 60 8 8 2 2
            accel false
            rgba 8/16,8/8,8/0,8/24
    endmode
    
(4) cat /proc/bus/input/devices

    I: Bus=0018 Vendor=0000 Product=0000 Version=0000
    N: Name="mango-ts"
    P: Phys=
    S: Sysfs=/devices/virtual/input/input0
    U: Uniq=
    H: Handlers=kbd event0 evbug
    B: PROP=0
    B: EV=b
    B: KEY=400 0 4 0 0 0 0 c0000 0 0 0
    B: ABS=2650000 1000000

    I: Bus=0019 Vendor=0001 Product=0001 Version=0100
    N: Name="gpio-keys"
    P: Phys=gpio-keys/input0
    S: Sysfs=/devices/soc0/gpio-keys/input/input1
    U: Uniq=
    H: Handlers=kbd event1 evbug
    B: PROP=0
    B: EV=3
    B: KEY=40000000 100000 0 0 0

(5) evtest /dev/input/event0

    Input driver version is 1.0.1
    Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
    Input device name: "mango-ts"
    Supported events:
      Event type 0 (EV_SYN)
      Event type 1 (EV_KEY)
        Event code 114 (KEY_VOLUMEDOWN)
        Event code 115 (KEY_VOLUMEUP)
        Event code 258 (BTN_2)
        Event code 330 (BTN_TOUCH)
      Event type 3 (EV_ABS)
        Event code 24 (ABS_PRESSURE)
          Value      0
          Min        0
          Max      255
        Event code 48 (ABS_MT_TOUCH_MAJOR)
          Value      0
          Min        0
          Max      255
        Event code 50 (ABS_MT_WIDTH_MAJOR)
          Value      0
          Min        0
          Max      200
        Event code 53 (ABS_MT_POSITION_X)
          Value      0
          Min        0
          Max     1280
        Event code 54 (ABS_MT_POSITION_Y)
          Value      0
          Min        0
          Max      800
        Event code 57 (ABS_MT_TRACKING_ID)
          Value      0
          Min        0
          Max       10
    Properties:
    Testing ... (interrupt to exit)
    Event: time 421.495718, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 639
    Event: time 421.495718, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 430
    Event: time 421.495718, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 1
    Event: time 421.495718, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
    Event: time 421.495718, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 200
    Event: time 421.495718, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 255
    Event: time 421.495718, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
    Event: time 421.495718, ++++++++++++++ SYN_MT_REPORT ++++++++++++
    Event: time 421.495718, -------------- SYN_REPORT ------------
    Event: time 421.506291, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 639
    Event: time 421.506291, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 430
    Event: time 421.506291, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 1
    Event: time 421.506291, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
    Event: time 421.506291, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 200
    Event: time 421.506291, ++++++++++++++ SYN_MT_REPORT ++++++++++++
    Event: time 421.506291, -------------- SYN_REPORT ------------
    Event: time 421.516365, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 639
    Event: time 421.516365, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 430
    Event: time 421.516365, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 1
    Event: time 421.516365, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
    Event: time 421.516365, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 200
    Event: time 421.516365, ++++++++++++++ SYN_MT_REPORT ++++++++++++
    Event: time 421.516365, -------------- SYN_REPORT ------------
    Event: time 421.526388, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 639
    Event: time 421.526388, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 430
    Event: time 421.526388, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 1
    Event: time 421.526388, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
    Event: time 421.526388, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 200
    Event: time 421.526388, ++++++++++++++ SYN_MT_REPORT ++++++++++++
    Event: time 421.526388, -------------- SYN_REPORT ------------
    Event: time 421.536371, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 639
    Event: time 421.536371, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 430
    Event: time 421.536371, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 1
    Event: time 421.536371, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
    Event: time 421.536371, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 200
    Event: time 421.536371, ++++++++++++++ SYN_MT_REPORT ++++++++++++
    Event: time 421.536371, -------------- SYN_REPORT ------------
    Event: time 421.546714, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 639
    Event: time 421.546714, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 430
    Event: time 421.546714, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 1
    Event: time 421.546714, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
    Event: time 421.546714, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 200
    Event: time 421.546714, ++++++++++++++ SYN_MT_REPORT ++++++++++++
    Event: time 421.546714, -------------- SYN_REPORT ------------
    Event: time 421.557220, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 0
    Event: time 421.557220, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
    Event: time 421.557220, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
    Event: time 421.557220, -------------- SYN_REPORT ------------
 

Which part should I review?

 

1 Answer

0 votes
by

Hi!

According to your logs it seems that the mapping of the key events has changed a little bit. Can you please try and change the key input thread from

if ( type == 3 )
{
  if ( code == 0 )
    TouchEventXPos = value;
  else if ( code == 1 )
    TouchEventYPos = value;

  EwPrint( "X: %d, Y: %d\n", TouchEventXPos, TouchEventYPos );
}

to

if ( type == 3 )
{
  if ( code == 53 )
    TouchEventXPos = value;
  else if ( code == 54 )
    TouchEventYPos = value;

  EwPrint( "X: %d, Y: %d\n", TouchEventXPos, TouchEventYPos );
}

Does that solve your problem?

Thanks and best regards,
Manuel

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...