Reading analog value

Description

Hi, I am trying to read an analog value from Pin A1 and display it on an external monitor. However, as soon as I have an analogRead(A1) in my code the screen turns white.

Additionally, I do not get anything on my Serial Monitor.

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

Aduino Portenta H7 / Arduino IDE 2.0

What LVGL version are you using?

8.3.4

What do you want to achieve?

Being able to get values from analogRead() without the screen turning white.

What have you tried so far?

So I tried to start the analogRead later with the help of an if statement. The display turns white as soon as I tried an analogRead once. It also does not display anything anymore after I have tried to do an analogRead. If I comment out the analogRead() the code works fine.

Code to reproduce

/*You code here*/
#include "Portenta_LittleVGL.h"

static lv_obj_t *label;
static lv_obj_t *secondlabel;
int counter = 0;
int analogValue = 0;

lv_timer_t * timer;
lv_timer_t * secondtimer;

static void updateCounterTimer(lv_timer_t *timer) {
  // Print the count to the Serial monitor
  Serial.println(counter);

  // Update the text of the label
  lv_label_set_text_fmt(label, "%d" , counter);    

  // Increase the count number
  counter++;                                               
}

static void analogread(lv_timer_t *secondtimer) {

  analogValue = analogRead(A1);

  Serial.println(analogValue);

  // Update the text of the label
  lv_label_set_text_fmt(secondlabel,"%d", analogValue);         

}
void setup() {  
  Serial.begin(115200);

  pinMode(A1,INPUT);

  // Initialize Portenta's video interface
  portenta_init_video();

  // Setting up the label making it a child of the screen
  label = lv_label_create(lv_scr_act());
  secondlabel = lv_label_create(lv_scr_act());

  // Set the label's text
  lv_label_set_text(label , "Counter");
  lv_label_set_text(secondlabel , "Analogvalue");
  
  // We move it to the center of the screen and align it centered
  lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);
  lv_obj_align(secondlabel, LV_ALIGN_CENTER, 0, 20);
  // Create a timer to update the counter
  timer = lv_timer_create(updateCounterTimer, 1000, NULL);
  secondtimer = lv_timer_create(analogread, 1000, NULL);
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.print("Hello");
  lv_timer_handler();
}

Having same issue here with Arduino GIGA R1 WiFi, STM32H747Xi with official GIGA Display Shield.
As long as the analogRead() function calls, the screen flickers, if the analogRead() was in the main loop(), it scrambles everything.
Im not sure if this is a hardware issue or software issue.
Same problem with others here:Link analog data from Arduino Giga Display Shield - How to - Forum - SquareLine Studio

And I found a potential fix here, using the Arduino_AdvancedAnalog library, but I didnt tried yet: GIGA Display Shield interference with analog functionalities - #7 by leocavagnis - GIGA Display Shield - Arduino Forum