Skip to content

Commit ea25933

Browse files
erasing MBR table before creating a new partitioning scheme
1 parent 53a89c3 commit ea25933

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino

+7
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ void setup() {
6060
Serial.println("Do you want to proceed? Y/[n]");
6161

6262
if (true == waitResponse()) {
63+
if (root.init() != QSPIF_BD_ERROR_OK) {
64+
Serial.println(F("Error: QSPI init failure."));
65+
return;
66+
}
67+
68+
root.erase(0x0, root.get_erase_size());
69+
6370
mbed::MBRBlockDevice::partition(&root, 1, 0x0B, 0, 1024 * 1024);
6471
if(default_scheme) {
6572
mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 14 * 1024 * 1024, 14 * 1024 * 1024);

0 commit comments

Comments
 (0)