You size the timeout to your worst-case healthy loop time plus a safety margin, the longest legitimate interval between kicks under normal operation, including any slow-but-valid operations like a flash erase/write, a burst of computation, or a blocking peripheral transaction. Too short, and those legitimate long operations don't get a kick in time, so the watchdog fires spuriously and the device keeps resetting itself mid-work, a self-inflicted denial of service. Too long, and a genuinely hung device stays wedged for that whole period before recovering, hurting availability and possibly safety. So it's a balance between false positives (resets during valid slow paths) and slow recovery. The practical approach: measure or bound the worst-case time around your kick point, set the timeout comfortably above it, and if a legitimately long operation exceeds the timeout, restructure so the watchdog is still kicked during it (or temporarily use a longer-timeout strategy) rather than just inflating the timeout for everyone. And always log watchdog resets so spurious ones surface.
Embedded Systems Fundamentals · Interview question
How do you choose the watchdog timeout, and what goes wrong at the extremes?
A strong answer
What a weak answer sounds like
You know the answer. Do you know what gets you dinged?
Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.
From the lesson
The Watchdog Timer
The hardware that resets a hung MCU: a countdown timer firmware must periodically kick, why you kick only from healthy code, and the window-watchdog twist.
More The Watchdog Timer questions
What is a watchdog timer and what problem does it solve?Where in your code should you kick the watchdog, and what's the common mistake?What's the difference between an independent watchdog and a window watchdog?Why does your chip keep resetting when you pause at a breakpoint, and how do you handle long legitimate operations?
Browse all 472 interview questions