Pushbutton events on touchscreen get lost when repeatedly pushing in fast order


I have created some push-buttons (simple rectangles) on a touch-screen. For fastly repeated pushing and releasing (about 1-2 times a second), the corresponding events (LV_EVENT_PRESSED, LV_EVENT_RELEASED) are not triggered all the time. In 90% this works fine, but sometimes events are not captured.
Any suggestions how to get this effect (better) under control?

What MCU/Processor/Board and compiler are you using?


What LVGL version are you using?


What do you want to achieve?

Response on fast / frequent pushes

What have you tried so far?

Code to reproduce

I am using the standard event handler (LV_EVENT_PRESSED, LV_EVENT_RELEASED) which just modies one variable

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

Hi @Matthias,

This sounds like a touch driver issue… Here are a couple of suggestions and checks, but it’s hard to comment without knowing the full picture.

Some touch screen hardware has a FIFO, if yours does, are you getting overruns on your FIFO?
Does the touch screen driver soft queue events? (If this is not the case can you implement this?)

The way I have implemented my own touch screen driver is to collect the events in an interrupt driven driver and pass them to an event queue.

The LVGL call back that is called periodically then sends one of the queued events. I believe in LVGL V7.0 the call back can return TRUE if there are more events to collect in the queue and this will make LVGL collect the events more quickly by repeating the call to the call back.

I hope that helps.

Kind Regards,