Unexpected o/p resulted from timer ISR's

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

 Hi,

   

My requirement is to output data in microseconds, and I am using many timer interrupts to achieve it in my code. The result is unexpected jitters in the o/p. It's definately not a good approach to have implementation inside ISR's, however i cannot think of anything else to achieve this timing. Any suggestions ??

   

Note : The max tolerance allowed in the system is 2us. (Simple function execution take 1us)

   

HW : PSOC5LP, Creator 3.0

   

Screenshot : 5 timers are being used, Timer_Period_0 works fine, but Timer_Period_1 has varying intervals of 496, 504, 496, 504. I am not able to understand this behavior. Any help will be highly appreciated.

0 Likes
2 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Can you post your project or at least describe functionality of

   

timers and what ISR is doing  in a little more depth ?

   

 

   

    

   

          

   

“File”                                                             Creator

   

“Create Workspace Bundle”

   

   

 

   

Regards, Dana.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Assuming a core clock of 80MHz, 1µs granularity / accuracy means just 80 clock cycles. Thats not much. Probably you want to use a hardware-based solution.

   

The jitter you see might stem from the fact that the second timer ISR has a lower priority than the first, so it can only run when the first one isn't.

   

Maybe you should explain a little bit more what you want to achieve.

0 Likes