File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ OTACloudProcessInterface::State STM32H7OTACloudProcess::flashOTA() {
8383 storageClean ();
8484
8585 // this sets the registries in RTC to load the firmware from the storage selected at the next reboot
86- STM32H747::writeBackupRegister (RTCBackup::DR0, 0x07AA );
86+ STM32H747::writeBackupRegister (RTCBackup::DR0, STM32H747OTA::MAGIC );
8787 STM32H747::writeBackupRegister (RTCBackup::DR1, STM32H747OTA::STORAGE_TYPE);
8888 STM32H747::writeBackupRegister (RTCBackup::DR2, STM32H747OTA::PARTITION);
8989 STM32H747::writeBackupRegister (RTCBackup::DR3, _program_length);
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ namespace STM32H747OTA {
2626 static const uint32_t constexpr STORAGE_TYPE = ((1 << 2 ) | (1 << 5 ) | (1 << 7 ));
2727 /* Default OTA partition */
2828 static const uint32_t constexpr PARTITION = 2 ;
29+ /* OTA Magic number */
30+ static const uint32_t constexpr MAGIC = 0x07AA ;
2931}
3032
3133class STM32H7OTACloudProcess : public OTADefaultCloudProcessInterface {
You can’t perform that action at this time.
0 commit comments