Phenomenon: the COP watchdog are effective only in the debug,
I tried to add a Watchdog to my project, in the initial stage to initialize the Bus Clock and COP Watchdog. No dog in the main loop. I expect the Watchdog within 2 s after initialization is complete produce reset, but that is not the case, reset, when running in debug mode, reset has to happen every time, why? I left out the details?
In the Main. C code is as follows:
The Prm file code is as follows:
CodePudding user response:
Problem solved, CPMUCOP this register can only be written once, every bit operation is a write, so only bit operation shall, for the first time, the solution is to register the whole assignment,