The Q&A programming sequence includes:
- If required, set WDP bit (to enable protection against accidental clearing).
- Configure the first and second window count registers according to the application requirements.
- Set the interrupt position in the second window using the Funct_Ctrl [SBC] and [BSS] bits.
- If required, enable the second sequence timer function using the [SSTE] bit. The fail counter is always enabled and the [PSME] bit has no meaning in Q&A mode.
- Programmed the seed value into the Token_FB [SEED] bit field.
- Program the first feedback[ configuration into the Token_FB [FDBK] bit field.
- Program the watchdog mode using the Funct_Ctrl [WM] bit.
- Enable the watchdog timer using the Enable_and_Status [WEN] bit.
- Enable register write protection by setting the
[MWC] bit = 1 and write
field to start the first question-answer sequence:
After window mode is enabled, a write response to the Token_Resp [ANS] register field triggers the start of the first window. Each Subsequent token-response sequences start after a correct answer to the previous sequence run.
The default value of the Enable_and_Status [ACNT] field is “00” and after step 9, this field updates to “11.”
Step 9 also takes into account the first feedback configuration for the first time. Subsequently, feedback configuration updates are considered at each new sequence run.
The first token-response is presented to the Enable_and_Status register after step 9. Subsequent tokens are presented at each new sequence run.
- Write three correct responses to the Token_Resp register within the first window interval. The first window always completes. The second window starts if the watchdog has received three correct responses in the first window.
- Wait for the watchdog system interrupt in the second window. Token early, Enable_and_Status [TERL] bit.
- Change the token feedback configuration if required.
- Write the last response during the second window. This ends the seconds
window interval early.Note: The second window might time out in the absence of any response, expire waiting for the fourth (last) correct response, or finish earlier than the programmed value after receiving the fourth (last) correct response.
If it times out or expires, the watchdog restarts with the first window and expects the same question-answer sequence (i.e., the question cannot be changed by token feedback configuration).
The Enable_and_Status [ACNT] bit does not change with an incorrect response. Each incorrect response is considered a bad event and increments the fail counter. With a correct byte response, the [ACNT] status updates to “11.”
There can be more than one response possible in the second window due to incorrect responses.
- The next question is presented in the Enable_and_Status register.
- Repeat steps 10-13.
- After enabled in Q and A mode, the window mode can be disabled only when the fail counter is zero. An attempt to disable the watchdog does not change the fail counter in Q and A mode.
The response conditions are summarized in the following table. In most cases, the fail counter [FCV] either increments (+1) for a good event or decrements (-1) for a bad event. If the fail counter is 7 and an bad event occurs, then a system reset is put into motion. If [ACNT] does not advance, then it stays at the same count.