Skip to content

Commit 2651675

Browse files
authored
Instructions for new partition scheme required by Arduino Cloud [HC-1650] (#515)
* Include instructions for the new partition scheme * Replace "partitioning scheme" with "partition scheme" * Updated instructions for serial monitor * Slight change of phrase
1 parent a2cc90b commit 2651675

File tree

1 file changed

+120
-17
lines changed

1 file changed

+120
-17
lines changed

content/Hardware Support/Generic/Reset-the-flash-memory-on-STM32H747-based-devices.md

Lines changed: 120 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,125 @@ title: Reset the flash memory on STM32H747-based devices
33
id: 16206977438748
44
---
55

6-
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.
6+
Learn how to reset or change the QSPI flash memory configuration on STM32H747-based Arduino boards using a utility sketch. Running the sketch erases any custom partitioning, restores one of two supported memory layouts, and reinstalls the latest connectivity firmware along with TLS certificates.
77

88
You may want to use this procedure to:
99

10-
* Restore the factory-defined memory allocation for full support of Arduino IDE or Arduino Cloud.
11-
* Resolve issues with storage or connectivity.
10+
- Switch between different partition schemes.
11+
- Recover a board with incorrectly partitioned memory.
12+
- Resolve other issues with memory or connectivity.
13+
14+
In this article:
15+
16+
<!-- TOC -->
17+
18+
- [Available partition schemes](#available-partition-schemes)
19+
- [Use the default partition scheme](#use-the-default-partition-scheme)
20+
- [Use the partition scheme for Arduino PLC IDE](#use-the-partition-scheme-for-arduino-plc-ide)
21+
- [Troubleshooting](#troubleshooting)
22+
23+
<!-- /TOC -->
24+
25+
---
26+
27+
## Available partition schemes
28+
29+
| Partition scheme | Description |
30+
|---------------------|--------------------------------------------------------------------------------------------------------|
31+
| [Default partition scheme](#use-the-default-partition-scheme) | Required for full Arduino Cloud support. |
32+
| [Arduino PLC IDE](#use-the-partition-scheme-for-arduino-plc-ide) | Compatible with Arduino PLC IDE 1.0.8. |
33+
34+
---
35+
36+
## Use the default partition scheme
37+
38+
This partition scheme supports the latest Arduino Cloud features, and is recommended unless you are using your device with Arduino PLC IDE.
1239

1340
Supported devices:
1441

15-
* Arduino GIGA R1 WiFi
16-
* Arduino Opta Lite
17-
* Arduino Opta RS485
18-
* Arduino Opta WiFi
19-
* Arduino Portenta H7
20-
* Arduino Portenta H7 Lite
21-
* Arduino Portenta H7 Lite Connected
22-
* Arduino Portenta Machine Control
42+
- Arduino GIGA R1 WiFi
43+
- Arduino Opta Lite
44+
- Arduino Opta RS485
45+
- Arduino Opta WiFi
46+
- Arduino Portenta H7
47+
- Arduino Portenta H7 Lite
48+
- Arduino Portenta H7 Lite Connected
49+
- Arduino Portenta Machine Control
50+
51+
Follow these steps:
52+
53+
1. Open the memory partitioning sketch:
54+
55+
- Arduino IDE: Ensure that you are using the [latest version of the board package](https://support.arduino.cc/hc/en-us/articles/4404691106066-Update-board-packages-in-Arduino-IDE), then select File > Examples > STM32H747_System > QSPIFormat.
56+
57+
- Arduino Cloud Editor: Open the [QSPIFormat example](https://app.arduino.cc/sketches/examples?eid=arduino%2Fhardware%2Fmbed_opta%2F4.4.1%2Flibraries%2FSTM32H747_System%2Fexamples%2FQSPIFormat&slid=mbed_opta%3A4.4.1%3Astm32h747_system){.link-chevron-right} in the Cloud Editor.
58+
59+
1. Connect your device to your computer and select the device in the editor.
60+
61+
1. Click ![Upload button](img/symbol_upload2.png) **Upload** to upload the sketch to the device.
62+
63+
1. Click the ![Serial Monitor button](img/symbol_monitor.png) **Serial Monitor** button in the top-right corner or select Tools > Serial Monitor (Arduino IDE only).
64+
65+
1. You should see the text below in the serial monitor. If the serial monitor is empty, ensure the sketch has finished uploading and press the RST button on the device to restart the sketch.
66+
67+
```
68+
WARNING! Running the sketch all the content of the QSPI flash will be erased.
69+
The following partitions will be created:
70+
Partition 1: WiFi firmware and certificates 1MB
71+
Partition 2: OTA 5MB
72+
Partition 3: Provisioning KVStore 1MB
73+
Partition 4: User data / OPTA PLC runtime 7MB
74+
Do you want to proceed? Y/[n]
75+
```
76+
77+
1. Type "Y" into the Serial Monitor and press <kbd>Enter</kbd> to proceed.
78+
79+
1. The following should now appear in the serial monitor:
80+
81+
```
82+
Do you want to perform a full erase of the QSPI flash before proceeding? Y/[n]
83+
Note: Full flash erase can take up to one minute.
84+
```
85+
86+
Type "Y" into the Serial Monitor and press <kbd>Enter</kbd> to confirm (recommended).
87+
88+
1. The following should now appear in the serial monitor:
89+
90+
```
91+
Do you want to restore the WiFi firmware and certificates? Y/[n]
92+
```
93+
94+
Type "Y" into the Serial Monitor and press <kbd>Enter</kbd> to confirm (recommended).
95+
96+
1. The following should now appear in the serial monitor:
97+
98+
```
99+
Do you want to use LittleFS to format user data partition? Y/[n]
100+
If No, FatFS will be used to format user partition.
101+
Note: LittleFS is not supported by the OPTA PLC runtime.
102+
```
103+
104+
Type "Y" into the Serial Monitor and press <kbd>Enter</kbd> to confirm (recommended).
105+
106+
1. The process is complete when this message appears in the serial monitor:
107+
108+
```
109+
QSPI Flash formatted!
110+
It's now safe to reboot or disconnect your board.
111+
```
23112

24113
---
25114

26-
> [!IMPORTANT]
27-
> Resetting the flash memory will remove the PLC IDE runtime. [Reinstall the runtime](https://docs.arduino.cc/software/plc-ide/tutorials/plc-ide-setup-license/#3-download-the-runtime) to continue using PLC IDE with your device.
115+
## Use the partition scheme for Arduino PLC IDE
116+
117+
This partition scheme is compatible with Arduino PLC IDE 1.0.8.
118+
119+
Supported devices:
120+
121+
- Arduino Opta Lite
122+
- Arduino Opta RS485
123+
- Arduino Opta WiFi
124+
- Arduino Portenta Machine Control
28125

29126
Follow these steps:
30127

@@ -34,15 +131,15 @@ Follow these steps:
34131

35132
1. Open the sketch in your editor:
36133

37-
* Arduino IDE: Extract the .zip into your [Sketchbook](https://support.arduino.cc/hc/en-us/articles/4412950938514-Open-the-Sketchbook-folder). Ensure both `memory_partitioning.ino` and `certificates.h` are inside a folder named `memory_partitioning`.
134+
- Arduino IDE: Extract the .zip into your [Sketchbook](https://support.arduino.cc/hc/en-us/articles/4412950938514-Open-the-Sketchbook-folder). Ensure both `memory_partitioning.ino` and `certificates.h` are inside a folder named `memory_partitioning`.
38135

39-
* Cloud Editor: Open the [Sketches tab](https://app.arduino.cc/sketches) and click on the **Create** button in the top-right corner. Select **Import local file** in the dropdown menu and import `memory_partitioning.zip`.
136+
- Cloud Editor: Open the [Sketches tab](https://app.arduino.cc/sketches) and click on the **Create** button in the top-right corner. Select **Import local file** in the dropdown menu and import `memory_partitioning.zip`.
40137

41138
1. Open the imported sketch in your editor.
42139

43140
1. Connect your device to your computer and select the device in the editor.
44141

45-
1. Click ![Upload button](img/symbol_upload2.png) **Upload** to upload the sketch to the device.
142+
1. Click ![Upload button](img/symbol_upload2.png) **Upload** to upload the sketch to the device. The partitioning and firmware update process will begin automatically when the sketch starts running.
46143

47144
1. Click the ![Serial Monitor button](img/symbol_monitor.png) **Serial Monitor** button in the top-right corner or select Tools > Serial Monitor (IDE only).
48145

@@ -53,4 +150,10 @@ Follow these steps:
53150
It's now safe to reboot or disconnect your board.
54151
```
55152

56-
Check if the problem persists. If you're using PLC IDE, you'll first need to [reinstall the runtime](https://docs.arduino.cc/software/plc-ide/tutorials/plc-ide-setup-license/#3-download-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](https://support.arduino.cc/hc/en-us/articles/16289852333212-Recover-an-Arduino-Opta-with-read-only-flash-memory), then repeat the steps above.
153+
Note that resetting the flash memory will remove the PLC IDE runtime. To continue using PLC IDE with your device, you need to [reinstall the runtime](https://docs.arduino.cc/software/plc-ide/tutorials/plc-ide-setup-license/#3-download-the-runtime).
154+
155+
---
156+
157+
## Troubleshooting
158+
159+
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](https://support.arduino.cc/hc/en-us/articles/16289852333212-Recover-an-Arduino-Opta-with-read-only-flash-memory), then partition the memory again.

0 commit comments

Comments
 (0)