Tool/software: TI C/C++ Compiler
Do you have an example of how to program the C28 WDT?
Thanks,
Pat
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI C/C++ Compiler
Do you have an example of how to program the C28 WDT?
Thanks,
Pat
For a general demonstration of the functionality, you could put something like this in main() (I just modified the blinky example to start):
// Register an NMI ISR
EALLOW;
PieVectTable.NMI = &nmisr;
EDIS;
// Enabled the NMI and force the CLOCKFAIL flag to trigger an NMI.
// NMI appears to be already enabled, but I'll set the bit again just in case.
EALLOW;
NmiIntruptRegs.NMICFG.bit.NMIEN = 1;
NmiIntruptRegs.NMIFLGFRC.all = 0x0002;
EDIS;
And then in the ISR you clear the flag (or not if you want to see the reset):
__interrupt void nmisr()
{
// Clear the CLOCKFAIL flag and the NMI flag to stop the counter.
// Comment out the clearing of the flag to observe a reset of the C28.
EALLOW;
NmiIntruptRegs.NMIFLGCLR.all = 0x0003;
EDIS;
}
Was there something in particular that you were having trouble with?
Whitney