You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you pass 1ms to the timer interface, you miss callbacks. This likely has to do with the possibility that the counter is read, then the compare is set to read value +1. If the counter incremented between that read and set, no interrupt will be issued.
Two typical solutions (you generally want both): have the underlying counter at a higher precision (so a timer of 1 is, say, 1000 counter increments), and also check whether the counter has passed the compare value before returning. I.e., set the prescalar in ast.rs so it's higher than 1kHz (e.g., 32kHz), then have the system call interface translate ms to ticks of a 32kHz clock).
The text was updated successfully, but these errors were encountered:
If you pass 1ms to the timer interface, you miss callbacks. This likely has to do with the possibility that the counter is read, then the compare is set to read value +1. If the counter incremented between that read and set, no interrupt will be issued.
Two typical solutions (you generally want both): have the underlying counter at a higher precision (so a timer of 1 is, say, 1000 counter increments), and also check whether the counter has passed the compare value before returning. I.e., set the prescalar in ast.rs so it's higher than 1kHz (e.g., 32kHz), then have the system call interface translate ms to ticks of a 32kHz clock).
The text was updated successfully, but these errors were encountered: