Lv_task for non-LVGL tasks

My embedded software designs mostly use interrupts, but there are always some functions that need to be called periodically. I usually use the processor’s built-in periodic timer system (e.g. PIT) and count “ticks” to set flags that 1ms/10ms/100ms/etc. have elapsed and then check the flags in a main loop, clearing the flag once the necessary functions have been called.

As far as I can see there’s no reason I can’t use lv_task to run my periodic tasks (anything needing any degree of timing certaintly would be on an interrupt). Maybe 6 or 8 functions max.

Before I start off a new project using lvgl and do it this way, does anyone know of a reason why lv_task for this sort of thing is “a bad idea”?

It’s fine to use lv_tasks this way.

1 Like

Thank you for confirming!