Hi, Any one please help me with low power S32K3xx.
MCU seem to be going in low power mode, but at wakeup as soon as taskEXIT_CRITICAL is executed the control jumps to hardfault.
Below are the steps I am following from a freeRTOS Task:-
// Enter critical section to prevent task switches
taskENTER_CRITICAL();
// Ensure all previous data operations are complete
MCAL_DATA_SYNC_BARRIER();
// Set the RTC alarm for the low power wakeup callback
RTCSetAlarm(10, lowPowerWakeUpCallback);
// Suspend all tasks to ensure safe transition
vTaskSuspendAll();
// Set the device to low power mode
Power_Ip_SetMode(&lowPowerConfig[0]);
// Ensure that all previous operations are completed before further instructions
MCAL_DATA_SYNC_BARRIER();
// Ensure the instruction pipeline is flushed to account for any configuration changes
MCAL_INSTRUCTION_SYNC_BARRIER();
Clock_Ip_InitClock(&Clock_Ip_aClockConfig[0]);
// Resume all tasks after low power mode transition
xTaskResumeAll();
// Exit the critical section
taskEXIT_CRITICAL();