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.

TSC2004 touch panel interrupt regular behavior

Other Parts Discussed in Thread: AM3517, TSC2004

Hi:

I've been working on a project that involves using an AM3517 sitara module. Currently I've been doing some tests with the touch screen and I have noticed that I get an interrupt both when I press the touch screen and also when I release the pressure from the screen. I checked the source code for the TSC2004 driver and the TS controller is configured by default in mode 1 (data conversion is controlled by the TSC) and the interrupt PINTDAV line is supposed to go low when new data is available (a valid conversion of the X,Y, Z1 and Z2 has been achieved). Please notice that is also possible to change the PINTDAV line behavior to generate an interrupt when only a pen touch is detected (a touch in the screen) and also when both a touch is detected AND data conversion has finished.

Either case I still wonder if the behavior I'm seeing is the regular expected behavior for this TSC configuration or if it has something to do with the processing of interrupts on the AM3517 side.

Using a Lauterbach debugger I was able to get a backtrace of the execution flow when the tsc2004_irq handle function is invoked:

1) When I press the touch screen:

gpio_irq_handler -->  handle_edge_irq --> handle_IRQ_event --> tsc2004_irq

2) When I release the pressure from the screen:

do_softirq --> tasklet_action --> resend_irqs --> handle_edge_irq --> handle_IRQ_event --> tsc2004_irq

I'm pretty sure that the second interrupt is not generated by the TSC2004 PINTDAV line...the backtrace function resend_irqs makes me wonder if the second interrupt I get (when I remove pressure from the screen) comes from pending interrupts or something else.

I'm also attaching a capture from the scope. The descriptions of the singnals:

  • Blue line: set to 0 when kernel driver disables / masks the IRQ for the TSC2004; set to 1 when kernel driver enables the IRQ again.
  • Green line: set to 1 at begin of tsc2004_work() function and restored to zero when the work function exits.
  • Yellow line: the state of the yellow line is toggled every time the IRQ handler function is executed.
  • Purple line: Directly attached to the IRQ-Pin of the TSC2004.

The action of releasing the pressure from the screen is circled in red. Please notice that the interrupt handler function is called for a SECOND time even if the kernel has disabled / masked the IRQ and also no hardware interrupt has been generated by the TSC2004 (purple line, active low during data conversion).

I would like to know if this is the regular behavior I should get when interacting with the TSC2004 device in the Sitara EVM.

Regards Diego Chaverri.

  • Hi Diego, I am working with the tsc2004 on an omap35x torpedo platform.  I am seeing very similar behaviour to what you describe.  I wonder if you'd share with me if and how you resolved this issue.  I am seeing button pushes toggle with a Qt application running and have played with the PINTDAV settings but that doesn't seem to correct the behaviour.  Any insight you might share would be greatly appreciated.

    Regards,

    Lynetta Rajkovich