We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa71482 commit 9dc4de1Copy full SHA for 9dc4de1
src/ota/implementation/OTASTM32H7.cpp
@@ -75,13 +75,15 @@ OTACloudProcessInterface::State STM32H7OTACloudProcess::startOTA() {
75
76
77
OTACloudProcessInterface::State STM32H7OTACloudProcess::flashOTA() {
78
- storageClean();
+ fclose(decompressed);
79
80
/* Schedule the firmware update. */
81
if(!storageOpen()) {
82
return OtaStorageOpenFail;
83
}
84
85
+ storageClean();
86
+
87
// this sets the registries in RTC to load the firmware from the storage selected at the next reboot
88
STM32H747::writeBackupRegister(RTCBackup::DR0, 0x07AA);
89
STM32H747::writeBackupRegister(RTCBackup::DR1, storage);
0 commit comments