TMS320C6748 Timer Problem.
My question is about C6748 DSP processors tick count per second. I have external interrupt source which is sending pulse per second and my interrupt service routine (ISR) is triggered by this pulses. Every time this ISR runs, I measure system time via TSCL and TSCH registers. Each pulse has 1.000.000 microsecond interval as I said before but when I measure intervals between ISRs intervals between these routines approximately 1.000.027 microsecond.
- I have tried several few things to fix this issue. For example; I move the functions I use to measure time to L2 cache. I read ~1.000.000 microseconds for about 30 seconds but after 25-30 seconds I continued to get 1.000.027 seconds again.
- Also, I changed the PLL settings and started the processor with different clock frequencies. But there was no change.
- While I expected 1,000,000 microsecond between my interrupts, there are always values of ~ 1,000,027 microsecond.
- Also instead of measuring time intervals. I decided to measure the number of ticks for each second. For the 300 Mhz clock source, while the processor is expected to make about 300.000.000 tick, I always get values like 300.008.500. I know that it cannot be expected to make exactly 300,000,000 tick counts, but the average value is always much higher than 300,000,000 because it always counts more than it is expected to be 300,000,000. And that's the reason for the error in time intervals calculations.
How can I solve this problem? Many thanks for interest.