Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a831fd2

Browse files
committed
QSPIFormat: add option to perform a full erase
1 parent 752c1e9 commit a831fd2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,14 @@ void setup() {
7878
return;
7979
}
8080

81-
root->erase(0x0, root->get_erase_size());
81+
Serial.println("Do you want to perform a full erase of the QSPI flash before proceeding? Y/[n]");
82+
if (true == waitResponse()) {
83+
root->erase(0x0, root->size());
84+
} else {
85+
// Erase only the first sector containing the MBR
86+
root->erase(0x0, root->get_erase_size());
87+
}
88+
8289
MBRBlockDevice::partition(root, 1, 0x0B, 0, 1 * 1024 * 1024);
8390
MBRBlockDevice::partition(root, 2, 0x0B, 1 * 1024 * 1024, 6 * 1024 * 1024);
8491
MBRBlockDevice::partition(root, 3, 0x0B, 6 * 1024 * 1024, 7 * 1024 * 1024);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /