Before you can read a single line of watchdog code or plug numbers into the timeout formula, you need to own about a dozen small ideas. The parent note the watchdog topicassumes you already know what a "counter", a "clock", a "prescaler", and a "reset" are. This page builds every one of them from nothing, in the order they depend on each other, so that when a symbol like fclock or Nmax shows up, you already know exactly what picture it points at.
Picture a metronome for a piano student: tick… tick… tick… at perfectly even spacing. The chip has exactly this, but millions of ticks per second.
The single number that describes a clock is its frequency.
Why the topic needs it: the watchdog is driven by a clock. How fast the watchdog's counter changes is set entirely by this f. In the parent formula it appears as fclock — the frequency of the clock feeding the watchdog specifically (which, as we'll see, is often a different, independent clock from the CPU's — see Hardware Timer Peripherals).
Picture a numbered dial that the clock nudges one notch every tick. Left alone, a down-counter slides steadily toward zero.
Why the topic needs it:Nmax is where a fresh watchdog counter starts before counting down. "Feeding" the watchdog means slamming the counter back up to Nmax. The bigger Nmax, the longer the slide to zero, so it directly sets how long you have before a reset.
Recall Why is
Nmax=2b−1 and not 2b?
Because counting starts at 0. b bits give 2bdistinct values (0 through 2b−1), so the largest single value is one less than 2b. ::: With 16 bits: 216=65536 distinct values, top value =65535.
Here's a problem. A chip clock ticks millions of times per second. A 16-bit counter only holds up to 65535. At full speed it would count down to zero in a tiny fraction of a second — far too fast to be useful. We need a way to make the counter tick slower.
Picture a turnstile that only opens on every 64th person: the crowd (fast clock) arrives quickly, but the room beyond (the counter) fills slowly.
Why the topic needs it: the prescaler is the tuning knob. It is exactly the prescaler in the parent's timeout formula. Small P → fast counting → short timeout (fast recovery but risk of false resets). Large P → slow counting → long timeout (tolerant of slow operations). Everything about choosing a watchdog timeout is choosing P.
Picture pushing a boulder that is slowly rolling toward a cliff (zero) back up the hill. As long as you push often enough, it never rolls off.
Why the topic needs it: feeding is the whole interaction between your software and the watchdog. The parent's entire discussion of "feeding strategies" and "feeding too early / too late" is about when in your program you perform this one action.
Why the topic needs it: "reaches zero → reset or interrupt" is the whole point of the watchdog's existence. Without understanding what a reset actually does to a running program, "it resets the system" is meaningless.
Why the topic needs it: these three symbols are the entire vocabulary of the "Window Watchdog" section. Tfeed is just when your code actually calls the feed instruction, measured from the last feed.
Read it bottom-up: clock and bits make a counting counter, the prescaler sets its speed, that gives the timeout, feeding resets it, and hitting zero fires the reset — which is the watchdog.