diff --git a/bootloaders/riotboot_dfu/main.c b/bootloaders/riotboot_dfu/main.c index 26dd2bf64f..e8be5935de 100644 --- a/bootloaders/riotboot_dfu/main.c +++ b/bootloaders/riotboot_dfu/main.c @@ -64,6 +64,9 @@ void kernel_init(void) } } + /* Init ztimer before starting DFU mode */ + ztimer_init(); + /* Flash the unused slot if magic word is set */ riotboot_usb_dfu_init(0); @@ -71,9 +74,6 @@ void kernel_init(void) riotboot_slot_jump(slot); } - /* Init ztimer before starting DFU mode */ - ztimer_init(); - /* Nothing to boot, stay in DFU mode to flash a slot */ riotboot_usb_dfu_init(1); }