Learn how to reset the QSPI flash memory for STM32H747-based Arduino devices by uploading a utility sketch. The sketch will remove any previous partitioning scheme, and recreate the factory-defined partition scheme. Finally, the latest connectivity firmware and TLS certificates are reinstalled.
You may want to use this procedure to:
- Restore the factory-defined memory allocation for full support of Arduino IDE or Arduino Cloud.
- Resolve issues with storage or connectivity.
Supported devices:
- Arduino GIGA R1 WiFi
- Arduino Opta Lite
- Arduino Opta RS485
- Arduino Opta WiFi
- Arduino Portenta H7
- Arduino Portenta H7 Lite
- Arduino Portenta H7 Lite Connected
- Arduino Portenta Machine Control
Important
Resetting the flash memory will remove the PLC IDE runtime. Reinstall the runtime to continue using PLC IDE with your device.
Follow these steps:
-
Download the following sketch:
-
Open the sketch in your editor:
-
Arduino IDE: Extract the .zip into your Sketchbook. Ensure both
memory_partitioning.ino
andcertificates.h
are inside a folder namedmemory_partitioning
. -
Cloud Editor: Open the Sketches tab and click on the Create button in the top-right corner. Select Import local file in the dropdown menu and import
memory_partitioning.zip
.
-
-
Open the imported sketch in your editor.
-
Connect your device to your computer and select the device in the editor.
-
Click
Upload to upload the sketch to the device.
-
Click the
Serial Monitor button in the top-right corner or select Tools > Serial Monitor (IDE only).
-
Open the Serial Monitor. When this message appears, the process is complete:
Firmware and certificates updated! It's now safe to reboot or disconnect your board.
Check if the problem persists. If you’re using PLC IDE, you’ll first need to reinstall the runtime. If you’re using an Arduino Opta and still encounter issues, the memory may have write protection enabled. Follow the instructions in Recover an Arduino Opta with read-only flash memory, then repeat the steps above.