Giga Display Shield: Display.begin() fails with H7_Video, but works with GFX (Mbed OS Core issue?)

Hello,

I am experiencing a severe initialization issue with the Giga Display Shield (480x800) on an Arduino Giga R1. I suspect a bug within the current Arduino Mbed OS Core/Arduino_H7_Video library implementation.

1. The Setup

  • Board: Arduino Giga R1
  • Shield: Giga Display Shield (480x800)
  • Core: Arduino Mbed OS Boards (newly reinstalled, latest version)
  • Goal: Use LVGL, which requires the Arduino_H7_Video library.

2. The Problem (H7_Video Fails)

The minimal sketch using the hardware-accelerated H7 video driver consistently fails at initialization:

#include "Arduino_H7_Video.h"
#include "Arduino_GigaDisplayTouch.h"

Arduino_H7_Video Display(800, 480, GigaDisplayShield);
Arduino_GigaDisplayTouch Touch;

void setup() {
  Serial.begin(9600);
  delay(2000); 
  // Added an aggressive 1000ms delay before begin() - still fails
  delay(1000); 

  if (!Display.begin()) {
    Serial.println("!!! Display Error - H7_Video FAILED !!!"); 
    while(1); 
  }
  Touch.begin();
  Serial.println("H7 Display successful."); // Never reached
}
void loop() {}

Result: !!! Display Error - H7_Video FAILED !!! is printed.

3. The Crucial Finding (GFX Works)

To rule out a hardware defect, I tested the display using the simpler GFX library. This test succeeds without issue, proving the display panel, wiring, and power supply are all functional.

Library used: Arduino_GigaDisplay_GFX.h
Result:** Benchmark runs successfully, displaying graphics and text.

I have already performed a clean reinstallation of the 'Arduino Mbed OS Boards' package in the Board Manager to rule out a corrupted driver installation. The issue persists.

Hi!
Display.begin() returns 0 if everything goes fine, a number greater than 0 if an error occurs.
So, fix in this way:
if (Display.begin()) {

Oh, sorry, silly mistake! But I have one follow-up question.

I only created this code because the code in my project doesn't work anymore.

I use Square Line Studio for designing and programming the display.

Here is the important part of my Arduino code:

#include "Arduino_H7_Video.h"
#include "Arduino_GigaDisplayTouch.h"
extern "C" {
#include <kvstore.h>
#include "kvstore_global_api.h"
}
#include <Wire.h>
#include <Adafruit_MMA8451.h>
#include <Adafruit_Sensor.h>
#include "lvgl.h"
#include "ui.h"
#include "ui_helpers.h"
// Definition der State Machine
enum GameState {
  STATE_MENU,
  STATE_LIFE_MODE,
  STATE_TRAFFIC_MODE
};
GameState currentState = STATE_MENU; // Starte im Menü
Adafruit_MMA8451 mma = Adafruit_MMA8451();
// resolution 
Arduino_H7_Video Display(800, 480, GigaDisplayShield);
Arduino_GigaDisplayTouch Touch;

void setup() {
  delay(3000);
  Display.begin();
  Touch.begin();
  ui_init();
//...
kv_info_t info;
size_t actual_size;
//...
Wire.begin();
mma.begin()
//...
}
void loop() {
  lv_timer_handler();
//...
}

It should show a white screen, but this is what it shows instead. It's important to note that it was working on Wednesday.

At first, I thought the display was damaged, but the demonstration test with the GFX library worked.

Have you recently update the mbed core from the board manager?

Last release should be the 4.4.1 (july 2024).

Try to rollback the core.