mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-09 23:11:10 +00:00
fix(legacy): set STAY_IN_BOOTLOADER_FLAG before the reboot of intermediate_fw
This commit is contained in:
parent
8c6b93e0bd
commit
4f1274c9c4
@ -31,6 +31,7 @@
|
|||||||
#include "oled.h"
|
#include "oled.h"
|
||||||
#include "rng.h"
|
#include "rng.h"
|
||||||
#include "setup.h"
|
#include "setup.h"
|
||||||
|
#include "supervise.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
@ -86,6 +87,7 @@ static void __attribute__((noinline, section(".data"))) erase_firmware(void) {
|
|||||||
|
|
||||||
void __attribute__((noinline, noreturn, section(".data"))) reboot_device(void) {
|
void __attribute__((noinline, noreturn, section(".data"))) reboot_device(void) {
|
||||||
__disable_irq();
|
__disable_irq();
|
||||||
|
*STAY_IN_BOOTLOADER_FLAG_ADDR = STAY_IN_BOOTLOADER_FLAG;
|
||||||
SCB_AIRCR = SCB_AIRCR_VECTKEY | SCB_AIRCR_SYSRESETREQ;
|
SCB_AIRCR = SCB_AIRCR_VECTKEY | SCB_AIRCR_SYSRESETREQ;
|
||||||
while (1)
|
while (1)
|
||||||
;
|
;
|
||||||
|
Loading…
Reference in New Issue
Block a user