← Lab /Security & privacy

Secure-driven time sync restores correct RTOS time without OS changes or overhead

The proposed mechanism synchronizes Secure and Non-Secure timekeeping with no significant runtime overhead and without modifying the RTOS

Security & privacy arXiv 27 Apr 2026 Method Prototype evidence

Published as “Resolving Conflicts Between RTOS Timekeeping and Uninterruptable Trusted Computing”

Why it matters

Enables deployment of atomic Trusted Execution Environment services on real-time microcontroller systems without breaking RTOS timing guarantees, supporting safety-critical applications.

Summary

The paper shows that a Secure-driven time-synchronization mechanism can eliminate the clock drift caused by atomic Trusted Execution Environment services blocking SysTick interrupts, keeping RTOS time within a single tick of real time with no observable long-term divergence. The approach works on two Cortex-M33 MCUs, requires no changes to the RTOS, and adds only a few hundred CPU cycles of overhead per tick.

What they found 5

  1. Drift is fully eliminated with the mechanism enabled

    “With the proposed mechanism enabled, the drift is eliminated in every case: across all tested configurations, the Non-Secure tick counter remains aligned with the Secure-world reference time to within a single tick for the entire experiment, with no observable long-term divergence.”

  2. Secure-world SysTick handling adds minimal overhead

    “This sequence takes on average of CPU 120 cycles on FreeRTOS and 172 cycles on Zephyr.”

  3. Dedicated Secure SysTick incurs extra latency per event

    “This cross-world transition introduces an average latency of about 32 cycles per event.”

  4. Uncompensated drift degrades control performance

    “the cumulative drift raises speed Root Mean Square Error (RMSE) from 6.55 to 8.02 rad s-1.”

  5. Single large tick freeze causes position error increase

    “the single missed release raises position RMSE from 4.78 to 8.88 mrad and produces a peak deviation of 56.06 mrad (3.21o)”

Caveats 1

  • The Secure-world handler adds 120-172 CPU cycles per tick, and platforms with a dedicated Secure SysTick add about 32 cycles per event, which, while small, is non-zero runtime overhead.

What’s new here 4

  • Identifies and formalizes the cross-world timing drift problem between Secure and Non-Secure worlds in TrustZone-M.
  • Introduces a lightweight Secure-world time-reconciliation mechanism that updates the RTOS tick counter transparently.
  • Provides an open-source prototype that works with existing RTOSes (FreeRTOS, Zephyr) without hardware modifications.
  • Demonstrates the practical impact on closed-loop motor control and shows full mitigation of control degradation.