We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d79280a commit 418d5c6Copy full SHA for 418d5c6
src/ota/implementation/OTASTM32H7.cpp
@@ -83,6 +83,8 @@ OTACloudProcessInterface::State STM32H7OTACloudProcess::flashOTA() {
83
return OtaStorageOpenFail;
84
}
85
86
+ storageClean();
87
+
88
// this sets the registries in RTC to load the firmware from the storage selected at the next reboot
89
STM32H747::writeBackupRegister(RTCBackup::DR0, 0x07AA);
90
STM32H747::writeBackupRegister(RTCBackup::DR1, storage);
@@ -113,7 +115,9 @@ void STM32H7OTACloudProcess::storageClean() {
113
115
DEBUG_VERBOSE(F("storage clean"));
114
116
117
if(decompressed != nullptr) {
- fclose(decompressed);
118
+ int res = fclose(decompressed);
119
+ DEBUG_VERBOSE("error on fclose %d", res);
120
121
decompressed = nullptr;
122
123
0 commit comments