Abstract
A single-core microcontroller in a non-invasive physiological sensing device may run digital signal processing (DSP) alongside proportional-integral-derivative (PID) thermal control. A DSP routine that runs to completion can occupy the core for a variable duration. A standard PID update assumes a fixed interval between executions, but that interval might not match the elapsed interval, causing errors in the integral and derivative terms. A real-time operating system (RTOS) can preempt the DSP routine, but it adds memory, power, context-switching latency, and regulatory software certification effort. To address these issues, this publication describes a cycle counter timing system that reads the cycle count register of a data watchpoint and trace (DWT) unit at the start of each control iteration. The system converts the difference between successive readings into the true elapsed interval and applies that interval inside the integral and derivative terms. The PID thermal control loop can then maintain stability during signal processing delays without an RTOS.
Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 License.
Recommended Citation
Cheng, Gary, "Cycle Counter Timing for Jitter-Compensated Thermal Control Concurrent with Signal Processing on a Bare-Metal Microcontroller", Technical Disclosure Commons, (November 05, 2026)
https://www.tdcommons.org/dpubs_series/12761