COP & Clock Monitor Question >> 3 days left to submit final product >> Please HELP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

COP & Clock Monitor Question >> 3 days left to submit final product >> Please HELP

1,264 Views
pIx
Contributor I
HI

I am using HCS12DP512 and Codewarrior 4.5.

COP:

1. I have enabled COP, and it resets or stops the microcontroller when the counter runs out when I am connected via P&E BDM, but does not restart the microcontroller and start execution of the code from begining after reset? How can I get it to restart/reset the controller and begin execution of the code from begining again?

2. When not connected via P&E BDM (stand alone), it does not reset/stop the controller itself, its as if COP is not running?

Clock Monitor:

In case of a clock faliure, I would want the controller to reset itself. I have enable CME and set SCME to 0 (so that it does not self clock and only reset the controller). I don't know how to test it as my clock is fine now, so am wondering if I need to do anything more that this.

Thanks a million for all the help.
~Sujith
Labels (1)
0 Kudos
1 Reply

310 Views
DanielM
Contributor III
Hi,

ad 1) the problem might be that the micro takes the COP reset vector rather than the power-on reset vector when the cop expires. Are you sure you have the right address for the COP vector in your vector table?

ad 2) Just short circuit the crystal on the board. The part will detect the failure, it will reset and since SCM is enabled out of reset it will start in SCM after the reset occurs. What you do when your application starts with no crystal is up to you...

Daniel
0 Kudos