File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ OTACloudProcessInterface::State STM32H7OTACloudProcess::flashOTA() {
85
85
// this sets the registries in RTC to load the firmware from the storage selected at the next reboot
86
86
STM32H747::writeBackupRegister (RTCBackup::DR0, 0x07AA );
87
87
STM32H747::writeBackupRegister (RTCBackup::DR1, STM32H747OTA::STORAGE_TYPE);
88
- STM32H747::writeBackupRegister (RTCBackup::DR2, data_offset );
88
+ STM32H747::writeBackupRegister (RTCBackup::DR2, STM32H747OTA::PARTITION );
89
89
STM32H747::writeBackupRegister (RTCBackup::DR3, _program_length);
90
90
91
91
return Reboot;
@@ -153,7 +153,7 @@ bool STM32H7OTACloudProcess::storageInit() {
153
153
}
154
154
}
155
155
156
- _bd = new mbed::MBRBlockDevice (_bd_raw_qspi, data_offset );
156
+ _bd = new mbed::MBRBlockDevice (_bd_raw_qspi, STM32H747OTA::PARTITION );
157
157
_fs = new mbed::FATFileSystem (" fs" );
158
158
err_mount = _fs->mount (_bd);
159
159
Original file line number Diff line number Diff line change 24
24
namespace STM32H747OTA {
25
25
/* External QSPI flash + MBR + FatFs */
26
26
static const uint32_t constexpr STORAGE_TYPE = ((1 << 2 ) | (1 << 5 ) | (1 << 7 ));
27
+ /* Default OTA partition */
28
+ static const uint32_t constexpr PARTITION = 2 ;
27
29
}
28
30
29
31
class STM32H7OTACloudProcess : public OTADefaultCloudProcessInterface {
@@ -67,7 +69,5 @@ class STM32H7OTACloudProcess: public OTADefaultCloudProcessInterface {
67
69
mbed::BlockDevice* _bd;
68
70
mbed::FATFileSystem* _fs;
69
71
70
- const uint32_t data_offset=2 ;
71
-
72
72
static const char UPDATE_FILE_NAME[];
73
73
};
You can’t perform that action at this time.
0 commit comments