I am using MKL27Z256, 32 pin.
COP_HAL_Init( SIM );
cop_config.copClockSource = kCopLpoClock;
cop_config.copDebugModeEnable = false;
cop_config.copStopModeEnable = false;
cop_config.copTimeout = kCopTimeout_short_2to10_or_long_2to18;
cop_config.copTimeoutMode = kCopShortTimeoutMode;
cop_config.copWindowModeEnable = false;
COP_HAL_SetConfig( SIM, &cop_config );
COP_HAL_Refresh( SIM );
I have this code starting up late after I initialized my entire program. For some reason, I cannot get the COPC register in the SIM module to reflect the changes made above. When I'm in the debug mode and monitoring the SIM module, COPC registers are never changed and stay at 0. I cannot manually change these values within the debugger either, they instantly snap back to zero.
When I'm out of debug mode and lock the main() application, the COP never resets the system.
Is there a special sequence that I must do to modify these values? Any help would be appreciated. I am using KSDK1.3 and using the HAL layer only.