David LECOMTE

Rx interrupt error

Discussion created by David LECOMTE on Jan 9, 2009
Latest reply on Jan 10, 2009 by erooll
Find my following code under here
void interrupt VectorNumber_Vscirx isr_rx(void)
{
 unsigned char RX_car;   // Caractere reçu
 
 Cod_err = 0;
 RX_car = SCID;  // read SCI1S1 to check for receive errors
  if (RX_car & 7)     // is there any rx errors?
  { // yes, make a dummy read of the rx data and return
       // dummy read of rx data to clear the interrupt flag
    //Buf_car[No_car] = RX_car;
    //No_car++;
    Cod_err = 3;
    RX_car = SCID;
    return;
  }
When my  interrupt run, my check error reception (RX_car & 7) is always true.
I already check SCI1S1 register and i can see:
PF=0; FE=0; NF=0; OR=0; IDLE=1; RDRF=1; TC=1; TDRE=1
So  whait is the error?
Thanks
David

Outcomes