MCAL代码中对于时钟的配置调用Mcu_InitClock()接口即可,然后等待锁相环稳定,最后进行时钟分配。
Mcu_Init(&Mcu_Config);
InitClockRetVal = Mcu_InitClock(McuConf_McuClockSettingConfig_McuClockSettingConfig_0);
if(InitClockRetVal == E_OK)
{
do
{
Mcu_GetPllStatusRetVal = Mcu_GetPllStatus ();
} while(Mcu_GetPllStatusRetVal != MCU_PLL_LOCKED);
#if (MCU_DISTRIBUTE_PLL_CLOCK_API == STD_ON)
Mcu_DistributePllClock ();
#endif
}
|