1 /* 2 * Copyright (c) 2015, Freescale Semiconductor, Inc. 3 * Copyright 2016-2017 NXP 4 * All rights reserved. 5 * 6 * SPDX-License-Identifier: BSD-3-Clause 7 */ 8 9 #include <stdint.h> 10 #include "board.h" 11 #include "fsl_debug_console.h" 12 #include "fsl_common.h" 13 14 /******************************************************************************* 15 * Variables 16 ******************************************************************************/ 17 18 /******************************************************************************* 19 * Code 20 ******************************************************************************/ 21 /* Initialize debug console. */ BOARD_InitDebugConsole(void)22void BOARD_InitDebugConsole(void) 23 { 24 uint32_t uartClkSrcFreq; 25 /* SIM_SOPT2[27:26]: 26 * 00: Clock Disabled 27 * 01: IRC48M 28 * 10: OSCERCLK 29 * 11: MCGIRCCLK 30 */ 31 CLOCK_SetLpsci0Clock(1); 32 33 uartClkSrcFreq = BOARD_DEBUG_UART_CLK_FREQ; 34 DbgConsole_Init(BOARD_DEBUG_UART_BASEADDR, BOARD_DEBUG_UART_BAUDRATE, BOARD_DEBUG_UART_TYPE, uartClkSrcFreq); 35 } 36