We are facing a similar issue. The function Mcu_SetMode requires up to 40 ms to complete, and we call Mcu_InitClock beforehand.
Mcu_Init(&Mcu_Config);
Mcu_InitClock(McuClockSettingConfig_0);
while(MCU_PLL_LOCKED != Mcu_GetPllStatus())
{
/* Busy wait until the System PLL is locked */
}
Mcu_DistributePllClock();
Mcu_SetMode(McuModeSettingConf_0); /* Initialize Platform Driver */ Platform_Init(NULL_PTR);