From bf1eb5a00666610ac9097ebe53c10b291cb898c2 Mon Sep 17 00:00:00 2001 From: paradajz <2544094+paradajz@users.noreply.github.com> Date: Sun, 25 Jun 2023 16:38:31 +0200 Subject: [PATCH] board: make sure uart for usb link is initialized early This fixes broken startup sequence for boards with usb links --- src/firmware/board/src/common/Setup.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/firmware/board/src/common/Setup.cpp b/src/firmware/board/src/common/Setup.cpp index 6eb87465c..de4e02113 100644 --- a/src/firmware/board/src/common/Setup.cpp +++ b/src/firmware/board/src/common/Setup.cpp @@ -179,13 +179,14 @@ namespace board { core::mcu::init(core::mcu::initType_t::APP); core::mcu::timers::init(); - detail::io::init(); - detail::io::indicators::indicateApplicationLoad(); #ifdef PROJECT_TARGET_USB_OVER_SERIAL board::uart::init(PROJECT_TARGET_UART_CHANNEL_USB_LINK, board::detail::usb::USB_OVER_SERIAL_BAUDRATE); #endif + detail::io::init(); + detail::io::indicators::indicateApplicationLoad(); + #ifdef PROJECT_TARGET_USB_OVER_SERIAL_DEVICE // do not proceed with application load until usb link is ready waitUsbLink();