Other Parts Discussed in Thread: HALCOGEN
Dear TI,
I tried to measure the time of a GIO (N2HET) register with RTI timer-interrupt. I would like to measure 3 ms, so I configured the RTI Compare1 period to 0.01 ms in HALCoGen.
So the interrupt happens every 0.01 ms and there is a condition in which I inspect whether the GIO pin has 3.3V (ON-state) on it and I increase a variable with 0.01.
After then, I print out the measured on-times (it can be less or more than 3 ms, too), per second.
The problem is, that I measure 6ms which is the double of what it should be (3ms).
I attach the code snippet.
Any ideas, what can cause the problem?
Thanks for your reply in advance.
Regards,
Zsolt Nagy
The code snippet:
void rtiNotification(rtiBASE_t *rtiREG, uint32 notification)
{
if(notification == 2U){
expt = gioGetBit(hetPORT1, 14);
if(expt){
milliseconds += 0.01;
}
}