Using PIT to make an ISR Program

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Using PIT to make an ISR Program

825 次查看
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? 

标记 (6)
0 项奖励
回复
2 回复数

790 次查看
_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 项奖励
回复

760 次查看
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?

标记 (5)
0 项奖励
回复