About nested hardware timer interrupt on K21

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

About nested hardware timer interrupt on K21

886 Views
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

Tags (1)
0 Kudos
3 Replies

498 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Rahul

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

Regards

Daniel

0 Kudos

498 Views
rahulhirve
Contributor II

Hi Daniel,

I am using MQX 4.1.

Thanks,

Rahul

0 Kudos

498 Views
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 Kudos