PIT interrupt in KL25

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

PIT interrupt in KL25

1,312 次查看
hotashu
Contributor III

Hello,

I use KL25 PIT interrupt. in vector table, there is only one PIT interrupt.
if i enable both PIT channel 0 and 1 (PIT0 and PIT1 ). how can i know which interrupt(PIT0 or PIT1) happened in PIT interrupt?

thanks!

0 项奖励
回复
1 回复

856 次查看
lupogrigio
Contributor III

Dear Sir,

Kinetis KL25 has a PIT module with two channels. When you execute the procedure pointed from the PIT vector (i.e. the isr linked to the interrupt you can read the Timer Flag Register (PIT_TFLGn) of the channel 0 and channel 1. The one with the bit field TIF set to one has generated the interrupt request. Reading it the flag will be cleared, as describer in the Reference Manual at chapter 32.3.7.

Best Regards