Skip to content

Commit

Permalink
erasing flash before creating a new partitioning scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
andreagilardoni committed Sep 23, 2024
1 parent e33947b commit 5ba8c67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ void setup() {
Serial.println("Do you want to proceed? Y/[n]");

if (true == waitResponse()) {
if (root.init() != QSPIF_BD_ERROR_OK) {
Serial.println(F("Error: QSPI init failure."));
return;
}

root.erase(0, root.size());
mbed::MBRBlockDevice::partition(&root, 1, 0x0B, 0, 1024 * 1024);
if(default_scheme) {
mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 14 * 1024 * 1024, 14 * 1024 * 1024);
Expand Down

0 comments on commit 5ba8c67

Please sign in to comment.