diff --git a/libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino b/libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino index caa7fc4a1..2ffe97591 100644 --- a/libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino +++ b/libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino @@ -60,6 +60,12 @@ void setup() { Serial.println("Do you want to proceed? Y/[n]"); if (true == waitResponse()) { + if (root.init() != QSPIF_BD_ERROR_OK) { + Serial.println(F("Error: QSPI init failure.")); + return; + } + + root.erase(0, root.size()); mbed::MBRBlockDevice::partition(&root, 1, 0x0B, 0, 1024 * 1024); if(default_scheme) { mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 14 * 1024 * 1024, 14 * 1024 * 1024);