芒果的tiny200s板子 gt911电容屏不能中断,一筹莫展中
-
使用的是这个SDK: buildroot-tiny200 (F1C100/200s) 开发包近期更新内容 * 已支持DVP摄像头 *
i2c 检测 gt911 正常
[ 4.444256] Goodix-TS 0-0014: 0-0014 supply AVDD28 not found, using dummy regulator [ 4.452376] Goodix-TS 0-0014: 0-0014 supply VDDIO not found, using dummy regulator [ 4.460527] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator [ 4.739056] Goodix-TS 0-0014: ID 911, version: 1060 [ 4.803438] input: Goodix Capacitive TouchScreen as /devices/platform/soc/1c27000.i2c/i2c-0/0-0014/input/input0 [ 5.560878] urandom_read: 1 callbacks suppressed [ 5.560903] random: dd: uninitialized urandom read (512 bytes read) [ 5.838436] file system registered [ 5.984015] read descriptors [ 5.987311] read strings
evtest不听使唤:
# evtest /dev/input/event0 Input driver version is 1.0.1 Input device ID: bus 0x18 vendor 0x416 product 0x38f version 0x1060 Input device name: "Goodix Capacitive TouchScreen" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 125 (KEY_LEFTMETA) Event code 330 (BTN_TOUCH) Event type 3 (EV_ABS) Event code 0 (ABS_X) Value 0 Min 0 Max 799 Event code 1 (ABS_Y) Value 0 Min 0 Max 479 Event code 47 (ABS_MT_SLOT) Value 0 Min 0 Max 4 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 255 Event code 53 (ABS_MT_POSITION_X) Value 0 Min 0 Max 799 Event code 54 (ABS_MT_POSITION_Y) Value 0 Min 0 Max 479 Event code 57 (ABS_MT_TRACKING_ID) Value 0 Min 0 Max 65535 Properties: Property type 1 (INPUT_PROP_DIRECT) Testing ... (interrupt to exit)
gt911 中断次数0:
# cat /proc/interrupts CPU0 16: 4309 sun4i_irq 13 Edge timer@1c20c00 17: 0 sun4i_irq 18 Edge 1c02000.dma-controller 18: 3 sun4i_irq 10 Edge sun6i-spi 19: 316 sun4i_irq 29 Edge 1c0c000.lcd-controller 20: 0 sun4i_irq 34 Edge cedar_dev 21: 3970 sun4i_irq 23 Edge sunxi-mmc 22: 1 sun4i_irq 26 Edge musb-hdrc.1.auto 28: 839 sun4i_irq 2 Edge ttyS0 29: 2261 sun4i_irq 7 Edge mv64xxx_i2c 76: 0 sunxi_pio_edge 44 Edge gt911 Err: 0
-
我记得以前是正常的
三块新屏都是一样的问题,用万用表量了一下,触摸的时候屏的INT引脚确实不能下拉.
-
刚刚有朋友提醒我,把中断腿设置为io模式,看能拉高拉低,
测试 PE12 输出高低电平:
echo $((4*32+12)) echo 140 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio140/direction echo 0 > /sys/class/gpio/gpio140/value
然后果然不能拉高拉低,难道板子坏了吗?
-
还好板子多,换块板子再试一试,可以拉高拉低了.
接着测试一下中断.
-
触摸完全OK:
# evtest /dev/input/event0 Input driver version is 1.0.1 Input device ID: bus 0x18 vendor 0x416 product 0x38f version 0x1060 Input device name: "Goodix Capacitive TouchScreen" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 125 (KEY_LEFTMETA) Event code 330 (BTN_TOUCH) Event type 3 (EV_ABS) Event code 0 (ABS_X) Value 0 Min 0 Max 799 Event code 1 (ABS_Y) Value 0 Min 0 Max 479 Event code 47 (ABS_MT_SLOT) Value 0 Min 0 Max 4 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 255 Event code 53 (ABS_MT_POSITION_X) Value 0 Min 0 Max 799 Event code 54 (ABS_MT_POSITION_Y) Value 0 Min 0 Max 479 Event code 57 (ABS_MT_TRACKING_ID) Value 0 Min 0 Max 65535 Properties: Property type 1 (INPUT_PROP_DIRECT) Testing ... (interrupt to exit) Event: time 11.891769, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0 Event: time 11.891769, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 435 Event: time 11.891769, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 260 Event: time 11.891769, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 29 Event: time 11.891769, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 29 Event: time 11.891769, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1 Event: time 11.891769, type 3 (EV_ABS), code 0 (ABS_X), value 435 Event: time 11.891769, type 3 (EV_ABS), code 1 (ABS_Y), value 260 Event: time 11.891769, -------------- SYN_REPORT ------------ Event: time 11.943724, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1 Event: time 11.943724, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0 Event: time 11.943724, -------------- SYN_REPORT ------------ Event: time 12.207591, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 1 Event: time 12.207591, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 432 Event: time 12.207591, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 238 Event: time 12.207591, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 34 Event: time 12.207591, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 34 Event: time 12.207591, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1 Event: time 12.207591, type 3 (EV_ABS), code 0 (ABS_X), value 432 Event: time 12.207591, type 3 (EV_ABS), code 1 (ABS_Y), value 238 Event: time 12.207591, -------------- SYN_REPORT ------------ Event: time 12.291078, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1 Event: time 12.291078, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0 Event: time 12.291078, -------------- SYN_REPORT ------------ [ 31.842433] vcc3v0: disabling [ 31.845438] vcc5v0: disabling Event: time 94.686680, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 2 Event: time 94.686680, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 295 Event: time 94.686680, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 194 Event: time 94.686680, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 21 Event: time 94.686680, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 21 Event: time 94.686680, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1 Event: time 94.686680, type 3 (EV_ABS), code 0 (ABS_X), value 295 Event: time 94.686680, type 3 (EV_ABS), code 1 (ABS_Y), value 194 Event: time 94.686680, -------------- SYN_REPORT ------------ Event: time 94.717502, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1 Event: time 94.717502, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0 Event: time 94.717502, -------------- SYN_REPORT ------------ Event: time 94.833846, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 3 Event: time 94.833846, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 293 Event: time 94.833846, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 209 Event: time 94.833846, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 37 Event: time 94.833846, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 37 Event: time 94.833846, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1 Event: time 94.833846, type 3 (EV_ABS), code 0 (ABS_X), value 293 Event: time 94.833846, type 3 (EV_ABS), code 1 (ABS_Y), value 209 Event: time 94.833846, -------------- SYN_REPORT ------------ [ 94.919685] random: crng init done Event: time 94.920955, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1 Event: time 94.920955, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0 Event: time 94.920955, -------------- SYN_REPORT ------------ Event: time 95.044346, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 4 Event: time 95.044346, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 295 Event: time 95.044346, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 211 Event: time 95.044346, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 28 Event: time 95.044346, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 28 Event: time 95.044346, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1 Event: time 95.044346, type 3 (EV_ABS), code 0 (ABS_X), value 295 Event: time 95.044346, type 3 (EV_ABS), code 1 (ABS_Y), value 211 Event: time 95.044346, -------------- SYN_REPORT ------------ Event: time 95.085689, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1 Event: time 95.085689, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0 Event: time 95.085689, -------------- SYN_REPORT ------------ Event: time 95.233558, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 5 Event: time 95.233558, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 296 Event: time 95.233558, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 230 Event: time 95.233558, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 14 Event: time 95.233558, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 14 Event: time 95.233558, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1 Event: time 95.233558, type 3 (EV_ABS), code 0 (ABS_X), value 296 Event: time 95.233558, type 3 (EV_ABS), code 1 (ABS_Y), value 230 Event: time 95.233558, -------------- SYN_REPORT ------------ Event: time 95.264502, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1 Event: time 95.264502, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0 Event: time 95.264502, -------------- SYN_REPORT ------------ Event: time 97.795859, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 6 Event: time 97.795859, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 754 Event: time 97.795859, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 9 Event: time 97.795859, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 31 Event: time 97.795859, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 31 Event: time 97.795859, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1 Event: time 97.795859, type 3 (EV_ABS), code 0 (ABS_X), value 754 Event: time 97.795859, type 3 (EV_ABS), code 1 (ABS_Y), value 9 Event: time 97.795859, -------------- SYN_REPORT ------------ Event: time 97.879491, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1 Event: time 97.879491, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0 Event: time 97.879491, -------------- SYN_REPORT ------------ Event: time 98.290574, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 7 Event: time 98.290574, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 744 Event: time 98.290574, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 6 Event: time 98.290574, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 28 Event: time 98.290574, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 28 Event: time 98.290574, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1 Event: time 98.290574, type 3 (EV_ABS), code 0 (ABS_X), value 744 Event: time 98.290574, type 3 (EV_ABS), code 1 (ABS_Y), value 6 Event: time 98.290574, -------------- SYN_REPORT ------------ Event: time 98.384787, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1 Event: time 98.384787, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0 Event: time 98.384787, -------------- SYN_REPORT ------------ Event: time 99.332530, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 8 Event: time 99.332530, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 750 Event: time 99.332530, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 451 Event: time 99.332530, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 43 Event: time 99.332530, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 43 Event: time 99.332530, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1 Event: time 99.332530, type 3 (EV_ABS), code 0 (ABS_X), value 750 Event: time 99.332530, type 3 (EV_ABS), code 1 (ABS_Y), value 451 Event: time 99.332530, -------------- SYN_REPORT ------------ Event: time 99.405632, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1 Event: time 99.405632, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0 Event: time 99.405632, -------------- SYN_REPORT ------------ Event: time 100.258616, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 9 Event: time 100.258616, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 6 Event: time 100.258616, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 474 Event: time 100.258616, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 8 Event: time 100.258616, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 8 Event: time 100.258616, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1 Event: time 100.258616, type 3 (EV_ABS), code 0 (ABS_X), value 6 Event: time 100.258616, type 3 (EV_ABS), code 1 (ABS_Y), value 474 Event: time 100.258616, -------------- SYN_REPORT ------------ Event: time 100.310865, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1 Event: time 100.310865, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0 Event: time 100.310865, -------------- SYN_REPORT ------------
中断正常:
# # cat /proc/interrupts CPU0 16: 4309 sun4i_irq 13 Edge timer@1c20c00 17: 0 sun4i_irq 18 Edge 1c02000.dma-controller 18: 3 sun4i_irq 10 Edge sun6i-spi 19: 316 sun4i_irq 29 Edge 1c0c000.lcd-controller 20: 0 sun4i_irq 34 Edge cedar_dev 21: 3970 sun4i_irq 23 Edge sunxi-mmc 22: 1 sun4i_irq 26 Edge musb-hdrc.1.auto 28: 839 sun4i_irq 2 Edge ttyS0 29: 2261 sun4i_irq 7 Edge mv64xxx_i2c 76: 93 sunxi_pio_edge 44 Edge gt911 Err: 0 #
-
结论: 板子坏了,换块板子中断正常了.
-
板子多,屏也多,666
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号