Bin Wu

Problem when using UART (eTPU) function

Discussion created by Bin Wu on Dec 14, 2006
Latest reply on Dec 18, 2006 by Arev
Hi All,
I think this is a sample question.
I  am using 'fs_etpu_uart_read_receive_data' eTPU function to receive data.
Here is the code:
 uint32 data = 0;
 uint8_t errCode = 1;
  data = fs_etpu_uart_read_receive_data(11, &errCode);
  if (errCode == 0)
     //Postion 1
      return 1;
If I sent just one byte from other side, my code will always reach 'Postion 1' and return the same data value.
It seems that I missed to clear a flag after I receive each byte.
Could anyone point out what is wrong in my code?