1 /*
2  * Copyright 2023 NXP
3  * All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #include <stdint.h>
9 #include "fsl_common.h"
10 #include "fsl_debug_console.h"
11 #include "pin_mux.h"
12 #include "board.h"
13 
14 /*******************************************************************************
15  * Variables
16  ******************************************************************************/
17 
18 /*******************************************************************************
19  * Code
20  ******************************************************************************/
21 
22 /* Initialize debug console. */
BOARD_InitDebugConsole(void)23 void BOARD_InitDebugConsole(void)
24 {
25     /* attach 12 MHz clock to LPUART0 (debug console) */
26     CLOCK_SetClockDiv(kCLOCK_DivLPUART0, 1u);
27     CLOCK_AttachClk(BOARD_DEBUG_UART_CLK_ATTACH);
28 
29     RESET_PeripheralReset(BOARD_DEBUG_UART_RST);
30 
31     DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE, BOARD_DEBUG_UART_BAUDRATE, BOARD_DEBUG_UART_TYPE,
32                     BOARD_DEBUG_UART_CLK_FREQ);
33 }
34