Lv_task_handler goes to infinite while


My lv_task_handler is called by an interrupt every 5mS, but after first call my lv_task_handler enter in a inifinite while.

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

Keil uVision, STM32F412RG

What LVGL version are you using?


Code to reproduce

My code read some data in CAN BUS, like this:

if(SYSTEM == ON)
   get_data1(); //takes 0-160mS
   get_data2(); //takes 0-160mS
   get_data3(); //takes 0-160mS
   IGN++; //variable int

In parallel this, I have 7 lv_tasks to refresh widgets in my display (with 50mS period).

If I comment my get_data functions, my lvgl works fine.

Are your custom lv_tasks blocking? lv_tasks are not allowed to block.

I am very new to LVGL but from past experience functions like delay and sleep block. I typically see work being done changing a flag variable in the interrupt and then executing the code outside of the interrupt.

If code takes longer than the time between interrupts or draws it could easily get stuck executing the same code over and over.

I think more code would be needed to help you better.