Closed zvecr closed 1 year ago
Slight complication on the implementation compared to F4 as HAL_FLASH_OB_Launch resets the MCU. Without specific logic to handle this case the self-updater gets into a bit of a spin.
HAL_FLASH_OB_Launch
board_flash_protect_bootloader(false)
board_flash_protect_bootloader(true)
Catching the reset reason allows the bootloader to re-run the self-updater with the now unlocked write protection.
Anything I can do to move this PR along?
ah sorry for late response, I will pick this up and do some testing soon enough.
Description of Change
Slight complication on the implementation compared to F4 as
HAL_FLASH_OB_Launch
resets the MCU. Without specific logic to handle this case the self-updater gets into a bit of a spin.board_flash_protect_bootloader(false)
board_flash_protect_bootloader(true)
Catching the reset reason allows the bootloader to re-run the self-updater with the now unlocked write protection.