Skip to content

Commit 93608fa

Browse files
authored
QSPIFormat : stop execution if error occurs
1 parent e4e06e4 commit 93608fa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino

+3
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,13 @@ void setup() {
7474
int err = wifi_data_fs.reformat(&wifi_data);
7575
if (err) {
7676
Serial.println("Error formatting WiFi partition");
77+
return;
7778
}
7879

7980
err = ota_data_fs.reformat(&ota_data);
8081
if (err) {
8182
Serial.println("Error formatting OTA partition");
83+
return;
8284
}
8385

8486
if(!default_scheme) {
@@ -96,6 +98,7 @@ void setup() {
9698
err = user_data_fs->reformat(&user_data);
9799
if (err) {
98100
Serial.println("Error formatting user partition");
101+
return;
99102
}
100103
}
101104
Serial.println("\nQSPI Flash formatted!");

0 commit comments

Comments
 (0)