Skip to content

Commit

Permalink
board: make sure uart for usb link is initialized early
Browse files Browse the repository at this point in the history
This fixes broken startup sequence for boards with usb links
  • Loading branch information
paradajz committed Jun 25, 2023
1 parent edb3d63 commit bf1eb5a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/firmware/board/src/common/Setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit bf1eb5a

Please sign in to comment.