【简介】
S32K3 系列的MCU 支持两种Standby 模式,Fast Standby 和 Normal Standby 模式,两种模式的主要区别是Fast Standby 模式会halt HSE core。

以下是启动时序中对 fast standby 的说明

以下是 Fast Standby 的唤醒流程说明

从上图可知芯片被唤醒后DCMRWF5[0] 的寄存器状态如果是Fast Standby 模式,则Release FIRC 的时钟从DCMRWF[31:1] 的地址来启动CM7_0,完成唤醒的动作。
DCMRWF5 寄存器描述如下:

从上述寄存器配置可知 Fast Standby 唤醒,我们需要配置BOOT_MODE 为Fast Standby,并配置BOOT_ADDRESS 我们可以在S32DS 中配置此信息。

上述配置生成代码后会产生如下的配置结构配置为 Fast Standby 模式。

在DCM_GPR 的配置中可以看到我们配置的地址信息。

软件在进入休眠时调用 Power_Ip_SetMode 接口函数将配置结构作为入参传入即可完成 Fast Standby 的配置,函数中对 DCMRWF5 寄存器的配置流程如下:
Power_Ip_SetMode
-> Power_Ip_PrepareSocStandby
->Power_Ip_DCM_GPR_Config
/**
* @brief This function configure the Device Configuration Module General-Purpose Registers
* @details Control to bypass the SIRC trimming, PMC trimming and RGM DCF loading, FIRC trimming
* DCM scanning on standby exit.
*
* @param[in] ConfigPtr Pointer to DCM_GPR configuration structure.
*
* @return void
*
*/
void Power_Ip_DCM_GPR_Config(const Power_Ip_DCM_GPR_ConfigType * ConfigPtr)
{
(void)ConfigPtr;
uint32 TempValue = 0U;
if(TRUE == ConfigPtr->DcmGprUnderMcuControl)
{
/* Check the boot mode is Fast Standby */
if(1U == ConfigPtr->BootMode)
{
/* Set Vector table address and Enable Fast Standby Exit */
IP_DCM_GPR->DCMRWF5 = (ConfigPtr->BootAddress) | (uint32)(ConfigPtr->BootMode) ;
}
/* Set bypassed or not bypassed for the SIRC trimming, PMC trimming and RGM DCF loading, FIRC trimming DCM scanning */
TempValue = IP_DCM_GPR->DCMRWF2;
TempValue &= ~((uint32)((uint32)DCM_GPR_DCMRWF2_SIRC_TRIM_BYP_STDBY_EXT_MASK | (uint32)DCM_GPR_DCMRWF2_PMC_TRIM_RGM_DCF_BYP_STDBY_EXT_MASK | (uint32)DCM_GPR_DCMRWF2_FIRC_TRIM_BYP_STDBY_EXT_MASK | (uint32)DCM_GPR_DCMRWF2_DCM_SCAN_BYP_STDBY_EXT_MASK));
TempValue |= (ConfigPtr->ConfigRegister);
IP_DCM_GPR->DCMRWF2 = TempValue;
}
}
我要赚赏金
