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

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

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

Jump to solution
1,727 Views
wuxianlong
Senior Contributor I

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

0 Kudos
Reply
1 Solution
552 Views
wuxianlong
Senior Contributor I

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

View solution in original post

0 Kudos
Reply
4 Replies
1,711 Views
DanNguyenDuy
NXP Employee
NXP Employee

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 

0 Kudos
Reply
575 Views
thorben_kamp
Contributor II

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);
 
Tags (3)
0 Kudos
Reply
553 Views
wuxianlong
Senior Contributor I

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

0 Kudos
Reply
348 Views
thorben_kamp
Contributor II
Thanks 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?
0 Kudos
Reply