File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ void board_init(void) {
5757 __HAL_RCC_GPIOC_CLK_ENABLE ();
5858 __HAL_RCC_GPIOD_CLK_ENABLE ();
5959
60+ // Enable UART Clock
61+ UART_CLK_EN ();
62+
6063#if CFG_TUSB_OS == OPT_OS_NONE
6164 // 1ms tick timer
6265 SysTick_Config (SystemCoreClock / 1000 );
@@ -83,10 +86,7 @@ void board_init(void) {
8386 GPIO_InitStruct .Speed = GPIO_SPEED_FREQ_HIGH ;
8487 HAL_GPIO_Init (BUTTON_PORT , & GPIO_InitStruct );
8588
86- #ifdef UART_DEV
8789 // UART
88- UART_CLK_EN ();
89-
9090 GPIO_InitStruct .Pin = UART_TX_PIN | UART_RX_PIN ;
9191 GPIO_InitStruct .Mode = GPIO_MODE_AF_PP ;
9292 GPIO_InitStruct .Pull = GPIO_PULLUP ;
@@ -105,7 +105,6 @@ void board_init(void) {
105105 .Init .OverSampling = UART_OVERSAMPLING_16
106106 };
107107 HAL_UART_Init (& UartHandle );
108- #endif
109108
110109 // USB Pins
111110 // Configure USB DM and DP pins.
You can’t perform that action at this time.
0 commit comments