What is the secret to getting the COP (WD) to work properly? I looked at the Processor Expert generated code and it is doing the same thing that I am. It is clear that the WD times out when I am stepping through the code. What am I doing wrong?
Code in initialization -
Crg.copctl.bit.cr = 0x07; // tBus * 2^24 = 671mS timeout
#define WDog_Clear() (Crg.armcop.byte = 85, Crg.armcop.byte = 170, 0)
Resets placed in body of code -
WDog_Clear(); // clear wd