arduino/mcuboot-arduino-stm32h7

Don't clear Reset Source Register on boot

mkj opened this issue · 4 comments

mkj commented

This bootloader (and the standard Portenta H7 one) clears the RSR so it isn't possible for subsequent programs to check the reset reason. Could it be changed to keep the reset source register intact? Thanks.

if (ResetReason::get() == RESET_REASON_PIN_RESET) {

Hi @mkj, thanks for the report.
I've just had a quick look and i think that it can be done calling directly the mbed-os hal function from the bootloader. I will give it a try and let you know.

@mkj storing the reset reason somewhere else, like in an RTC register, would be an acceptable solution?

@pennam any news on this issue? i have a board getting rebooted, and i would like to address the reset cause