Interrupting lv_task_handler

Description

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

STM32F407 and GCC

What do you want to achieve?

Interrupt or abort the task handler after a certain time or if an external flag is set

What have you tried so far?

Read about the task handling but it says the task can’t interrupt each over.

Hi everybody,

I run LittlevGL on the STM32F4 and in my application I have some continouse data input stream which should be filtepass through a bi-quad filter stage and saved to a SD card. The problem I face now is that large arrays to redraw on the screen took to much time and the datastream is corrupted. The custom board I use has no external RAM so I can’t expand the input buffer any further.
My idea was to interrupt the task_handler if on of the two input buffers is full, call the filter and the write function and then to further execute the task_handler, but I couldn’t find any describtion in the doku how to do it.
Is there any chance to interrupt the task_handler or implement an interrupting task in it?

Thanks
Alex

lv_task_handler doesn’t have any built-in support for being interrupted; you would have to use an OS and put the while(1) loop calling it in a separate thread. Be sure to guard all calls to lv_ APIs with a mutex.

Can you use a timer interrupt (e.g. set for 1ms) to see if there is data stream to process? If there is, it will interrupt lv_task_handler (as it’s an interrupt) and you can start processing with max 1 ms delay.

That would be simpler, as long as the processing can be done entirely inside an interrupt handler.