Hi Experts,
I am asking for my customer here. Customer want to use CPU1.WDRS and CPU2.WDRS to reset CPU1 & CPU2.
We tested the below code, it's a bit off what's described in the TRM manual below Table.
#define WD_PRESCALER_1 0
#define WATCHDOG_PRESCALER WD_PRESCALER_1
#define WatchDog_enable(WD_PRESCALER) \
EALLOW; \
WdRegs.WDKEY.bit.WDKEY = 0x0055; \
WdRegs.WDKEY.bit.WDKEY = 0x00AA; \
WdRegs.WDCR.all = WD_CHECK|WD_PRESCALER; \
EDIS;
#define WatchDog_restart() \
EALLOW; \
WdRegs.WDKEY.bit.WDKEY = 0x0055; \
WdRegs.WDKEY.bit.WDKEY = 0x00AA; \
EDIS;
#define WATCHDOG_RESTART()
WatchDog_restart()
#define WATCHDOG_ENABLE() \
WatchDog_enable(WATCHDOG_PRESCALER)
void main(void)
{
WATCHDOG_ENABLE();
While(1)
{
WATCHDOG_RESTART();
……
}
}
Test results:
CPU1 WD reset -> CPU1 + CPU2 both reset
CPU2 WD reset -> CPU1 + CPU2 both reset
But from the below table, CPU1.WDRS can reset both CPU1 and CPU2, but CPU2.WDRS only can reset CPU1.
Could you help look into this issue above? Why CPU2.WDRS can reset both CPU1 and CPU2? Thanks.
