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

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
Side by side comparison of a 10BASE-T1S multidrop mixing segment, one balanced pair with four nodes on short stubs and a termination at each end, against a point to point star of four separate links into switch ports, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

10BASE-T1S and PLCA: Multidrop Ethernet Explained

10BASE-T1S is the one member of the T1 single-pair Ethernet family that keeps a shared medium, and PLCA is the reconciliation sublayer that stops the nodes on it from colliding. This article covers what IEEE 802.3cg standardises, how the beacon and transmit opportunities schedule a cycle, the node count and segment length figures the OPEN Alliance interoperability test suite works to, and the failure modes that put a segment quietly back into contention while every link still looks up. Written by the GSAS Micro Systems engineering team in India for teams bringing up multidrop segments on the bench.

29 Aug 2026 · 12 min read
Horizontal stacked bar showing where an ADAS test vehicle's bandwidth budget is spent, split into cameras, lidar, radar and bus traffic, with the logger uplink limit drawn as a vertical rule crossing the bar, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

ADAS Sensor Data Logging: Bandwidth Budgets That Add Up

Every page that tells you an ADAS test vehicle produces terabytes a day states the headline and skips the arithmetic, so you cannot redo it for your own sensor set. This article publishes the arithmetic instead: one formula, every table row derived on the page, a worked eight-hour drive that chains those rows into a sustained write rate, a media count and an offload window, and the five places bandwidth budgets go wrong. Written by the GSAS Micro Systems engineering team in India.

29 Aug 2026 · 15 min read