Hi,
The data sheet states:
2. WCOP, CR2, CR1, CR0:
— Anytime in Special Mode, when WRTMASK is 0, otherwise it has no effect
— Write once in Normal Mode, when WRTMASK is 0, otherwise it has no effect.
– Writing CR[2:0] to “000” has no effect, but counts for the “write once” condition.
– Writing WCOP to “0” has no effect, but counts for the “write once” condition.
If you use bit writes (bit processing instructions) then the register is processed by read-modify-write process so the change of the only one bit writes to/ modifies entire byte.
In the case of write once registers (in normal mode) the access to second write is disabled. It is always strictly recommended to check whether you do not write to write once register more than once. (The issue usually appears if you use same automatic setup tools where you do not see directly what has already been set by a tool)
I would like to suggest you to read: S12 FAMILY DEVICES COP RECOGNITION CONSIDERATIONS_v2.0.pdf
The COP is usually not debuggable because the debugger loses connection during reset. Moreover, next issue of a reset recognition can be improper capacitance at reset pin which casues the COP is not recognized and the reset is considered as an POR reset so the start of the code is not at COP reset vector but at POR vector..
Capacitor calculation can be simply done by attached excel sheet (reset recognition).
Bets regards,
Ladislav