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.

Touchscreen issue in Andorid 2.3.4 on beagleboard xm

Other Parts Discussed in Thread: ADS7846, TSC2046

Hello everyone,

 

When we tested a game like fruitninja, we could play the game perfect with a mouse as the input device, but when we contolled the game with a touchscree, the game image moved very slowly when the touchscreen was be pressured, and the game could get very little input event from the touchscreen.

Could anyone tell me how I can solve that?

 

Thanks,

Yanbin Yue

  • TI Android DevKit does not provide  any built-in support for touchscreen on beagleboard.

    From your description it seems like there could be some issue with your touchscreen driver. Kindly check if you are getting touch interrupts/events.

    You can use the 'getevent' utility. Start getevent on the serial console as follows:

    # getevent

    It should list the available input devices. e.g. on omap3evm I get the following output:

    add device 1: /dev/input/event1
      name:     "ADS7846 Touchscreen"

    could not get driver version for /dev/input/mouse0, Not a typewriter
    add device 2: /dev/input/event0
      name:     "TWL4030 Keypad"

    Note your touch device name. Now when you touch the LCD screen and move around, the console should show some activity against your touch device. This will be some binary data.

    e.g.
    /dev/input/event1: 0001 014a 00000001
    /dev/input/event1: 0003 0000 00000b5f
    /dev/input/event1: 0003 0001 00000592
    /dev/input/event1: 0003 0018 00000016 etc

    Please check if these events are coming regularly when you are touching the screen.

  • Hi Vishveshwar

    We use the tsc2046 as the touchscreen controller, and use the ads7846 as the driver.

    We could get less event infomation  running a game in getevent, and if don't play games, we could get regular event.

    I think the driver may have some issue, but don't sure what the issue is.

     

    Thanks,

    Yanbin Yue

  • Hi Vishveshwar,
    I am using beagleboard xM rev B, I build kernel (2.6.37) with ads7846 driver, did some modifications in board-omap3beagle.c.

    I tried

    # getevent

    add device 1: /dev/input/event1
    name: "ADS7846 Touchscreen"

    could not get driver version for /dev/input/mouse0, Not a typewriter

    add device 2: /dev/input/event3
    name: "Logitech USB Optical Mouse"

    could not get driver version for /dev/input/mouse1, Not a typewriter

    add device 3: /dev/input/event0
    name: "gpio-keys"

    add device 4: /dev/input/event2
    name: "twl4030_pwrbutton"

    but events are not detecting.
    Any suggestions would be appreciated,

    Thanks,
    Faisal Hassan

  • Hi Faisal,

    Are you getting any touchscreen interrupts?

    Please see output of "cat /proc/interrupts" command to check the touch screen interrupts.

    Regards,
    Pankaj Bharadiya

  • HI Pankaj Bharadiya,

    Thanks for the response, Now its working, I configured touch sensor to SPI3.0...

    Regards,

    Faisal Hassan

  • Hi Faisal Hassan,

    I have the same problem with you and suck at this thing.

    It's very kind if  you show me how to configure touch sensor .

    Thank you.

  • Hi  Nguyen Huu Ha,

    How did you connected the touch sensor with beagleboard (pin details).

    Regards,

    Faisal Hassan

  • Thank you for your reply !

    I connect it through expansion header,  I think I use spi3.0 . Not sure with this question but I will provide what I did.

    Here's my spi_board_info:

       struct spi_board_info omap3evm_spi_board_info[] = {
    [0] = {
    .modalias = "ads7846",
    .bus_num = 3,
    .chip_select = 0,
    .max_speed_hz = 1500000,
    .controller_data = &ads7846_mcspi_config,
    .irq = OMAP_GPIO_IRQ(OMAP3_EVM_TS_GPIO),
    .platform_data = &ads7846_config,
    },
    };

     

     

    static struct omap2_mcspi_device_config ads7846_mcspi_config = {
    .turbo_mode = 0,
    .single_channel = 1, /* 0: slave, 1: master */
    };

     

    struct ads7846_platform_data ads7846_config = {
    .x_max = 0x0fff,
    .y_max = 0x0fff,
    .x_plate_ohms = 180,
    .pressure_max = 255,
    .debounce_max = 10,
    .debounce_tol = 3,
    .debounce_rep = 1,
    .get_pendown_state = ads7846_get_pendown_state,
    .keep_vref_on = 1,
    .settle_delay_usecs = 150,
    .wakeup = true,
    };

    When I boot:  my beagleboard recognized touchscreen:

    spi3.0 supply vcc not found, using dummy regulator
    ads7846 spi3.0: touchscreen, irq 293
    input: ADS7846 Touchscreen as /devices/platform/omap2_mcspi.3/spi3.0/input/input1

     PS: I am using beagleboard rev C4 and here is my topic: http://e2e.ti.com/support/embedded/f/509/t/134487.aspx

    Thank you.

     

     

     

  • Hi Nguyen Huu Ha,

    As this discussion was already answer verified so please create a new question.

    Regards,

    Faisal Hassan

  • Hi Faisal Hassan,

    Here is new topic's link: http://e2e.ti.com/support/embedded/f/509/t/134487.aspx

    Thank you.