Skip to content

Commit

Permalink
Merge pull request RIOT-OS#18538 from dylad/pr/riotboot_dfu/early_zti…
Browse files Browse the repository at this point in the history
…mer_init

bootloader/riotboot_dfu: move ztimer_init() prior to usbus start
  • Loading branch information
maribu authored Aug 31, 2022
2 parents a17442c + ddf633e commit 1ddb5ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bootloaders/riotboot_dfu/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ 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);

if (slot != -1 && !_bootloader_alternative_mode()) {
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);
}
Expand Down

0 comments on commit 1ddb5ac

Please sign in to comment.