Part Number: TMS320F28379D
Tool/software:
Hello,
I need advice on the watchdog management.
On the both CPU of the microcontroller, I configured a watchdog with causes a PIE interrupt (WAKE)
In the associated ISR:
- I write something in the FLASH of the CPU
- I switch the mode of the Watchdog to RESET_MODE
- I ask for a watchdog reset thanks to the driverlib function SysCtl_resetDevice(). This function actually put something incorrect in the watchdog register, and that causes a Watchdog event (that's the reason why I set this event as "RESET")
When a blocking tasks comes in the CPU1, everything is fine: the both cores reset.
When a blocking tasks comes in the CPU2, I expected that:
- the CPU2 reset and wait for the IPC_sync to continue its programm
- the CPU1 watchdog arrives (since CPU1 transmitts many data to CPU and wait for acknowledgments) and asks for a CPU1 reset
- CPU1 and CPU2 reset (second times for CPU2)
- The whole programm run as the first time
But sometimes, in emulation mode, when watchdog on CPU2 appears, the CPU1 bocks in this function:

I saw in the reference manual that the CPU2 watchdog reset causes the NMI. So, I have a lot a questions:
1) the NMI handler is defined in the driverlib files. If I have to manage the NMI, how can I do it, since I "cannot" modify the driverlib files ?

2) I notice that I do not enter in this handler each time I cause a CPU2 watchdog event. How is it possible ? (in my application, I enter in this handler only if a CPU1 Watchdog appeared before)
3) I run my project in the Stand Alone mode, the programm does not enter in the infinite loop. Everything seems to be OK. Is it possible that the nmi is due to something else (Clock Fail, Error ...) that only appears in emulation mode
4) I read in the reference manual that we must not change the Watchdog mode while the signal WDINT is active (512 SYSCLK). But I do change it. Should I wait before to do this ? Is it really useful to do it to make the watchdog event cause a reset ?
5) Finally, in my application, would it be not more safety to block the CPU2 programm if the watchdog appears ? (that will cause a watchdog on CPU1, due to the application)
Thank you for your advice. I tried to be general and clear.
Vincent.
