1 /* 2 * Copyright 2017-2018 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 "board.h" 12 13 /******************************************************************************* 14 * Variables 15 ******************************************************************************/ 16 17 /******************************************************************************* 18 * Code 19 ******************************************************************************/ 20 /* Initialize debug console. */ BOARD_InitDebugConsole(void)21void BOARD_InitDebugConsole(void) 22 { 23 /* attach 12 MHz clock to FLEXCOMM0 (debug console) */ 24 CLOCK_AttachClk(BOARD_DEBUG_UART_CLK_ATTACH); 25 26 RESET_ClearPeripheralReset(BOARD_DEBUG_UART_RST); 27 28 uint32_t uartClkSrcFreq = BOARD_DEBUG_UART_CLK_FREQ; 29 30 DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE, BOARD_DEBUG_UART_BAUDRATE, BOARD_DEBUG_UART_TYPE, uartClkSrcFreq); 31 } 32