From ddf633eb99bb4b79f95223616cb6bdda375fddf8 Mon Sep 17 00:00:00 2001 From: Dylan Laduranty Date: Tue, 30 Aug 2022 20:56:44 +0200 Subject: [PATCH] bootloader/riotboot_dfu: move ztimer_init() prior to usbus start --- bootloaders/riotboot_dfu/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); }