Skip to main content
SEGGER embOS watchdog supervision architecture for multi-task RTOS embedded systems in India

Per-Task Watchdog Supervision in embOS: Why Single-Loop Feeding Fails in RTOS

GSAS Engineering · · 5 min read

A hardware watchdog timer resets the system when firmware stops responding. In bare-metal, the approach is simple: feed the watchdog from the main loop. If execution stalls, the timer expires and forces a reset. This breaks in an RTOS.

In a multi-task environment, the main loop is replaced by a scheduler running independent tasks. A single task can hang, deadlocked on a semaphore, stuck in a retry loop, starved by a higher-priority task, while other tasks continue normally. If the watchdog is fed from any task that is still alive, the hung task goes undetected.

The Single-Loop Feeding Problem

Consider four tasks: sensor acquisition, communication, motor control, and a watchdog feeder. The feeder runs at the lowest priority and kicks the hardware watchdog every 500 ms. If the motor control task deadlocks, the feeder still runs, the watchdog never expires, and the motor sits in whatever state it was in when the task hung. In safety-critical applications, automotive ECUs, industrial controllers, medical devices, this failure mode is unacceptable.

The root cause: the watchdog feeder has no visibility into individual task health. It cannot distinguish between “all tasks are running” and “at least one task is running.”

embOS Watchdog Module

SEGGER embOS includes a watchdog supervision module that solves this at the RTOS level. Each task registers itself with the module and declares its own timeout. The module tracks every registered task independently and only feeds the hardware watchdog when all tasks have reported in within their deadlines.

  1. Task registration: Each task calls a registration function with a custom timeout. A sensor task polling at 100 ms might register with a 300 ms timeout; a communication task handling slow network operations might use 2000 ms.

  2. Periodic signaling: Each registered task calls a signaling API to indicate it is alive and making progress. This call goes at a point where forward progress is guaranteed, after completing a processing cycle, not merely at the top of the loop.

  3. Health verification: A dedicated watchdog task or ISR iterates through all registered tasks and verifies each has signaled within its timeout window. Only if all tasks pass does it feed the hardware watchdog.

  4. Malfunction handling: If any task misses its deadline, the hardware watchdog starves. The module can also invoke a custom malfunction handler, allowing the system to log which task failed, save diagnostic state to non-volatile memory, or attempt controlled actuator shutdown.

Running from Task vs ISR

The health check can run from either a dedicated task or a hardware timer ISR. Running from a task is simpler and permits RTOS API calls (e.g., logging via RTT). Running from an ISR provides extra protection: if the scheduler itself fails, the ISR still executes and the watchdog expires. For highest reliability, use a timer ISR independent of the RTOS tick.

Integration with SystemView

Watchdog events, registration, signaling, health check pass/fail, can be instrumented as SystemView custom events. This gives a timeline view of watchdog activity alongside task scheduling, making it easy to spot tasks approaching their timeout limits under heavy load before an actual failure occurs.

Practical Considerations

Place the signaling call where it proves forward progress, not merely execution. A task spinning in a retry loop without completing work should not signal the watchdog. The signal should come after meaningful work, after processing a reading, transmitting a message, or completing a control iteration.

For tasks that block on external events, structure the timeout to account for maximum expected blocking time plus margin. Alternatively, split the task so the blocking portion is separate from time-critical processing, and only supervise the processing portion.

Deploying embOS Watchdog Solutions in India

GSAS Micro Systems provides the full SEGGER embOS RTOS with the watchdog module, plus Ozone for debugging, SystemView for profiling, and Embedded Studio for development. Teams across Bengaluru, Hyderabad, Chennai, Pune, Mumbai, and Delhi NCR can access local application engineering support for integrating watchdog supervision into RTOS projects.

Explore SEGGER embOS | Request a Quote | Book a Demo

Interested in SEGGER tools?

Talk to our application engineers for personalized tool recommendations.

Stay in the Loop

Get monthly compliance updates, product insights, and engineering best practices delivered to your inbox.

Related Articles

Embedded engineering workstation in India, illustrating the debug, analysis and design steps where AI now runs inside the process, supported by GSAS
Industry Insights

AI Inside the Engineering Process: What Is Worth Automating, and What Still Needs an Engineer

Arm, SEGGER, Perforce and Siemens EDA have each put AI inside a step of the engineering process rather than on top of it: debug, remediation, design entry, inference on the part. GSAS sets out the position behind our coverage of each: which steps are now worth automating, and which keep a human because the cost of being wrong is a recall.

21 Sept 2026 · 11 min read
Master and slave roles on a 100BASE-T1 link: the master PHY times its transmitter from a local clock, the slave recovers the clock from the received signal, with the both-master and both-slave misconfigurations that leave the link down, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

100BASE-T1 Link Won't Come Up: A Vendor-Neutral Checklist

A 100BASE-T1 link that will not come up is almost never a mystery, but the answers on the web are written per silicon vendor and do not transfer. This is the ordered bring-up checklist that holds regardless of which PHY, switch or SoC you have: physical layer first, then the PHY over MDIO, then the master and slave pairing, then the causes of a link that comes up and drops. The standards and tooling claims trace to IEEE 802.3 task force records, the Linux ethtool and kernel documentation or published test material. Written by the GSAS Micro Systems engineering team in India.

29 Aug 2026 · 14 min read
Two test paths leaving the same device under test, one into a conformance suite that returns a passed report and one into a partner node that surfaces a field defect, showing why an ECU can clear a published suite and still fail in a vehicle, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

Automotive Ethernet Conformance: TC8 and Testing Above It

Summarising TC8 as a layer 1 to layer 4 suite is wrong in both directions. The public OPEN Alliance ECU test documents run from transmitter distortion up to a SOME/IP chapter with its own standardised test stub, and they contain exactly one time synchronisation test case. This is what those documents enumerate, chapter by chapter, what genuinely lives above their boundary, why a passing ECU can still fail against a partner node, and how much pre-compliance work a Tier-1 in India can honestly do in-house before a test house visit. Written by the GSAS Micro Systems engineering team in India.

29 Aug 2026 · 12 min read