Hi,
I am working on an 2Wheeler Ev project that will be operating NXP S32K322 Cortex_M7_0.
I am trying to implement power saving feature for the project.
Now one difficulty I am facing to reduce current in uA , currently the current consumption
is around 6-9mA when configured Core standby mode with below configuration.








void PowerDeInitResources(void)
{
GPIOWritePin (KEYLESS_PWR_OUT_PORT, KEYLESS_PWR_OUT_PIN, (SysState_t) SYS_SET);
AppSuspendTasks ();
bleEnterSleepMode ();
SPIDeInit (0);
I2CDeInit ();
while (SYS_SUCCESS != ModemEnterSleepMode ());
GPIOWritePin(V4_LDO_DIS_PIN_PORT, V4_LDO_DIS_PIN_PIN, SYS_ON);
UARTDeInit (0);
UARTDeInit (1);
UARTDeInit (2);
CAN3EnableLisentOnlyMode ();
GPIOWritePin (BLE_RESET_PORT, BLE_RESET_PIN, SYS_OFF);
Dma_Ip_Deinit();
GPIOWritePin(LTE_POWER_KEY_PORT, LTE_POWER_KEY_PIN, SYS_OFF);
GPIOWritePin (HSD_8CH_IDLE_OUT_PORT, HSD_8CH_IDLE_OUT_PIN, (SysState_t) SYS_OFF);
//GPIOWritePin(MOTOR_IGNITION_ENABLE_OUT_PORT, MOTOR_IGNITION_ENABLE_OUT_PIN,SYS_RESET);
GPIOWritePin(AUX_BATT_CHARGE_ENABLE_OUT_PORT, AUX_BATT_CHARGE_ENABLE_OUT_PIN,SYS_OFF);
//Does doing below things helps to reduce lekage current throug gpio ?
Siul2_Port_Ip_RevertPinConfiguration(CAN3_TX_PIN_PORT, CAN3_TX_PIN_PIN);
Siul2_Port_Ip_RevertPinConfiguration(SPI2_SIN_PORT, SPI2_SIN_PIN);
Siul2_Port_Ip_RevertPinConfiguration(SPI2_SOUT_PORT, SPI2_SOUT_PIN);
Siul2_Port_Ip_RevertPinConfiguration(SPI2_SCK_PORT, SPI2_SCK_PIN);
Siul2_Port_Ip_RevertPinConfiguration(SPI2_SIN_PORT, SPI2_SIN_PIN);
Siul2_Port_Ip_RevertPinConfiguration(SPI2_SOUT_PORT, SPI2_SOUT_PIN);
Siul2_Port_Ip_RevertPinConfiguration(SPI2_SCK_PORT, SPI2_SCK_PIN);
Siul2_Port_Ip_RevertPinConfiguration(UART0_TX_PORT, UART0_TX_PIN);
C40_Ip_Abort();
}
void PowerEnterLowPowerMode(uint32_t interval, bool_t useIntervalWakeup, PowerWakeupCallback_t p_UserWakeUpCallback )
{
if (SYS_FALSE == isLowPower)
{
p_UserWakeUpCallback = p_UserWakeUpCallback;
if (SYS_TRUE == useIntervalWakeup)
{
lowPowerIntervalSec = interval;
RTCSetAlarm(lowPowerIntervalSec, wakeupCallback);
}
isLowPower = SYS_TRUE;
Power_Ip_CM7_EnableSleepOnExit();
Power_Ip_CM7_EnableDeepSleep();
Power_Ip_SetMode(&Power_Ip_aModeConfigPB[1]); // this is th configuration represent in the snapshot
}
else
{
//Do Nothing
}
}