mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-14 16:46:23 +00:00
When using the watchdog (IWDG) to perform the cold reset, set the Key register to 'RELOAD' (0xAAAA) rather than 'START' (0xCCCC) to ensure that the reset is performed immediately rather than at the end of the current watchdog period (which might be 1 to 5s away). Replace the Key register special values by their symbolic constants. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=b:67081508 TEST=On ZerbleBarn using a STM32H7, run 'ectool reboot_ec cold' and see the MCU rebooting immediately rather than after 5s. Change-Id: Ib49c703e3ec973389e4d774eda53f3be7ec4dd2e Reviewed-on: https://chromium-review.googlesource.com/936764 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>