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

Not enough timers

My application uses the Softdevice, app_timer and app_pwm. So all timers are in use, but I have to measure two more pwm signals on two input pins. (Those come from HC-SR04 sonar sensors)

I have set up interrupt handlers on raising and falling edges but now I need a time source which is precise enough. When I just use the RTC1 counter which is used by app_timer I get wrong results most of the time. I guess app_timer resets the counter sometimes.

Maybe it would be possible to modify app_timer so I can get a free running timer?(app_timer would have to save the counter value to some variable before reset or something)

So all I need is another time source that just counts up and is at least as precise as the RTC.

Parents Reply Children
No Data
Related