Hi, Bartek,
The following is the code of void BOARD_BootClockRUN(void), the CLOCK_BootToPeeMode() function configures the K22f in PLL mode which uses external crystal or clock source for the EXTAL/XTAL pins, I suppose that you use your own target board, which do not populate crystal or clock source on the EXTAL/XTAL pins. I suppose you use the code based on FRDM_K22F, on the board, a 8MHz crystal are connect to the EXTAL/XTAL pins.
If it is not your case, I am sorry.
BR
XiangJun Rong
void BOARD_BootClockRUN(void)
{
CLOCK_SetSimSafeDivs();
CLOCK_InitOsc0(&g_defaultClockConfigRun.oscConfig);
CLOCK_SetXtal0Freq(BOARD_XTAL0_CLK_HZ);
CLOCK_BootToPeeMode(g_defaultClockConfigRun.mcgConfig.oscsel, kMCG_PllClkSelPll0,
&g_defaultClockConfigRun.mcgConfig.pll0Config);
CLOCK_SetInternalRefClkConfig(g_defaultClockConfigRun.mcgConfig.irclkEnableMode,
g_defaultClockConfigRun.mcgConfig.ircs, g_defaultClockConfigRun.mcgConfig.fcrdiv);
CLOCK_SetSimConfig(&g_defaultClockConfigRun.simConfig);
SystemCoreClock = g_defaultClockConfigRun.coreClock;
}