Hi ,
I am working with the NXP S32K344 board and have implemented a low-power sleep mode with wake-up functionality. However, I am encountering an issue where the system resets after waking up from sleep when I attempt to change the clock configuration back to normal.
Below is the code for entering sleep mode and the wake-up routine:
Entering Sleep Mode:
void Wkup_EnterStandby(void)
{
/* Switch to FRIC clock */
Clock_Ip_Init(&Clock_Ip_aClockConfig[1]);
/* Disabling all Interrupts */
DisableAllInterrupts();
/* Enabling wakeup Event */
Wkup_Config();
/******* LOW POWER DEBUG MODE *******/
/* Disable POR_WDG */
IP_DCM_GPR->DCMRWP1 |= DCM_GPR_DCMRWP1_STANBDY_PWDOG_DIS_MASK;
/* Enable STANDBY IO configurations and enter Standby Mode */
Power_Ip_SetMode(&Power_Ip_aModeConfigPB[1]);
/* Enabling all Interrupts */
EnableAllInterrupts();
}
Wake-up Routine:
void Wakeup_rotine(void)
{
// If we are coming from sleep mode, switch to run mode clocks
Clock_Ip_Init(&Clock_Ip_aClockConfig[0]); // Run mode clock configuration
// Initialize Interrupts
Intr_init();
// Initialize required modules
Can_Setup();
FlexCAN_Ip_RxFifo(INST_FLEXCAN_0, &rxFifoData);
}
Issue: When I attempt to change the clock configuration to normal after waking up, the system resets. Please provide guidance or suggestions on what might be causing this issue.