blob: 276c1e6ddb4f4af9aea0b84c593aec15f67ebd74 [file] [log] [blame]
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2020 Linumiz
* Author: Parthiban Nallathambi <parthiban@linumiz.com>
*
*/
#include <kernel.h>
#include <init.h>
#include <soc.h>
#define PMU_FLASH_WS (0x3U)
void z_arm_platform_init(void)
{
uint32_t temp;
/* setup flash wait state */
temp = FLASH0->FCON;
temp &= ~FLASH_FCON_WSPFLASH_Msk;
temp |= PMU_FLASH_WS;
FLASH0->FCON = temp;
/* configure PLL & system clock */
SystemCoreClockSetup();
}