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
  • Looks like most of the delay is caused due to the the code written to prevent debouncing and ghosting. 

    At stock configs for 

    #define SCAN_INTERVAL CONFIG_CAF_BUTTONS_SCAN_INTERVAL
    #define DEBOUNCE_INTERVAL CONFIG_CAF_BUTTONS_DEBOUNCE_INTERVAL


    I see the scan function being called anywhere from 20-100 times. Which adds varying amounts of delay before the events are sent out. Every call of scan_fn adds about 3-4ms of delay. 

    static void scan_fn(
    struct k_work* work)

Children
Related