Part Number:TMS320F28379D
Tool/software: Code Composer Studio
I am using LAUNCHXL-F28379D.
Table 2-52 of the Technical Reference Manual states that WDKEY is write protected, but this does not seem to be true.
The GEL file used to launch a debug session disables the watchdog, so before I begin running code I see WdRegs.WDCR.bit.WDDIS = 1 in the expressions window, which makes sense. At the beginning of main, I have the following code lines:
EALLOW;
WdRegs.WDCR.all = 0x68;
WdRegs.WDCR.all = 0x28;
EDIS;
So this (re-) disables the watchdog and immediately enables the watchdog. As a consequence, I see WdRegs.WDCR.bit.WDDIS = 0 in the expressions window after I begin running code, which also makes sense. Inside the while(1) loop, I have the following code lines:
EALLOW;
WdRegs.WDKEY.all = 0x55;
WdRegs.WDKEY.all = 0xAA;
EDIS;
With these lines, I can keep the program running indefinitely, which also makes sense. However, if I edit the code lines above to read
// EALLOW;
WdRegs.WDKEY.all = 0x55;
WdRegs.WDKEY.all = 0xAA;
// EDIS;
then the program also runs indefinitely, without triggering a watchdog reset, which does not make sense unless WDKEY is not write protected.
Is Table 2-52 incorrect?