Hello,
I am working with S9KEAZN16AM and would like some clarification regarding WDOG initialization timing.
According to the KEA64 Reference Manual, after the watchdog unlock sequence:
"On completing the unlock sequence, the user must reconfigure the watchdog within 128 bus clocks; otherwise, the watchdog forces a reset to the MCU."
With a bus clock of 16.777216 MHz:
Our current implementation requires the following delays for reliable operation:
We observe two issues:
If the 2.5 ms delay after Software_Reset() is removed or reduced, the watchdog counter does not always start/run correctly.
If the 80 µs delay after WDOG_Init() is removed, the watchdog configuration is not always applied correctly.
The main point of confusion is that the observed delays (80 µs and 2.5 ms) are significantly larger than the timing implied by the documented 128 bus clock (~7.6 µs) requirement.
Any guidance would be greatly appreciated.
Thank you.
you try to initialize the watchdog or run tight timing loops before the ICS has completely locked, your actual bus clock frequency will be lower or unstable during that window. A lower actual bus clock means that 128 bus cycles will take significantly longer than 7.6 µs, or your initialization sequence executes before the hardware peripherals are fully out of their reset state. The ~2.5 ms delay gives the ICS ample time to achieve a full lock and stabilize the 16.777216 MHz bus frequency.
Hello,
Wait ~2.5 ms for the Internal Clock Source (ICS) to achieve a full lockand stabilize the bus clock (16.777216 MHz). Initializing the watchdogor running tight loops too early results in an unstable/lower clock,causing timing discrepancies or executing before peripherals leave reset.