,according to Datasheert,the and the current consumption it is 21mA,and following Code which the current consumption it is 4mA,it should be less than 1mA.
how to further reduce the current consumption by the controller?
And also how to disable the clock monitors?
And if possible also let me know how to come to normal RUN mode through CAN
Please point out my configuration errors or missing areas
void power_cp_wakeup_set(void)/*E5*/
{
PINS_DRV_SetPinIntSel(GPIO_CP_WAKE_PORT,GPIO_CP_WAKE_PIN,PORT_INT_RISING_EDGE);
}
void init_NVIC(void)
{
power_cp_wakeup_set();
INT_SYS_ClearPending(PORTE_IRQn);
INT_SYS_SetPriority(PORTE_IRQn, 0);
// PORTE_interrupt
S32_NVIC-> ICPR [1] = (1 <<(63%32));
S32_NVIC-> ISER [1] = (1 <<(63%32));
S32_NVIC-> IP [63] = 0x10;
PORTE-> DFER |= (1 << 5);
}
void Power_RUN_to_STOP (void)
{
#if 0
/* Set the SLEEPDEEP bit to enable deep sleep mode (STOP) */
S32_SCB->SCR |= S32_SCB_SCR_SLEEPDEEP_MASK;
/*select stop mode*/
SMC->PMCTRL = SMC_PMCTRL_STOPM(0b00);
SMC->STOPCTRL = SMC_STOPCTRL_STOPO(0b01);
if(SMC->PMSTAT == 0x01)
{
asm("WFI");
}
#else
/* Disable the JTAG port pins */
/* Disable Adc Pins */
PMC->REGSC |= PMC_REGSC_BIASEN(1); // [1] CLKBIASDIS = 1 In VLPS mode, the bias current for SIRC, FIRC, PLL is disabled
/* Disable the Fosc and Sosc from chip*/
SCG->FIRCCSR = SCG_FIRCCSR_FIRCEN(0);
while(SCG->FIRCCSR & (1 << 24));
SCG->SOSCCSR = SCG_SOSCCSR_SOSCEN(0);
S32_SCB->SCR |= S32_SCB_SCR_SLEEPDEEP_MASK|0x2; /* allow deep sleep mode0 */
SMC->PMPROT = SMC_PMPROT_AVLP(1); /* allow very low power mode*/
SMC->PMCTRL = SMC_PMCTRL_STOPM(2);
if(SMC->PMSTAT == 0x01)
{
asm("WFI");
}
#endif
}
void power_set_mode(POWER_SYS_TYPE mod)
{
if(mod == POWER_SYS_SLEEP)
{
init_NVIC();
//power_can_wakeup_set();
Power_RUN_to_STOP();
}
}
Regards,
Katrinal
Solved! Go to Solution.
Hello,
If you use a S32K14x derivative, there are two clock monitors that can be enabled/disabled in
SCG_SPLLCSR[SPLLCM]
SCG_SOSCCSR[SOSCCM]
The MCUs do not have any RTC crystal oscillator.
Please disconnect the debugger and power cycle the MCU before the MCU enters VLPS.
Thank you,
Regards,
Daniel
Hello,
If you use a S32K14x derivative, there are two clock monitors that can be enabled/disabled in
SCG_SPLLCSR[SPLLCM]
SCG_SOSCCSR[SOSCCM]
The MCUs do not have any RTC crystal oscillator.
Please disconnect the debugger and power cycle the MCU before the MCU enters VLPS.
Thank you,
Regards,
Daniel
Hi Katrinal,
The FlexCAN module is not functional in VLPS.
Please disable the module before the MCU enters VLPS.
You can use PORT active edge interrupt on the CAN_RX pin as a wake-up source,
the FlexCAN should be disabled.
Regards,
Daniel
Hello Daniel,
How to set these two items?
and after disable FlexCan,the The quiescent current remains unchanged