Watchdog Timers: A Necessary Evil (or Essential Good)?

2025-01-31

This article explores the critical role of watchdog timers in embedded systems. Using the failure of the Clementine spacecraft mission due to a poorly implemented watchdog and the need to reboot a kitchen exhaust fan as examples, the author stresses the importance of reliable watchdog timers in preventing software failures. The article details various watchdog timer designs, including internal and external options, and offers strategies for building highly reliable watchdog timers. These include employing windowed watchdogs, external CPU-independent watchdogs, and monitoring the state of all tasks in a multitasking system. The author argues for the inclusion of watchdog timers even in simple systems, advocating for techniques like periodic data structure resets to enhance reliability.

Read more
Development watchdog timers

Debouncing Switches: It's More Complex Than You Think

2025-01-08

This article delves into the complexities of mechanical switch bouncing. The author conducted experiments on 18 different switch types, revealing bounce times ranging from nanoseconds to hundreds of milliseconds, significantly impacted by switch type and actuation method. The findings highlight the inadequacy of simple software debouncing techniques for all scenarios, emphasizing the need for context-specific hardware or software solutions. Analysis reveals that besides physical contact bounce, analog signal transitions within TTL logic levels contribute to logical bouncing. The results challenge assumptions about switch behavior and call for more robust debouncing strategies.

Read more