How to refresh value between tasks

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

esp32, esp-wrover-kit

What LVGL version are you using?

8.2

What do you want to achieve?

When increasing the value in varTask , the value increased is refreshed on the screen in guiTask.

What have you tried so far?

I have tried lv_timer_create, lv_obj_add_event_cb.
I checked that the timer function or event_cb is running, but lv_label_set_text_fmt() does not work.

xTaskCreatePinnedToCore(guiTask, "gui", 4096 * 2, NULL, 2, NULL, 1);  
xTaskCreatePinnedToCore(varTask, "var", 4096, NULL, 3, NULL, 1); 

static void varTask(void *pvParameters)
{
  while (1)
  {
    vTaskDelay(pdMS_TO_TICKS(100));
    var++;
    lv_event_send(Label, LV_EVENT_VALUE_CHANGED, NULL);
  }
}

static void guiTask(void *pvParameter)
{
  Label = lv_label_create(ui_Screen1);
   …
  lv_label_set_text_fmt(Label, "%d", var);
  lv_obj_add_event_cb(Label, label_event_cb, LV_EVENT_VALUE_CHANGED, NULL);

  while (1)
  {
    vTaskDelay(pdMS_TO_TICKS(10));
    if (pdTRUE == xSemaphoreTake(xGuiSemaphore, portMAX_DELAY))
    {
      lv_task_handler();
      xSemaphoreGive(xGuiSemaphore);
    }
  }
}

void label_event_cb(lv_event_t * e) 
{
    lv_event_code_t code = lv_event_get_code(e);

    if(code == LV_EVENT_VALUE_CHANGED) {
        lv_label_set_text_fmt(ui_Screen1_Label2, "%d", var);
        lv_obj_invalidate(ui_Screen1_Label2);
        
        Serial.print("LV_EVENT_CHG\n");
    }
}

//void label_timer_cb(lv_timer_t * timer)
//{
//    lv_label_set_text_fmt(ui_Screen1_Label2, "%d", var);
//    Serial.print("label_timer_cb\n");
//}

I found my mistake.
After creating the lvgl code (ui_init(), ui_Screen1_screen_init()) through SquareLine, I pasted it into the guiTask function, but there was a mistake in this process.
ui_init(); // → Run ui_Screen1_screen_init() in ui_init(), I should have just pasted this.
ui_Screen1_scrren_init(); // → When this function is executed again, the screen is not refreshed

static void guiTask(void *pvParameter)
{
   ...
  ui_init(); 
  ui_Screen1_screen_init(); // when removed this line, var is refreshed. 
  ...
  while (1)
  {
    vTaskDelay(pdMS_TO_TICKS(10));

   if (pdTRUE == xSemaphoreTake(xGuiSemaphore, portMAX_DELAY))
    {
      lv_timer_handler();
      Serial.print("+");
     xSemaphoreGive(xGuiSemaphore);
    }
  }
}

void ui_init(void)
{
    lv_disp_t *dispp = lv_disp_get_default();
    lv_theme_t *theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
                                              false, LV_FONT_DEFAULT);
    lv_disp_set_theme(dispp, theme);
    ui_Screen1_screen_init();
    lv_disp_load_scr(ui_Screen1);  
}

void ui_Screen1_screen_init(void)
{
    ui_Screen1 = lv_obj_create(NULL);
    lv_obj_clear_flag(ui_Screen1, LV_OBJ_FLAG_SCROLLABLE); /// Flags
    lv_obj_set_style_radius(ui_Screen1, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Screen1, lv_color_hex(0x280707), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_grad_color(ui_Screen1, lv_color_hex(0xBC2525), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_grad_dir(ui_Screen1, LV_GRAD_DIR_HOR, LV_PART_MAIN | LV_STATE_DEFAULT);
    ...
}