Using PIT to make an ISR Program

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

Using PIT to make an ISR Program

821 Views
abdul_rahman
Contributor IV

Hi team,

I didn't quite understood the Pit_Gpt_Ip example code where PIT is blinking an LED using interrupt subroutine (ISR) using some IRQ_handler. Can anyone explain me how the ISR is working? Also how to make an ISR using PIT? 

0 Kudos
Reply
2 Replies

786 Views
_Leo_
NXP TechSupport
NXP TechSupport

Hi,

Thank you so much for your interest in our products and for using our community.

In IntCtrl_Ip driver (S32 Config Tools (S32CT) -> Peripherals), it is enabled the interrupt and set the correct handler for it. Then in Pit driver it is started the selected channel and enabled its notification.

In code, after the initialization the channel will start counting, the notification will be generated and a while loop will run to blink a LED. The while loop will toggle the gpio pin after each event generated by the notification using Siul2_Dio IP driver.

Hope it helps you.

Have a nice day!

0 Kudos
Reply

756 Views
abdul_rahman
Contributor IV

Hi @_Leo_ 

I have 2 questions regarding this,

1. In IntCtrl_Ip driver, why is the PIT ISR given a priority of 15 when it is the only ISR being used? What does the priority number do?

2. In your statement "the notification will be generated and a while loop will run to blink a LED. The while loop will toggle the gpio pin after each event generated by the notification using Siul2_Dio IP driver." how does the PitNotification() function (made outside of the main loop) run if its not called in the while loop of the int main() program?

Tags (5)
0 Kudos
Reply