Updateting text of lv_label using lv_label_set_text_static() results in scrambled pixels

Hi all!

I’m new to lvgl and just tried some widgeds. All worked so far but now I got to an isse I do not understand
how to fix. I am trying to display the current time on the display. In function init() I create a label that shall be updated later by the update() function. The init() does its job fie, the initial string is correctly displayed. But
when I call update(), I get only a line (maybe 3-4 pixels in height) of random pixels but nothing readable.
init() and undate() run in the same thread(FreeRTOS). BTW lv_label_set_text() behaves identically in this example.

Any ideas what is going wrong here?

lv_obj_t* m_clock = NULL;
char m_clockstr[] = “–:–:–”;

void update(TIME_T time)
snprintf(m_clockstr, sizeof(m_clockstr), “%02u:%02u:%02u”, time.hour, time.minute, time.seconds);
lv_label_set_text_static(m_clock, m_clockstr);


void init()
m_clock = lv_label_create(headline);
lv_label_set_text_static(m_clock, m_clockstr);
lv_obj_align(m_clock, LV_ALIGN_CENTER, 0,0);

My problem has been solved. It was inside the display driver. It had problems with odd area coordinates that lvgl wanted to redraw. Now sure if it helps someone else but if you have distorted screen content from time to time only, make sure your display driver and DMA stuff can handle any size combination of x/y, even odd/ and unaligned memory.