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.

RM42L432: How do I correctly service the Digital Windowed Watchdog (DWWD), NMI Interrupt?

Part Number: RM42L432
Other Parts Discussed in Thread: LAUNCHXL-RM42, TMS570LS0432

I have a LAUNCHXL-RM42 that I am trying to understand how to properly use the Digital Watchdog.   I was using the Halocogen example file example_dwwd.c which demonstrates how to setup the Digital Watchdog with the Generate_NMI setting set for the dwwdinit function.   When running this example, the NERROR led will come on when the watchdog expires which is expected.   

I would like to run a specific safety shutdown function when this interrupt occurs assuming my normal program is no longer functioning and updating the watchdog correctly.  To my understanding, the interrupt from the Windowed Watchdog is mapped to ESM group 2 channel 24.   I would then expect the esmGroup2Notificaiton(uint32 channel) interrupt function in notificaiton.c to run with channel = 24 when the watchdog expires.   However, this is not the case.   Neither the esmGroup2Notificaiton or the esmGroup1Notificaitons functions run when the watchdog expires.   In the esm.c file, esmHighInterrupt (which calls the esmGroup1Notificaitons and esmGroup2Notificaiton) also does not run when the watchdog expires.  As far as I can tell, there is no serviceable interrupt that runs when the watchdog expires.   Am I missing something? I feel like this should be a pretty straightforward.   

I thought maybe this chip did not work as expected for some reason, but I tried the same things using a sister Hercules chip TMS570LS0432, and it behaves the same way.  

So my question would be the correct way to run a shutdown function immediately using the interrupt triggered by an expiring Digital Watchdog?  

Thank you for reading and for any help!  

Doug

  • Hi Doug,

    The ESM group2 errors generate either reset or a non-maskable high-priority interrupt to the CPU, and assert the ERROR pin. This is controlled by configuring the Digital  Windowed Watchdog Reaction Control Register (RTIWWDRXNCTRL).

    Did you configure the RTIWWDRXNCTRL register to generate NMI when DDW violation occurs?

  • After a great deal of fighting with this issue, and a bunch of reading, I finally figured out what my issue was.   The example example_dwwd.c in Halocogen is not specifically setup to handle the esmGroup2Notificaiton interrupt.   The example enables interrupts by calling enable_IRQ() which apparently only enables IRQ interrupts, but not FIQ interrupts which the esm interrupts are.   I finally realized that calling enable_interrupt_() is the correct interrupt enable command to enable both IRQ and FIQ interrupts.   This resolved my issue with the example.   Hopefully, this helps someone else someday.