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.
Hi:
Im having a few issues with ensuring the watchdog window threshold is not being used. In the code, i do the following:
- At startup, i read 0x7002A which is the WDWCR register memory location. I get a decimal value of 64 even though i set the WDWCR register to all 0's per the following (EALLOW; WdRegs.WDWCR.all = 0x0; EDIS;)
- I expected the WDWCR to read 0. is this not correct expectation?
The other issue is that the Reset cause register is always saying the reset cause was watchdog (value = 4, reading 0x5D380 RESC register) even when the watchdog is disabled (confirmed by reading 0x70029 WDCR).
I have tried clearing the reset cause register the following way also.
// Clear the Reset Cause
EALLOW;
CpuSysRegs.RESC.bit.WDRSn = 0;
EDIS;
Appreciate any thoughts on why its not functioning as expected or if im understanding it wrong.
Thanks,
Abe
Hi,
- I expected the WDWCR to read 0. is this not correct expectation?
It should read 0. Can you double check that you are reading correct address. You could also check the value of this register in CCS register view.
The other issue is that the Reset cause register is always saying the reset cause was watchdog (value = 4, reading 0x5D380 RESC register) even when the watchdog is disabled (confirmed by reading 0x70029 WDCR).
Please note by default WD is enabled so it may be firing a reset even before code disables it. Do you see XRSn pin toggle on the board (you need to see it via scope) ?
Regards,
Vivek Singh