PIT Reentrant

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

PIT Reentrant

1,365 次查看
michaelhufnagl
Contributor II

Hy ! I ran into a problem regarding the PIT on an 56F82746.

At the moment the Timer is configured to call the ISR every 10µsec. (100kHz). The ISR is equipped with a #pragma interrupt saveall (Otherwise the ISR won't fire).

What i'm trying to achive is some kind of reentrant PIT isr. However.. when i set the ioctl(PIT_0, PIT_CLEAR_ROLLOVER_INT, NULL); at the beginning of the ISR the timer is not resetted. It will get resetted at the end of the routine.

Is there a way to reset the PIT timer just at the beginning of the ISR ?..

标签 (1)
0 项奖励
回复
1 回复

1,066 次查看
ankur_kala
NXP Employee
NXP Employee

Hi Michael,

I could not understand your use case, but for PIT counter "When enabled, the counter counts up to the modulo value and set a flag (and an interrupt request if enabled), reset to 0x0000, and resume counting." I also verified by making a small sample code using Quickstart which in my understanding you also are using and the counter does behaves in the required manner. To see the actual variation of counter you might try running the counter a t a very low speed so that you can actually see the transition in counter. Attaching the code for your reference.

0 项奖励
回复