#include <hidef.h> /* common defines and macros */ #include <mc9s12dg128.h> /* derivative information */ #pragma LINK_INFO DERIVATIVE "mc9s12dg128b" void main(void) { /* put your own code here */ COPCTL = 0x07; EnableInterrupts; for(;;) { ARMCOP = 0x55; ARMCOP = 0xAA; //ARMCOP = 0x00; // COP Reset would happen becaue not 55-AA written } /* wait forever */ /* please make sure that you never leave this function */ } #pragma CODE_SEG NON_BANKED void COP_RESET_ISR(void){ /* write code here what to do after COP reset*/ } |
欢迎光临 智能车制作 (http://dns.znczz.com/) | Powered by Discuz! X3.2 |