jlaitine commented on PR #15938: URL: https://github.com/apache/nuttx/pull/15938#issuecomment-2703199570
Adding one example with real numbers how the timer drift causes the tick timer & watchdog timers to fail: Example: Counter frequency 24000000 (24MHz) Tick frequency 100 Hz (10000) 1. Tick starts at 1645919972; tick number is 1645919972 * 100 / 24000000 = 6857.9999 = 6857 2. Set interrupt in 1 tick time 3. Next tick starts at 1646160004; tick number is 1646160004 * 100 / 24000000 = 6859.0000 = 6859 Result: 2 ticks has passed (6859 - 6857 = 2). Actual time passed is (1646160004 - 1645919972) / 24000000 = 0.010001 s (10 ms). So it has progressed 2 10 ms ticks in 10 ms -> epic fail. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org