1 /* 2 * Copyright (c) 2015, Freescale Semiconductor, Inc. 3 * Copyright 2016 NXP 4 * All rights reserved. 5 * 6 * SPDX-License-Identifier: BSD-3-Clause 7 */ 8 9 #include <stdio.h> 10 #include "pin_mux.h" 11 #include "board.h" 12 #include "clock_config.h" 13 BOARD_InitHardware(void)14void BOARD_InitHardware(void) 15 { 16 /* attach main clock divide to FLEXCOMM0 (debug console) */ 17 CLOCK_AttachClk(BOARD_DEBUG_UART_CLK_ATTACH); 18 19 BOARD_InitPins(); 20 21 /* Flash operations (erase, blank check, program) and reading single word can only be performed for CPU frequencies 22 of up to 100 MHz. Cannot be performed for frequencies above 100 MHz. */ 23 BOARD_BootClockFROHF96M(); 24 25 BOARD_InitDebugConsole(); 26 } 27 SystemInitHook(void)28void SystemInitHook(void) 29 { 30 SCB_NS->CPACR |= ((3UL << 0 * 2) | (3UL << 1 * 2)); /* set CP0, CP1 Full Access (enable PowerQuad) */ 31 32 BOARD_InitHardware(); 33 } 34