zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.77k stars 6.57k forks source link

kscan_ft5336 doesn't provide proper up/down information when polling, and hogs resources in interrupt mode #33994

Closed dhoove closed 3 years ago

dhoove commented 3 years ago

The 'pressed' value that is provided by the callback is only 1 if the touchpad was being pressed at the moment it was being sampled. If you press quickly between sampling periods, 'pressed' will always remain zero. One way to solve this problem is by activating interrupt mode. But in this case, the interrupts are generated at high frequency (approximatly 40Hz), causing significant I2C traffic and hogging resources.

To reproduce:

This problem is disturbing because accurate press detection results in high CPU use, both in polling and interrupt mode.

MaureenHelm commented 3 years ago

Which board and zephyr version are you using?

dhoove commented 3 years ago

Hi,I just added a board file to the PR for the STM32L476 nucleo board.Cheers,DavidOn 6 Apr 2021 19:41, Maureen Helm @.***> wrote: Which board are you using?

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

gmarull commented 3 years ago

related PR: https://github.com/zephyrproject-rtos/zephyr/pull/33996

github-actions[bot] commented 3 years ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.