The watchdog sequence events are as follows for the different scenarios listed:
- A good event occurs when all answer bytes are
correct in value and timing. After such a good event, following events
occur:
- The WD_FAIL_CNT[2:0]
counter decrements by one at the end of the watchdog-sequence.
- The question-counter
increments by one and the watchdog generates a new question.
- A bad event occurs when all answer-bytes are
correct in value but not in correct timing. After such a bad event,
following events occur:
- The WD_SEQ_ERR and
WD_BAD_EVENT status bits are set if Window-1 time-interval elapses
before watchdog has received Answer-3, Answer-2 and Answer-1.
- The WD_ANSW_EARLY and
WD_BAD_EVENT status bits are set if watchdog receives all four
answers in Window-1.
- The WD_FAIL_CNT[2:0]
counter increments by one at the end of the watchdog-sequence.
- The question-counter
does not change, and hence the watchdog does not generate a new
question.
- A bad event occurs when one or more of the
answer-bytes are not correct in value but in correct timing. After such a
bad event, following events occur:
- The WD_ANSW_ERR and
WD_BAD_EVENT status bits are set as soon as the watchdog detects an
incorrect answer-byte.
- The WD_FAIL_CNT[2:0]
counter increments by one at the end of the watchdog-sequence.
- The question-counter
does not change, and hence the watchdog does not generate a new
question.
- A bad event occurs when one or more of the
answer-bytes are not correct in value and not in correct timing. After such
a bad event, following events occur:
- The WD_ANSW_ERR and
WD_BAD_EVENT status bits are set as soon as the watchdog detects an
incorrect answer-byte.
- The WD_SEQ_ERR and
WD_BAD_EVENT status bits are set if Window-1 time-interval elapses
before watchdog has received Answer-3, Answer-2 and Answer-1.
- The WD_ANSW_EARLY and
WD_BAD_EVENT status bits are set if watchdog receives all four
answer-bytes in Window-1.
- The WD_FAIL_CNT[2:0]
counter increments by one at the end of the watchdog-sequence.
- The question-counter
does not change, and hence the watchdog does not generate a new
question.
- A time-out event occurs when the device receives
less than 4 answer-bytes before Window-2 time-interval elapses. After a
time-out event occurs, following events occur:
- WD_SEQ_ERR and
WD_BAD_EVENT status bits are set if Window-1 time-interval elapses
before watchdog has received Answer-3, Answer-2 and Answer-1.
- The WD_TIMEOUT and
WD_BAD_EVENT status bits are set at the end of the
watchdog-sequence.
- The WD_FAIL_CNT[2:0]
counter increments by one at the end of the watchdog-sequence.
- The question-counter
does not change, and hence the watchdog does not generate a new
question.
The status bit WD_BAD_EVENT is read-only. The watchdog clears the WD_BAD_EVENT status bit at the end of the watchdog-sequence.
The status bits WD_SEQ_ERR, WD_ANSW_EARLY, and WD_TIMEOUT are
latched until the MCU writes a ‘1’ to these bits. If one or more of these status
bits are set, the watchdog can still detect a good event in the next
watchdog-sequence. These status bits are read-only. The watchdog clears the
WD_BAD_EVENT status bit at the end of the watchdog-sequence.
Note: The WD_FIRST_OK
bit is set after receiving 4 answers in the correct time frames, regardless of
the correctness of the answers. In order to not clear the bit in case of
incorrect answers, the following procedure is recommended:
- When WD_FIRST_OK bit is
set, the MCU must read the WD_FAIL_CNT (address 0x40).
- If WD_FAIL_CNT is zero,
the MCU must clear the WD_FIRST_OK bit.
- If WD_FAIL_CNT is not
zero, the MCU must continue sending frames until WD_FAIL_CNT decrements
before clearing WD_FIRST_OK.
Figure 8-27 shows the flow-chart of the watchdog in Q&A mode.