Confusion with COP and BDM: Catching a COP reset with BDM & MC9S08xx

Discussion created by PG1 on Mar 6, 2012
Latest reply on Mar 7, 2012 by PG1

I have a multilink BDM connected to a target MC9S08xx processor. The code locks in the COP as ENABLED.

I set a breakpoint at the first line of code to execute after a reset.


When I hit run after encountering the breakpoint, the target's code runs into an infinite loop and the COP times out. 


However the BDM does not break. The target keeps running into the infinite loop and resetting, over and over with each COP timeout. 


I am guessing  this is because the COP reset wiped out the breakpoint in the debug registers.


If I am wrong, and the BDM should break at the first line of execution after a COP reset, please let me know.