The Problem about tick = lvstm32.lvstm32() not work!

Description

I tried to run any lv_binlings example for stm32. There would be runtime error of Tim(4) on running lcd.init(w=hres, h=vres) after tick=lvstm32.lvstm32().
And tick didn’t work and touch pad had no responds, but the widget would be shown.
After I moved tick=lvstm32.lvstm32() to the end of program, everything is OK and the program run successfully.

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

STM32H743, the board was developed by myself.

What LVGL version are you using?

V.7

What do you want to achieve?

Why the examples can not work.

What have you tried so far?

all the examples provided by lv_binlings for stm32 platform

Code to reproduce

import lvgl as lv

lv.init()

import tftlcd as lcd

import lvstm32

hres = 480
vres = 272

Register display driver

#tick = lvstm32.lvstm32()
lcd.init()
disp_buf1 = lv.disp_buf_t()
buf1_1 = lcd.framebuffer(1)
buf1_2 = lcd.framebuffer(2)
disp_buf1.init(buf1_1, buf1_2, len(buf1_1) // lv.color_t.SIZE)
disp_drv = lv.disp_drv_t()
disp_drv.init()
disp_drv.buffer = disp_buf1
disp_drv.flush_cb = lcd.flush
disp_drv.gpu_blend_cb = lcd.gpu_blend
disp_drv.gpu_fill_cb = lcd.gpu_fill
disp_drv.hor_res = hres
disp_drv.ver_res = vres
disp_drv.register()

Register touch sensor

indev_drv = lv.indev_drv_t()
indev_drv.init()
indev_drv.type = lv.INDEV_TYPE.POINTER
indev_drv.read_cb = lcd.ts_read
indev_drv.register()

Create a screen with a button and a label

scr = lv.obj()
btn = lv.btn(scr)
btn.align(lv.scr_act(), lv.ALIGN.IN_TOP_LEFT, 0, 0)
label = lv.label(btn)
label.set_text(“Hello World!”)
lv.scr_load(scr)
tick = lvstm32.lvstm32()

Screenshot and/or video

I’m not sure what is a “runtime error of Tim(4)”.
lvstm32() registers a timer to call lv_task_handler periodically.
lv_task_handler in turn tries to update the display. If the display was not initialized yet and display’s “flush” is called, it could cause a problem.

@embeddedt did you ever see this “Tim(4)” error on stm32?
If my guess above is correct then it should be easy to prevent stm32 “flush” from doing anything before display is initialized. What do you think?

No; I have never seen this error before.