AnsweredAssumed Answered

UART Err

Question asked by Xiaoqiang Fu on Sep 7, 2018
Latest reply on Sep 10, 2018 by Victor Jimenez

UART project is created using MKE02Z64 with PE in codewarrior.

When sending "0x00" in HEX using serial debug, there is always AS1_OnError() interrupted by Noise error.

When sending other number than "0x00", everything goes well.

 

It puzzles me long time.

The sample project is attached.

 

void AS1_OnError(void)
{
  /* Write your code here ... */
    
    AS1_TError error;        // TError type is defined in the AS1.h header file
      
      AS1_GetError(&error);    // determine the type of error
      if(error.errName.Parity) {
        //Parity error
      } else if(error.errName.Framing){
        //Framing error
      }

 

}

 

void AS1_OnRxChar(void)
{
  /* Write your code here ... */
    char ch;
    if(AS1_RecvChar(&ch) == ERR_OK)
    {
        received = 1;

 

        index++;
        data_receive[index] = ch;
    }
}

Attachments

Outcomes