Skip to content

Commit 0d1f2af

Browse files
authored
Merge pull request #455 from arduino/fix_qspi_format
QSPIFormat.ino: Fix partition scheme and partition 3 resizing
2 parents 9eeba8d + 64f74c7 commit 0d1f2af

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino

+5-5
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ void setup() {
4747
Serial.println("Available partition schemes:");
4848
Serial.println("\nPartition scheme 1");
4949
Serial.println("Partition 1: WiFi firmware and certificates 1MB");
50-
Serial.println("Partition 2: OTA and user data 14MB");
50+
Serial.println("Partition 2: OTA and user data 13MB");
5151
Serial.println("\nPartition scheme 2");
5252
Serial.println("Partition 1: WiFi firmware and certificates 1MB");
5353
Serial.println("Partition 2: OTA 5MB");
54-
Serial.println("Partition 3: User data 9MB"),
54+
Serial.println("Partition 3: User data 8MB"),
5555
Serial.println("\nDo you want to use partition scheme 1? Y/[n]");
5656
Serial.println("If No, partition scheme 2 will be used.");
5757
bool default_scheme = waitResponse();
@@ -62,12 +62,12 @@ void setup() {
6262
if (true == waitResponse()) {
6363
mbed::MBRBlockDevice::partition(&root, 1, 0x0B, 0, 1024 * 1024);
6464
if(default_scheme) {
65-
mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 6 * 1024 * 1024, 0);
65+
mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 14 * 1024 * 1024, 14 * 1024 * 1024);
6666
mbed::MBRBlockDevice::partition(&root, 2, 0x0B, 1024 * 1024, 14 * 1024 * 1024);
6767
// use space from 15.5MB to 16 MB for another fw, memory mapped
6868
} else {
69-
mbed::MBRBlockDevice::partition(&root, 2, 0x0B, 1024 * 1024, 5 * 1024 * 1024);
70-
mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 6 * 1024 * 1024, 9 * 1024 * 1024);
69+
mbed::MBRBlockDevice::partition(&root, 2, 0x0B, 1024 * 1024, 6 * 1024 * 1024);
70+
mbed::MBRBlockDevice::partition(&root, 3, 0x0B, 6 * 1024 * 1024, 14 * 1024 * 1024);
7171
// use space from 15.5MB to 16 MB for another fw, memory mapped
7272
}
7373

0 commit comments

Comments
 (0)