About nested hardware timer interrupt on K21

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

About nested hardware timer interrupt on K21

1,523件の閲覧回数
rahulhirve
Contributor II

Hi All,

 

I am trying to use hardware timer interrupt in nested way for my project, So when I am going in VLPS mode I am initializing and starting timer 1 interrupt for waking up out of VLPS.

 

And in timer 1 ISR I am enabling timer 2 and running a while loop, In timer 2 ISR I am again going in VLPS mode.

 

What I am observing is I am successfully waking up hitting timer 1 ISR and initializing timer 2 interrupt, running in while loop of timer 1 ISR. But I am not hitting to timer 2 ISR after timeout of timer 2 rather the core remains in while loop of timer 1 ISR.

 

Please find attached snap shot of code I am using, any suggestions?

 

Thanks,

Rahul

Original Attachment has been moved to: timer_intr.c.zip

タグ(1)
0 件の賞賛
返信
3 返答(返信)

1,135件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Rahul

which MQX version you are using, MQX 4.2 or  MQX for KSDK?

Regards

Daniel

0 件の賞賛
返信

1,135件の閲覧回数
rahulhirve
Contributor II

Hi Daniel,

I am using MQX 4.1.

Thanks,

Rahul

0 件の賞賛
返信

1,135件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Rahul:

I think the ISR should be as short as possible, and be executed as quickly as possible. You should try to avoid calling long and time consuming subroutines in ISRs. There is a while loop in your isr, I guess maybe problem is there.

Regards

Daniel

0 件の賞賛
返信