stm32l4 dfumode: move initialization point of bootloader jump instruction to correct place

This commit is contained in:
Matias Nitsche 2020-06-20 16:07:41 -03:00 committed by Alan Carvalho de Assis
parent d1c538b65c
commit c26521c38f

View File

@ -142,7 +142,7 @@ static inline void apb_reset(void)
void stm32l4_dfumode(void)
{
uint32_t regval;
boot_call_t boot = (boot_call_t)(*(uint32_t *)0x1fff0004);
boot_call_t boot;
#ifdef CONFIG_DEBUG_WARN
_warn("Entering DFU mode...\n");
@ -170,6 +170,7 @@ void stm32l4_dfumode(void)
/* jump into ROM */
boot = (boot_call_t)(*(uint32_t *)0x1fff0004);
boot();
while (true);