This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why output data is wrong by serial?

hello,everyone!
I wrote a program about serial communication and when I run it on simulator,it is no problem, but when I upload it to the Phytec KitCon167's flash,something wrong occur.
The program is below:

unsigned char temp,temp1;

void main()
{
  serial_init ();

  temp = 0x45;
  while(1)
  {
    transmit_data(temp);
    while (! S0TBIR)
    {
     ;
    }
    S0TBIR = 0;
    temp1 = 0x23;
    transmit_data(temp1);
    while (! S0TBIR)
    {
     ;
    }
    S0TBIR = 0;

    temp1 ++;
    transmit_data(temp1);
    while (! S0TBIR)
    {
     ;
    }
    S0TBIR = 0;
}

In simulator,serial output is 45 23 24;
but in KC167,serial output is FF 23 FF.
Who can tell me,what happen to the program?

0