S32K wake up from VLPS by port interrupt and CAN Rxd

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K wake up from VLPS by port interrupt and CAN Rxd

Jump to solution
2,650 Views
1090097669
Contributor III

,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

0 Kudos
Reply
1 Solution
2,596 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,

If you use a S32K14x derivative, there are two clock monitors that can be enabled/disabled in

SCG_SPLLCSR[SPLLCM]

SCG_SOSCCSR[SOSCCM]

danielmartynek_0-1605782412998.png

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

 

 

View solution in original post

0 Kudos
Reply
3 Replies
2,597 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,

If you use a S32K14x derivative, there are two clock monitors that can be enabled/disabled in

SCG_SPLLCSR[SPLLCM]

SCG_SOSCCSR[SOSCCM]

danielmartynek_0-1605782412998.png

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

 

 

0 Kudos
Reply
2,617 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Katrinal,

The FlexCAN module is not functional in VLPS.

Please disable the module before the MCU enters VLPS.

danielmartynek_0-1605690634102.png

You can use PORT active edge interrupt on the CAN_RX pin as a wake-up source,

the FlexCAN should be disabled.

 

Regards,

Daniel

 

 

 

0 Kudos
Reply
2,610 Views
1090097669
Contributor III

Hello Daniel,

1090097669_0-1605694229618.png

How to set these two items?

and after disable FlexCan,the  The quiescent current remains unchanged

0 Kudos
Reply