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.

CCS/C2000WARE: interrupts

Part Number: C2000WARE


Tool/software: Code Composer Studio

Hello,

I have question related to NMI watch dog timer.

1. How is NMI handler works, do we need to write code for NMI handler or it will be taken care by the controller itself.

2. Is NMI watchdog period used for the NMI recovery ?

Need more details about NMI handler, how NMI recovery done.....kindly share any document tf available.

Thank you.

Sharath Choudary.

  • Hi,

    1. How is NMI handler works, do we need to write code for NMI handler or it will be taken care by the controller itself.

    Yes, you need to write NMI handler just like any other interrupt handler.

    2. Is NMI watchdog period used for the NMI recovery ?

    Yes but that recovery is done by user NMI handler not in hardware. Inside handler user need to check the error condition and take appropriate action based on their usecase. If appropriate action is not taken and NMI flag is not cleared by SW within NMI watchdog period then a reset will be issued by hardware.

    Regards,

    Vivek Singh

  • Hello Vivek,

    Thanks for the reply.

    1. In my source code i set watch dog period and I made clockfail signal high, then watch dog counter started incremented but the NMI Interrupt is not triggered. as per my understanding when clockfail occurs control should jump to NMI interrupt routine and when watch dog counter overflows watch dog period reset should be triggered (XRSn pin should go high).

    if my understanding is correct, let me know the procedure to execute NMI interrupt routine.

    PS : NMI interrupt routine is configured in pievector table.

    2. By default watchdog period is set to max value, can i configure to different time periods based on the type of NMI sources.
    Is it valid to do so?

    Regards,
    Sharath Choudary.
  • Hi Sharath,

    Sorry for late reply. Since post is not marked resolved, I am replying to your queries.

    1) Please note that on this device we have normal watchdog and NMI watchdog. NMI watchdog will start incrementing when ever a NMI event occurs (e.g. CLOCK FAIL). On NMI event, NMI ISR should get executed as long as it's been coded and mapped. How are you generating clock fail? Did you check the NMIFLG register after forcing the clock fail to make sure flash is set?

    2) No, you can not change the period based on NMI.

    Regards,

    Vivek Singh