AnsweredAssumed Answered

problem ILLEGAL_BP mc9s12xdp512

Question asked by claire delange on Dec 11, 2012
Latest reply on Dec 14, 2012 by claire delange

Hi,

 

I must create a programm that generate signal from bus CAN data with timer interrupt (ECT). But when I send frame (in debug) I have Illegal_bp in command windows.

 

I don't know how to correct this error. Can you help me ? If you have any question ask me.

I programm this:

 

void timer_counter () {

    TIOS = 0xFF;         //  timer output compare register

  TCNT = 0x0000;       //timer count register

  TSCR1 = 0x80;        //timer system control register

  TSCR2 = 0x05;        //timer system control register 2

//  TCTL1 = 0x55;        //timer control register output mode

  TCTL2 = 0x55;

  TIE = 0x0F;          //timer interupt enable

  TFLG1 = 0x0F;        //main timer interrupt flag

}

 

void interrupt 8 TOC0_ISR () {
  DisableInterrupts;

 

  TFLG1 = TFLG1_C0F_MASK ;    // rabaisse le flag de l'interruption
  buffer_empty1 = buffer_lenght - buffer_full1;
 
if (buffer_empty1 == buffer_lenght) {
    PORTB =0b00000100  ;
     sendOnCanEmpty ()   ; 
}
  if ( read_buffer_wheel1 < buffer_lenght ){                    //test taille de la memoire
     TC0 = TC0 + wheel1[read_buffer_wheel1] ;                //lecture des donnees
     read_buffer_wheel1 ++    ; //incrementation compteur lecture
      } else{
         read_buffer_wheel1 = 0    ;                           //rebouclage memoire   .
         TC0 = TC0 + wheel1[read_buffer_wheel1] ;                //lecture des donnees
     }                                                         

  EnableInterrupts ;   
}

 

 

Thank you !!

Outcomes