After Flexcan is deinitialized, the lptmr interrupt cannot wake up the VLPS

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

After Flexcan is deinitialized, the lptmr interrupt cannot wake up the VLPS

475 Views
1069466534
Contributor I

Because I need to reduce power consumption, I deinitialize CAN before entering VLPR mode, and enter VLPS mode after 10ms, but lptmr cannot wake up. When I shield the CAN deinitialization code, I can wake up. What is the reason?
This is my Task code,use SDK3.0:
void PowerIf_SleepManageTask(void)
{
uint16_t lsCurTime = 0;
static uint16_t lsPreTime = 0;
static uint8_t lsTemp = 0;
lsCurTime = GetSysTime();
switch (gBcmWokeMode)
{
case RUNNING:
{
gAppCanWakeupFlg = false;
if (true == PowerFunc_GetBCMFuncModeSleepCon() )
{
gBcmWokeMode = SLEEP_DELAY;
lsPreTime = lsCurTime;
}
}
break;
case SLEEP_DELAY:
{
if ((false == PowerFunc_GetBCMFuncModeSleepCon()) || (gAppCanWakeupFlg == true))
{
gAppCanWakeupFlg = false;
gBcmWokeMode = RUNNING;
}
else if( (lsCurTime - lsPreTime) > BCMSleepDelayTime)
{
gBcmWokeMode = SLEEP;
DriverLpTmrIf_LowpowerTimerInit(); //lptmr Init
FLEXCAN_DRV_Deinit(INST_CANCOM1);
POWER_SYS_SetMode(VLPR, POWER_MANAGER_POLICY_AGREEMENT);
}
}
break;
case SLEEP:
{
if ( (gAppCanWakeupFlg == false) && (false == PowerFunc_GetLocalWakeupCon() ) )
{
POWER_SYS_SetMode(VLPS, POWER_MANAGER_POLICY_AGREEMENT);
}
else
{
}
}
break;
default :
gBcmWokeMode = RUNNING;
break;
}
}

 

0 Kudos
1 Reply

467 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,

The LPTMR must work regardless of the state of the FlexCAN module.

Please make sure that the MCU enters the VLPR, VLPS modes successfully and that LPTMR functional clock is enabled in VLPS.

Can you please share the project so that I can test it?

 

Thank you,

BR, Daniel

 

 

0 Kudos