Skip to content

Commit c645010

Browse files
erasing flash before creating a new partitioning scheme
1 parent e33947b commit c645010

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ 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+
root.erase(0x0, root.get_erase_size());
68+
6369
mbed::MBRBlockDevice::partition(&root, 1, 0x0B, 0, 1024 * 1024);
6470
if(default_scheme) {
6571
mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 14 * 1024 * 1024, 14 * 1024 * 1024);

0 commit comments

Comments
 (0)