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.

F28M35H52C: NMI Watchdog on M3 and C28

Part Number: F28M35H52C

Hi,

   I am working on the F28M35x controller. I am looking for examples on NMI watchdog timers, but could not find any in the Control Suite. Can you direct me to the right link or give some clue on how to implement it?

Thanks

  • Hi Anoja,

    We do not have specific example on NMI Watchdog but this is very simple IP which does not have much of configuration. There are different source of NMI and when any NMI source triggers NMI, NMI watchdog also start running and if NMI handler (User SW code) does not clear the NMI source in given time (before NMIWD counter expires), it'll generate the reset. NMI is always enable.

    Regards,

    Vivek Singh

  • Hi Vivek,

       Thank you for the response. So, How will the initialization on WDT be? I did not find any info on the reference manual too.

    How do I link Watchdog to NMI handler?

    spruh22h.pdf

  • Hi Vivek,

       I found this link https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/501981?Watchdog-timer-for-Concerto-C28x in which you mentioned how to set up NMI C28x.

    • Force NMI on C28x by setting a flag in CNMIFLGFRC register. This will generate NMI on C28x.
    • Inside NMI handler wait for CNMIWDCNT to timeout (you could modify the CNMIWDPRD to minimize the wait) so that it resets the C28x.
    • Reset on C28x will generate NMI on M3
    • In M3 NMI handler again wait so that MNMIWDCNT times out and issue a reset. This will reset full device/system.

    I am unclear about the first step. Can you explain where this step has to be done? Is it on the main loop?

    Again, which flag has to be set in CNMIFLGFRC  register?

    struct NMIFLGFRC_BITS { // bits description

    Uint16 rsvd1 : 1; // 0 Reserved
    Uint16 CLOCKFAIL : 1; // 1 CLOCKFAIL NMI Flag Force
    Uint16 C28RAMUNCERR : 1; // 2 C28 RAM Uncorrectable Error NMI
    // Flag Force
    Uint16 C28FLUNCERR : 1; // 3 C28 Flash Uncorrectable Error
    // NMI Flag Force
    Uint16 rsvd2 : 2;
    Uint16 AERR : 1; // 6 Analog System Control Error NMI
    // Flag
    Uint16 rsvd3 : 9; // 15:7 Reserved

    };

    The above code snippet is from F28M35x_Nmiintrupt.h

    In the above struct, I do not find anything related to the watchdog. Can I randomly select a flag to set NMI?

  • Hi,

    I am unclear about the first step. Can you explain where this step has to be done? Is it on the main loop?

    Yes, it need to be done inside main loop but the force feature is used to test the NMI. In actual application this will get triggered if there is any of these error.

    Again, which flag has to be set in CNMIFLGFRC  register?

    Just for testing, you can set any of the flag. All the flags trigger NMI (combined OR gate) hence this is called NMIFLG register.

    In the above struct, I do not find anything related to the watchdog. Can I randomly select a flag to set NMI?

    As mentioned, all the errors are combined into one NMI trigger which triggers NMIWD.

    Hope this is clear.

    Regards,

    Vivek Singh

  • Hi,

    Let me know if you have any further queries on this?

    Regards

    Vivek Singh

  • No. Thanks for the help.