Hello,
I have a question regarding the watchdog of the TMS320F28379D.
We must use the watchdog in our application. In order to fulfill a safety standard we have to test the watchdog after power on. For this reason I have implemented the _system_pre_init() routine in my software to perform this test before controller initialization (the PLL init. in the C2000 ware also uses the watchdog to check if the PLL starts properly) is done.
I have implemented the following routine at the beginning of _system_pre_init().
#define WDOG_TEST
#ifdef WDOG_TEST
// watchdog is active after reset
if (CpuSysRegs.RESC.bit.WDRSn==0) // check reset cause
{
SET_DIG3; // set test IO, start of watchdog test
while (1)
{
asm(" NOP"); // wait for watchdog reset (~13ms)
}
}
else // here reset cause watchdog
{
CpuSysRegs.RESC.bit.WDRSn=1; // clear WDRSn bit
// watchdog test fulfilled
}
#endif
The macro “SET_DIG3” (#define SET_DIG3 GpioDataRegs.GPCSET.bit.GPIO66 = 1) sets the GPIO66 to check the test of the watchdog on the oscilloscope.
The routine works fine. But if you want to start the program from the debugger the DSP hangs at the NOP instruction.
Is the WDRSn bit in the RESC register not valid when the program is started from the debugger?
Thank you very much
Ralf



