AnsweredAssumed Answered

why COP_ISR(void) can not work

Question asked by 明超 戴 on Apr 8, 2016
Latest reply on Apr 14, 2016 by 明超 戴

I use MC9S12XEP100 to test the function cop.

I have found a cop process function ,when the watchdog timer overflow ,the system can reset ,but it can not step into the

COP_ISR(LED can not turn on),Can you help me,thank you !

 

//******************************************************************************

// COP reset

//******************************************************************************

 

#pragma CODE_SEG NON_BANKED

interrupt 2 void COP_ISR(void)

{

    DDRA = 0xff;

    PORTA = 0x00;          //LEDs on - show we entered the COP_ISR    

    for(i=0; i<60000; i++)  //delay

    {

        asm nop;

    }

    PORTA = 0xff;

    asm jmp _Startup;      //jump to power-on reset vector

    // !!! RTI instruction cannot be executed because this is not interrupt !!!

}

Outcomes