diff --git a/core/embed/boardloader/main.c b/core/embed/boardloader/main.c index 850d2fca34..ab19163349 100644 --- a/core/embed/boardloader/main.c +++ b/core/embed/boardloader/main.c @@ -166,9 +166,7 @@ static secbool copy_sdcard(void) { } int main(void) { - if (sectrue != reset_flags_check()) { - return 1; - } + reset_flags_reset(); // need the systick timer running before many HAL operations. // want the PVD enabled before flash operations too. diff --git a/core/embed/trezorhal/lowlevel.c b/core/embed/trezorhal/lowlevel.c index 9129aa8e12..3cda602169 100644 --- a/core/embed/trezorhal/lowlevel.c +++ b/core/embed/trezorhal/lowlevel.c @@ -176,8 +176,9 @@ secbool reset_flags_check(void) { return secfalse; } #endif - - RCC->CSR |= RCC_CSR_RMVF; // clear the reset flags - return sectrue; } + +void reset_flags_reset(void) { + RCC->CSR |= RCC_CSR_RMVF; // clear the reset flags +} diff --git a/core/embed/trezorhal/lowlevel.h b/core/embed/trezorhal/lowlevel.h index efadaf0d5e..df154dba65 100644 --- a/core/embed/trezorhal/lowlevel.h +++ b/core/embed/trezorhal/lowlevel.h @@ -30,5 +30,6 @@ uint32_t flash_set_option_bytes(void); secbool flash_configure_option_bytes(void); void periph_init(void); secbool reset_flags_check(void); +void reset_flags_reset(void); #endif // __TREZORHAL_LOWLEVEL_H__