Hi!
I'm using Piccolo and I'm trying to use the NMI watchdog to let the system in a defined state before reset.
I get the NMIINT, but I don't clear the flags, as I wanna let the system reset.
// NmiIntruptRegs.NMIFLGCLR.bit.CLOCKFAIL = 1;
// NmiIntruptRegs.NMIFLGCLR.bit.NMIINT = 1;
I check the MCLKSTS bit in PLLSTS after reset, but is not set.
The CLOCKFAIL bit in NMIFLG is set.
Maybe I don't test it right. I simulate a clock fail by writing:
NmiIntruptRegs.NMIFLGFRC.bit.CLOCKFAIL = 1;
As I understood, if the NMIRESETSEL =1, the CLOCKFAIL signal will be generate in case of a clock failure. This will trigger the NMIINT and start the NMIWD counter. If I don't clear the flags, the counter expired, generates NMI reset, which is passed to MCLKRS, and the system will reset. But if a MCLKRS is generated, shouldn't MCLKSTS be set?
Is there another possibility to test this?
Thank you,
Monica