Skip to content

Commit 12ed482

Browse files
andreagilardonipennam
authored andcommitted
erasing MBR table before creating a new partitioning scheme
1 parent 35c5c0e commit 12ed482

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino

+6
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ void setup() {
5555
Serial.println("Do you want to proceed? Y/[n]");
5656

5757
if (true == waitResponse()) {
58+
if (root->init() != BD_ERROR_OK) {
59+
Serial.println(F("Error: QSPI init failure."));
60+
return;
61+
}
62+
63+
root->erase(0x0, root->get_erase_size());
5864
MBRBlockDevice::partition(root, 1, 0x0B, 0, 1 * 1024 * 1024);
5965
MBRBlockDevice::partition(root, 2, 0x0B, 1 * 1024 * 1024, 6 * 1024 * 1024);
6066
MBRBlockDevice::partition(root, 3, 0x0B, 6 * 1024 * 1024, 7 * 1024 * 1024);

0 commit comments

Comments
 (0)