CAF Click Detector events too slow (latency)

Hi, 

I have been testing the CAF click detector module and I find that any event callback after the click event takes almost 1000ms. That is the time between the actual click and the event trigger in the configured module seems too long. 

I've played around with the timeout configs but the events still seem to take too long. 

Is there a way to make it more responsive without implementing a custom solution? 

Parents Reply
  • Hi Swathy, 

    I was able to mess around a bit more, found that the button events themselves have a latency of about 500ms which adds to the click detector latency. 

    I was looking through buttons.c and wondering if the reason they're delayed is because of the usage of delayable work units.

    static struct k_work_delayable matrix_scan;
    static struct k_work_delayable button_pressed;



    I'm wondering if the delay is caused due to the kernel context switch from sysworkq at -1 priority to a delayable work unit. 



Children
Related