在使用TSC2007做项目,测试发现,在linux的驱动里面,只要一次触摸屏幕之后,PENIRQ就开始一直产生中断,最后调试发现是每一次对TS2007读操作,PENIRQ都能产生一个中断,中断处理函数中有读坐标的动作,如此一来PENIRQ就一直的产生中断,形成一个不断的方波。
static void tsc2007_read_values(struct tsc2007 *tsc, struct ts_event *tc)
{
/* y- still on; turn on only y+ (and ADC) */
tc->y = tsc2007_xfer(tsc, READ_Y);
/* turn y- off, x+ on, then leave in lowpower */
tc->x = tsc2007_xfer(tsc, READ_X);
/* turn y+ off, x- on; we'll use formula #1 */
tc->z1 = tsc2007_xfer(tsc, READ_Z1);
tc->z2 = tsc2007_xfer(tsc, READ_Z2);
/* Prepare for next touch reading – power down ADC, enable PENIRQ */
tsc2007_xfer(tsc, PWRDOWN);
}
下面链接的情况和我描述的是一样的,不知道是否有人遇到过这种情况么?
Amy Luo:
您好,
看下触摸屏输出模拟信号产生的原理:
www.ti.com.cn/…/slyt292.pdf
模拟触摸信号X+/X-/Y+/Y-走线附近有没有高频信号,有没有被干扰导致的呢