MCU wakeup by LPIT0 from VLPS and Timer Callback

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

MCU wakeup by LPIT0 from VLPS and Timer Callback

ソリューションへジャンプ
3,433件の閲覧回数
Raj_Nayyer
Contributor II

Hi,

I have an "S32K146" MCU and I'm using SDK. I want to have a power management procedure. The problem is that when I start LPIT0 timer in another timer (FTM1) callback and then set MCU in VLPS MCU will not wake up and don't go to LPIT0 callback function.

My configuration is this : WakeupTiming_pal_instance is FTM1, Continuous notification, External clock (SPLLDIV1_CLK = 20Mhz), Prescale = 16 and callback function : voidWakeupTimerCallback

SleepTiming_pal_instance is LPIT0, Continuous notification, SIRCDIV2_CLK = 8Mhz , and callback function : voidSleepTimerCallback

attached code should toggle a pin every 10ms in RUN mode for 10s and then for 9.9s each 60ms wake up with LPIT0 interrupt and toggle the pin and again go to VLPS but it doesn't go to voidSleepTimerCallback after MCU set to VLPS. 

タグ(3)
0 件の賞賛
返信
1 解決策
3,399件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

I'm not sure what the issue is here.

But I would recommend using the Sleep-on-exit option.

danielmartynek_0-1612192987265.png

The MCU goes back to VLPS immediately once it exits the interrupt.

So, you don't have to call the POWER_SYS_SetMode(VLPS, ...) function every time.

 

BR, Daniel

 

 

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
3,409件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

What are the priorities of these two interrupts?

The LPIT interrupt must have a higher priority than the FTM interrupt.

 

Regards,

Daniel

0 件の賞賛
返信
3,408件の閲覧回数
Raj_Nayyer
Contributor II

I added this code after timer initialization :

INT_SYS_SetPriority(LPIT0_Ch0_IRQn,0);
INT_SYS_SetPriority(FTM1_Ch0_Ch1_IRQn,1);

now it goes to sleep callback just once after that it remains in VLPS 

0 件の賞賛
返信
3,400件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

I'm not sure what the issue is here.

But I would recommend using the Sleep-on-exit option.

danielmartynek_0-1612192987265.png

The MCU goes back to VLPS immediately once it exits the interrupt.

So, you don't have to call the POWER_SYS_SetMode(VLPS, ...) function every time.

 

BR, Daniel

 

 

0 件の賞賛
返信
3,349件の閲覧回数
Raj_Nayyer
Contributor II

thank you my problem is solved with this.