This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Tell if timer is running

Is there a way to tell if the timer is running? There's a start task, and a stop task, but I'm not sure how to tell if a timer is currently running. The best thing I can think of is to capture the value, wait a little while, capture the value again, and see if it's changed. This seems both unreliable and time-consuming. Is there a better way?

Thanks!

Parents Reply
  • Yeah, I can turn the timer off with the LPCOMP. What I was curious about is if there's a way to tell if this has happened. I can't use an interrupt because the idea is this is guarding the PWM during Bluetooth transactions.

    Right now my workaround is to also enable a channel group with the LPCOMP, and then I can just check whether the channel in question has been enabled. Sort of wonky but it seems to work. All my timers are already in use so I can't increment a counter.

Children
No Data
Related