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

HyperLynx AMS schematic in Xpedition Designer above a system model containing an FMI block, from Siemens EDA's FMI co-simulation article
PCB Design Siemens EDA

FMI Co-Simulation in HyperLynx AMS and PartQuest Explore: Electrical, Mechanical and Thermal Models in One Run

Since the 2510 release, HyperLynx AMS exports and imports FMI Functional Mock-up Units, so a schematic-driven circuit model can co-simulate with models from other FMI-compatible tools, such as a Simcenter Amesim mechanical model. What the two FMU types mean and where it pays off for Indian hardware teams.

4 Nov 2026 · 5 min read
Embedded engineering bench in India, illustrating the hardware a developer can act on today, supported by GSAS
Technical Guides Arm

Arm's Agentic AI Push: What Indian Embedded Teams Can Actually Use Today

Arm has set out its platform strategy for the agentic era, putting inference everywhere it has compute. Indian embedded teams can start on that direction this quarter with the Cortex-M toolchain they already own: Helium, CMSIS-NN, Ethos-U and Vela, on boards you can order today.

13 Sept 2026 · 7 min read
Storage sizing ladder for automotive data logging: four rungs stepping from an aggregate link rate of 1 Gbit/s to 125 MB per second, then 450 GB per hour, then 3.6 TB per eight-hour shift, then 18 TB per five-day week, in decimal units, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

Automotive Data Loggers: Capture Without Loss

Search for an automotive data logger and the results split into cheap OBD dongles at one end and enterprise ADAS recorders at the other, with nothing in between explaining the engineering that decides whether you lose frames. This is the loss budget end to end: mirror oversubscription upstream of the logger, encapsulation overhead on the capture path, sustained write rate against burst rate, rotation stalls, and storage arithmetic worked in full so you can redo it with your own numbers instead of trusting ours. Written by the GSAS Micro Systems engineering team in India.

29 Aug 2026 · 13 min read