1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-03-12 22:26:08 +00:00

fix(core): fix jump to old bootloader

Initialize systick before jump, as the old bootloaders may not initialize systick on start and rely on systick running from boardloader or firmware. Only relevant for F4, otherwise we are jumping through reset.

[no changelog]

(cherry picked from commit 0536ed6f50)
This commit is contained in:
tychovrahe 2025-02-28 11:27:03 +01:00 committed by obrusvit
parent 0b5dbcae1b
commit a77f1f1a99

View File

@ -168,6 +168,10 @@ static void reboot_with_args_phase_2(uint32_t arg1, uint32_t arg2) {
if (command == BOOT_COMMAND_NONE) {
NVIC_SystemReset();
} else {
#ifndef FIXED_HW_DEINIT
SysTick_Config(HAL_RCC_GetSysClockFreq() / 1000U);
NVIC_SetPriority(SysTick_IRQn, 0);
#endif
jump_to_vectbl(BOOTLOADER_START + IMAGE_HEADER_SIZE, command);
}
#else