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() {
8585 // this sets the registries in RTC to load the firmware from the storage selected at the next reboot
8686 STM32H747::writeBackupRegister (RTCBackup::DR0, 0x07AA );
8787 STM32H747::writeBackupRegister (RTCBackup::DR1, STM32H747OTA::STORAGE_TYPE);
88- STM32H747::writeBackupRegister (RTCBackup::DR2, data_offset );
88+ STM32H747::writeBackupRegister (RTCBackup::DR2, STM32H747OTA::PARTITION );
8989 STM32H747::writeBackupRegister (RTCBackup::DR3, _program_length);
9090
9191 return Reboot;
@@ -153,7 +153,7 @@ bool STM32H7OTACloudProcess::storageInit() {
153153 }
154154 }
155155
156- _bd = new mbed::MBRBlockDevice (_bd_raw_qspi, data_offset );
156+ _bd = new mbed::MBRBlockDevice (_bd_raw_qspi, STM32H747OTA::PARTITION );
157157 _fs = new mbed::FATFileSystem (" fs" );
158158 err_mount = _fs->mount (_bd);
159159
Original file line number Diff line number Diff line change 2424namespace STM32H747OTA {
2525 /* External QSPI flash + MBR + FatFs */
2626 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 ;
2729}
2830
2931class STM32H7OTACloudProcess : public OTADefaultCloudProcessInterface {
@@ -67,7 +69,5 @@ class STM32H7OTACloudProcess: public OTADefaultCloudProcessInterface {
6769 mbed::BlockDevice* _bd;
6870 mbed::FATFileSystem* _fs;
6971
70- const uint32_t data_offset=2 ;
71-
7272 static const char UPDATE_FILE_NAME[];
7373};
You can’t perform that action at this time.
0 commit comments