JAJSOH5D November 2022 – November 2023 TPS389C03-Q1
PRODUCTION DATA
A question is presented to the MCU as a combination of the TOKEN[3:0] and the ANSW_CNT[1:0] status bits found in the WD_STAT_WA register. ANSW_CNT[1:0] has a default value of ANSW_CNT[1:0] = 11b and is decremented when a question is answered correctly. The value of ANSW_CNT[1:0] is reset to ANSW_CNT[1:0] = 11b when a question is answered incorrectly or a good event is completed.
The watchdog uses the Token Counter (TOKEN_CNT[3:0] bits Figure 7-10) and a Linear Feedback Shift Register (LFSR) to generate the 4-bit TOKEN[3:0]. The LFSR architecture can be configured using POLY[1:0] in the WDT_QA_CFG register in BANK1 as shown in Figure 7-10. In a typical application, it is not necessary to change the value of POLY[1:0] from the default 00b. However, POLY[1:0] can be configured if a different LFSR architecture is required. The diagram illustrated in Figure 7-9 represents how questions are generated by the watchdog.
During the watchdog startup state, the LFSR is set with the initial value SEED[3:0], which is located in the WDT_QA_CFG register in BANK1. SEED[3:0] has a default value of 0000b.At the end of a good event, the Token Counter is incremented, and the value of TOKEN[3:0] will change as a result of the mux and logic combinations shown in Figure 7-10.
Once the Token Counter has reached the maximum value of 1111b, the counter will reset and provide a clock pulse to the LFSR. The clock pulse will left shift the value stored in the LFSR, which changes the value of the TOKEN[3:0]. During the special case of SEED[3:0] = 0000b, Bit 0 of the LFSR will be incremented the first time the Token Counter resets. Subsequent Token Counter resets will provide the typical clock pulse that left-shifts the LFSR. While left shifting, the value of seed will cycle through values 1 to 15 as listed in Figure 7-10.
The mux devices that generate TOKEN[3:0] are configured using FDBK[1:0] (WDT_QA_CFG register in BANK1). It is not necessary to change the value of FDBK[1:0] from the default value of 00b, and it is important to note that changing FDBK[1:0] also changes the logic equations required to calculate the reference answer. The different reference answer logic equations are listed below:
For FDBK[1:0] = 00b :
For FDBK[1:0] = 01b :
For FDBK[1:0] = 10b :
For FDBK[1:0] = 11b
Example code for answer calcultion when FDBK[1:0] = 00b is included in Figure 7-11.