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

UART Tx issues

I have a windows app that sends the following 8 bytes to the NXP LPC2478 UART2 at 38400, 8 bits 1 stop.

01 06 02 00 01 03 09 9B

Once received the NXP echos these bytes back to PC.

What I get back is 01 06 02 00 01 03 09, the 9B is missing. If I send the bytes again then the echo starts with 9B followed by most of the bytes sent. If byte 2 is changed from 02 to 03 or greater then the echo is always correct. If byte 2 is 01 then the first time I get 01 06 01 00 01 03, this time missing 09 and 9B. Sending the command again I then first get the 09 9B followed again by some or all characters send. I have enabled only Rx interrups and both Rx and Tx interrups, does not matter.

  • Obvious place to start:

    1. does the NXP receveive the bytes correctly?

    2. does the NXP think that it's sent the "echo" bytes correctly?

    Does it work in the simulator?

  • I verified using the ULink2 that the NXP did in fact receive the characters properly. Also when I send the charactes I see that all 8 are being sent. A call is made to this function to send all 8 characters

    int com_putchar (int ch) { while (!(*UxLSR & 0x20)); *UxTHR = ch;

    return (*UxTHR);
    }

    On the PC side I have a serial monitoring program which I have used for a number of years to monitor what the PC is receiving.