I'm reading about the 28335 watchdog module and am a little unclear about this WDOVERRIDE bit; it's mentioned kind of obliquely in SPRUFB0D on p. 53-54 without explaining it very well. Here's what I've gathered from the document:
- WDCR.WDDIS (watchdog disable) can only be modified if SCSR.WDOVERRIDE is 1.
- SCSR.WDOVERRIDE: (watchdog override) -- it defaults to 1
SPRUFB0D p. 53 also has this comment, along with the "R/W1C-1" notation (read/write, defaults to 1, clear if you write 1?):
===
Writing a 0 has no effect. If this bit is cleared, it remains in this state until a reset occurs. The current state of this bit is readable by the user.
1 You can change the state of the watchdog disable (WDDIS) bit in the watchdog control (WDCR) register. If the WDOVERRIDE bit is cleared by writing a 1, you cannot modify the WDDIS bit.
===
So you clear the WDOVERRIDE bit by writing a 1 to it, and you can't set it again until there's a reset? What is the motivation for ever setting this to 1? Is it to lock the watchdog on or off? Should this bit really be called "WDLOCK" instead of WDOVERRIDE?