This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

28335 SCSR.WDOVERRIDE bit: documentation?

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?

  • Jason,

    Your analysis of the WDOVERRIDE bit appears to be sound.  The functionality of this bit matches your description and interpretation very well.  As for the naming convention, the way in which I interpret the name is that while 1 you are capable of overriding the watchdog enable whereas while 0 you are not able to override the watchdog enable.  In this manner the 'Boolean' interpretation of the value matches the bit name.  If the bit were to be named WDLOCK, then having a state of 1 ('true') would intuitively indicate you would not be able to change the enable state of the watchdog, watchdog enable is locked, whereas the current functionality is actually the opposite of this conclusion.

    Hope this makes sense,

    Mark-