Interrupt handling in S32K116 using quick start guide startup file

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

Interrupt handling in S32K116 using quick start guide startup file

Jump to solution
2,173 Views
jayashreepasane
Contributor III

Hello All,

I am using S32K116 micro controller with startup.s provided by quick start guide. On this I have a following question.

When I am in a interrupt service routine, say if there is a another interrupt occuring, I do not see that interrupt in pending interrupt list of NVIC. Also wanted to know if core interrupts are disabled when current interrupt is being served?

From .s file , I do not see any nesting of Interrupts handling.

attaching startup.s file. 

0 Kudos
1 Solution
1,899 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Jayashree P,

If you clear the LPIT flag of the 5th interrupt before the 6th LPIT interrupt gets triggered, then, at the end of the 5th ISR, you should see NVIC_ISPR[20] == 1.

If not, please share your project.

Thank you,

Daniel

View solution in original post

6 Replies
1,897 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello jayashreepasane,

The S32K1xx derivatives (ARM Cortex M0+ core) have four interrupt priority levels.
pastedImage_2.png
Depending on the priority levels of the interrupts, one interrupt can preempt another or become pending.
Please see the ARM®v6-M Architecture Reference Manual
B1.3.2 Exceptions
Priority levels, execution priority, exception entry, and execution preemption

BR, Daniel

0 Kudos
1,898 Views
jayashreepasane
Contributor III

Hello Daniel,

Thank you for the reply.

For example, I am generating an LPIT (low power time interrupt) every 1ms, at the 5th interrupt ( meaning here 5ms I call a function which takes more than 1ms), what happens to the next interrupt of same priority level interrupt here?

I do not see this interrupt in pending ISR list, thats why I added this question.

Regards,

Jayashree P

0 Kudos
1,898 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Jayashree,

When exactly do you clear the LPIT Interrupt flag?
You would need clear the flag before the LPIT interrupt is asserted again.

BR, Daniel

0 Kudos
1,899 Views
jayashreepasane
Contributor III

Hello Daniel,

First thing that I do in interrupt routine is to clear LPIT interrupt flag.

Thanks,

Jayashree P

0 Kudos
1,900 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Jayashree P,

If you clear the LPIT flag of the 5th interrupt before the 6th LPIT interrupt gets triggered, then, at the end of the 5th ISR, you should see NVIC_ISPR[20] == 1.

If not, please share your project.

Thank you,

Daniel

1,899 Views
jayashreepasane
Contributor III

Hello Daniel,

Thank you for providing the input, Becasue LPIT was disabled in the debug mode, pending ISR was not seen. Now at the end of the 5th ISR I see there is a pending interrupt.

Thanks,

Jayashree P

0 Kudos