s32k144 port interrupt wakeup form vlps

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

s32k144 port interrupt wakeup form vlps

1,503件の閲覧回数
1090097669
Contributor III

Hello every one:

 

 Recently,I have some problems on RUN and VLSP mode configuration, I am the following information is correct:
1. S32K144 chips do not have CAN RXD wake function module

2. Before enter VLSP mode, need to configure the RTC CLOCK module

and The following is my adopted the SDK software configuration module:

static void gpio_port_int_init(void)
{
INT_SYS_EnableIRQ(PORTB_IRQn);
INT_SYS_InstallHandler(PORTB_IRQn, &gpio_portb_irq, (isr_t *)0);

INT_SYS_EnableIRQ(PORTD_IRQn);
INT_SYS_InstallHandler(PORTD_IRQn, &gpio_portd_irq, (isr_t *)0);

INT_SYS_EnableIRQ(PORTE_IRQn);
INT_SYS_InstallHandler(PORTE_IRQn, &gpio_porte_irq, (isr_t *)0);

PINS_DRV_SetPinIntSel(GPIO_CP_UNLOCK_PORT,GPIO_CP_UNLOCK_PIN,PORT_DMA_INT_DISABLED);
PINS_DRV_SetPinIntSel(GPIO_CP_WAKE_PORT,GPIO_CP_WAKE_PIN,PORT_DMA_INT_DISABLED);
PINS_DRV_SetPinIntSel(GPIO_CC_WAKE_PORT,GPIO_CC_WAKE_PIN,PORT_DMA_INT_DISABLED);
PINS_DRV_SetPinIntSel(GPIO_VCU_WAKE_PORT,GPIO_VCU_WAKE_PIN,PORT_DMA_INT_DISABLED);
}

void init_NVIC(void)
{

PINS_DRV_SetPinIntSel(PORTE,5U,PORT_INT_RISING_EDGE);

}

void Power_RUN_to_STOP (void)
{

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");
}


}

 

void power_set_mode(POWER_SYS_TYPE mod)
{
if(mod == POWER_SYS_SLEEP)
{

init_NVIC();
//power_can_wakeup_set();
POWER_SYS_SetMode(POWER_SYS_VLPS, POWER_MANAGER_POLICY_AGREEMENT);
}
}

 

Regards,

Katrinal

タグ(4)
1 返信

810件の閲覧回数
nyf
Contributor I

不好意思,麻烦问一下,我这边使用142也出现了同样的问题,在设置完低功耗模式之后,电流仍然降不下来,麻烦问一下,您具体是怎么解决这个问题的

0 件の賞賛
返信