S32K312-StandBy Switching Clock Source

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

S32K312-StandBy Switching Clock Source

Jump to solution
802 Views
Simon_Liu
Contributor II

Hello

It is written in the chapter [47.6 Standby entry] of the S32K3xx Reference Manual that [Switching all MC_CGM muxes to FIRC with PCFS] and [Powering down all clock sources except FIRC] need to be done before entering StandBy mode. These two steps are in the function Power_Ip_SetMode Is it executed within?

0 Kudos
1 Solution
760 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@SimonLiu93

for your better understanding, I recommand you to take a look at the demo in the link below.

S32K3 Low Power Management AN and demos 

1. Yes, usually in order to reduce the power consumption in Standby Mode, we will turn off the clock of some peripherals and switch to FIRC clock, etc., so we will configure the clock separately for standby mode
2. You can check the function Clock_Ip_Init, I think it will switch the clock to the default state first, and then configure the clock of each module,i guess.

 

View solution in original post

6 Replies
788 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@SimonLiu93

You need to switch the FIRC clock before entering Standby Mode, for example:

/*!
 * @brief Set clock and other modules configuration before entering standby.
 *
 * This function sets system to target wakeup configuration; It sets the
 * clock, wakeup, and other modules registers for wakeup reqirement change.
 *
 * @return void
 *
 */
void Wkup_EnterStandby(void)
{
	printf("MCU will enter standby........ \n");

	/* Disable D-Cache, otherwise counter can not complete add */
	Wkup_sys_m7_cache_disable();

	Wkup_StandbyRAMECCInit();

	++RunStandbyCounter0;

	printf("MCU enter standby counter = %d .....\n", RunStandbyCounter0);
	printf("............................................................\n");

	/* Switch to FRIC clock */
	Clock_Ip_Init(&Clock_Ip_aClockConfig[1]);

	Wkup_Init();

#if (1 == WKUP_USE_FAST)
	/* Enable STANDBY IO configurations and Enter Standby Mode. Fast exit from standby after generating wake up event */
	Power_Ip_SetMode(&Power_Ip_aModeConfigPB[2]);
#else
	/* Enable STANDBY IO configurations and Enter Standby Mode. Normal exit from standby after generating wake up event */
	Power_Ip_SetMode(&Power_Ip_aModeConfigPB[1]);
#endif
}
773 Views
Simon_Liu
Contributor II

Hi @Senlent 

Hi@Selent

First of all, thank you for your answer.

For the example you gave I have the following questions:
1. How to configure Clock_Ip_aClockConfig[1] using S32 DS tool? Add a new (different from RUN mode) clock tree with FIRC as the clock source?
2. If the Clock_Ip_Init(&Clock_Ip_aClockConfig[0]) function has been used to configure the PLL clock in RUN mode, it is enough to call the function Clock_Ip_Init(&Clock_Ip_aClockConfig[1]) directly before entering StandBy, right? Do you not need to do other operations such as Disable the currently used clock?

0 Kudos
761 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@SimonLiu93

for your better understanding, I recommand you to take a look at the demo in the link below.

S32K3 Low Power Management AN and demos 

1. Yes, usually in order to reduce the power consumption in Standby Mode, we will turn off the clock of some peripherals and switch to FIRC clock, etc., so we will configure the clock separately for standby mode
2. You can check the function Clock_Ip_Init, I think it will switch the clock to the default state first, and then configure the clock of each module,i guess.

 

749 Views
Simon_Liu
Contributor II

Hi @Senlent 

Thanks, I see that the examples in the link you gave are all for K344 and K324. Are these examples also applicable to S32K312?

I found an example [Power_Ip_Example_S32K312] in other SDKs, there is no relevant setting for Last Mile Regulator in the POWER component.

0 Kudos
724 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@SimonLiu93

1.I mean you can refer to these demo, the process is same

2.please refer to S32K3xx Reference Manual, Rev. 6

Chapter:44.4 Block diagram

VDD_HV_B and V15 not present in S32K312 and S32K311

0 Kudos
719 Views
Simon_Liu
Contributor II

Hi @Senlent 

Thank you for your reply, I understand now, I will refer to these examples for the process

0 Kudos