Hi,
I am trying to implement a watchdog timer in my code, and I think the register is being addressed before I use the init function, but I can not find where. I was able to find the disable in the system_MKL17Z644.h file:
#ifndef DISABLE_WDOG
#define DISABLE_WDOG 0
#endif
However when I set the define to 0 I get a working watchdog timer, but not with the settings that I am sending. I am trying to set the debug bit, and the long timeout bits as I would like as long of a timeout as I can set to start with, but when I read the register after I write to it, I only see that COPT has been set to 11, all other bits are 0. This is read through a PE Micro debugger.
For reference, here is a sample of what i cam doing to enable the COP, my actual code is way to big to just paste in.
#include "fsl_cop.h"
#include "fsl_rcm.h"
cop_config_t configCop;
COP_GetDefaultConfig(&configCop); //Here is where I setup the long delay and debug bits
COP_Init(SIM, &configCop);
No matter when I check the register, I see the same settings, that is at the top of main, right before and right after the init().
Does anyone have any ideas as to what I am doing wrong?
Thanks!