请教MKL16Z128的VLLS3 LLS低功耗问题

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

请教MKL16Z128的VLLS3 LLS低功耗问题

671 Views
天边ttt陈ttt
Contributor I

我现在用MKL16Z128的VLLS3模式遇到了一点问题,我是这样设置的 :用PTC6作为LLWU唤醒, PTC6设置IO口中断输入,下降沿产生中断,LLWU也设置为下降沿中断
现在是进入VLLS3后按按键单片机是进入复位状态,程序重头开始运行,当程序再次进入VLLS3后单片机死机了,

我的VLL3
volatile unsigned int dummyread;
/* Write to PMPROT to allow VLLS3 power modes */
SMC->PMPROT = SMC_PMPROT_AVLLS_MASK;
/* Set the STOPM field to 0b100 for VLLS3 mode */
SMC->PMCTRL &= ~SMC_PMCTRL_STOPM_MASK;
SMC->PMCTRL |= SMC_PMCTRL_STOPM(0x4);
/* set VLLSM = 0b11 */
SMC->STOPCTRL = SMC_STOPCTRL_VLLSM(3);
/*wait for write to complete to SMC before stopping core */
dummyread = SMC->STOPCTRL;
/* Now execute the stop instruction to go into VLLS3 */
#ifdef CMSIS
/* Set the SLEEPDEEP bit to enable deep sleep mode (STOP) */
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
__wfi();
#else
stop();
#endif
程序是这样的

进入休眠之前
LLWU->F2 |= LLWU_F2_WUF10_MASK; // write one to clear the flag
NVIC_EnableIRQ(LLW_IRQn);
LLWU->PE3 = 0x20; //下降沿中断
这样设置
LLWU中断
void LLWU_IRQHandler(void)
{
if(LLWU->F2 & LLWU_F2_WUF10_MASK)
{
f_pmt = 1;
LLWU->F2 |= LLWU_F2_WUF10_MASK; // write one to clear the flag
}
}

当我把休眠模式设置为LLS模式后,单片机进入LLS模式后却出不来

Labels (1)
0 Kudos
1 Reply

510 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi  天边ttt 陈ttt,

抱歉这么晚才答复你!

请问你是否操作过REGSC[ACKISO]寄存器呢?

SDK_2.4.0的power_manager例程可供你参考(C:\SDK_2.4.0_MKL16Z128xxx4\boards\frdmkl26z\demo_apps\power_manager)

PMC_ClearPeriphIOIsolationFlag.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos