/* * Copyright 2021 NXP * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ /*${header:start}*/ #include "pin_mux.h" #include "clock_config.h" #include "board.h" #include "fsl_power.h" /*${header:end}*/ /*${function:start}*/ void BOARD_InitHardware(void) { BOARD_InitBootPins(); if (BOARD_IS_XIP()) { BOARD_BootClockLPR(); CLOCK_EnableClock(kCLOCK_Otp); CLOCK_EnableClock(kCLOCK_Els); CLOCK_EnableClock(kCLOCK_ElsApb); RESET_PeripheralReset(kOTP_RST_SHIFT_RSTn); RESET_PeripheralReset(kELS_APB_RST_SHIFT_RSTn); } else { BOARD_InitBootClocks(); } BOARD_InitDebugConsole(); /* Reset GMDA */ RESET_PeripheralReset(kGDMA_RST_SHIFT_RSTn); /* Keep CAU sleep clock here. */ /* CPU1 uses Internal clock when in low power mode. */ POWER_ConfigCauInSleep(false); BOARD_InitSleepPinConfig(); } /*${function:end}*/