Skip to content

Main content

Watchdog Pre Scaler Setting Tool

Choose the smallest caller-supported watchdog prescaler keeping tick frequency at or below a supplied limit; no device register encoding is invented.

Loading tool…

Description

Deduplicate, select divisors with input/divisor ≤ maximumTickHz, and return the smallest eligible divisor and its tickHz.

A hardware clock divider or address offset is determined by a numeric convention and a device configuration. Calculating one candidate value does not verify register programming, electrical behavior, or timing on a particular device.

Deduplicate, select divisors with input/divisor ≤ maximumTickHz, and return the smallest eligible divisor and its tickHz.

When to use this tool

Use Watchdog Pre Scaler Setting when you need one bounded clock, divider, or address component from supplied hardware parameters.

How to use the tool and how it works

  1. Enter inputFrequencyHz, prescalerDivisors, maximumTickHz. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read prescaler, tickHz. Use the output convention below.

Require positive inputFrequencyHz and maximumTickHz and a nonempty list of positive integer divisors. Deduplicate, select divisors with input/divisor ≤ maximumTickHz, and return the smallest eligible divisor and its tickHz.1

Input fieldMeaning and unitsAccepted input
inputFrequencyHzInput Frequency HzRequired. Finite number; strictly above 0.
prescalerDivisorsPrescaler DivisorsRequired. Array of safe integer; maximum items 256.
maximumTickHzMaximum Tick HzRequired. Finite number; strictly above 0.
Output fieldInterpretationReturned shape
prescalerPrescalerRequired. Safe integer.
tickHzTick HzRequired. Finite number.
json
{
  "input": {
    "inputFrequencyHz": 32000,
    "prescalerDivisors": [
      1,
      8,
      64,
      256
    ],
    "maximumTickHz": 1000
  },
  "output": {
    "prescaler": 64,
    "tickHz": 500
  }
}

Limitations and assumptions

  • No eligible divisor causes rejection; the returned divisor is not a register encoding and hardware availability or safe watchdog timing is not verified.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Check the device datasheet, register layout, and measured behavior before applying the setting.

References

  1. Calculation and input contract: microcontroller/watchdog-pre-scaler-setting — tool.io

Similar or alternative tools