Precision Timeouts in Zephyr: Past, Present, and Future
summary
Benchmarks run 100 tests comparing k_timer, k_busy_wait and k_microsleep show premature expirations and unexplained long tails — a one‑microsecond sleep sometimes hits a 10 ms spike and default tick granularity hides sub‑millisecond reality. Fixes raise resolution on Nordic hardware from 10 ms to about 30.5 microseconds, address add/remove race bugs and hardware minimum‑timeout quirks, and propose a 64‑bit timeout descriptor (the design fits in 64 bits) with selectable units, rounding, reference point and clock source.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:13Zephyr API calls
- 3:38Properties of the subsystem
- 5:45Bluetooth example
- 8:45Zephyr benchmark
- 9:53Ideal results
- 11:51Bad results
- 12:26Good results
- 17:02Ticks per second
- 18:31Fixing the problem
- 19:29Proposed changes
related talks
29mPrecision Timeouts in Zephyr: Past, Present, and Future
11mLightning Talk: Implementing the Precision Time Protocol (PTP) in the Zephyr Proj...
40mOptimizing Zephyr for Peak Performance
47mUpdates To Clock Management Within Zephyr RTOS
40mClock Management in Zephyr RTOS
40mReworking the Zephyr Clock Control Subsystem
42mSTM32 on Zephyr, What You Need to Know
35mMulti-core Application Development with Zephyr RTOS
