1599539_en-US

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

1599539_en-US

1599539_en-US

[S32K3_MCAL_API] Mcu_SetMode() take up a lot of time

Hi,all
    
      We need to set up CAN Bus  quickly, but Mcu_SetMode() is taking up a lot of time( 85 ~ 120 ms).
      Can I optimize the configuration of Mcu_SetMode? Or some other solution?


time.png
BRs,

xianlong

Re: [S32K3_MCAL_API] Mcu_SetMode() take up a lot of time

Hi, 

The following two do not need to be checked. There are also some other questions, which can be referred to this.

S32K3 functional reset causes increased start-up time 
image.png
Best Regaeds,
xianlong

Re: [S32K3_MCAL_API] Mcu_SetMode() take up a lot of time

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);
 
Re: [S32K3_MCAL_API] Mcu_SetMode() take up a lot of time

Hi @wuxianlong,

Before call Mcu_SetMode, you should call Mcu_InitClock() to change clocks to the correct values with the mode that needs to change as described details in the Reference manual.

At the moment, I have only this proposal.

Best regards,

Dan 

Re: [S32K3_MCAL_API] Mcu_SetMode() take up a lot of timeThanks for your response.

I noticed that the duration is reduced to about 20 ms when I change this setting. If I also uncheck CM7_1 and CM7_2 under MCU control, the duration drops further to less than 1 ms.

What impact does this configuration have on the rest of the software? Are there any side effects or dependencies I should be aware of when removing these cores from MCU control?
Tags (1)
No ratings
Version history
Last update:
‎04-08-2026 03:35 AM
Updated by: