Hi Everyone,
I am trying to send variable length serial packets from Linux to the 1310 at 115200 baud. To start with I am using the uartecho.c example application.
From Linux (beaglebone black) I am sending 4 characters ("test"). I am expecting that, while running the uartecho application, the same 4 characters
will get echoed back to linux. I have linux TX connected to 1310 RX and vice versa. I have Putty running on my PC using FTDI with only the RX and GND connected
to the 1310 DIO3 (RXD) and GND respectively so I can see what is being received by the 1310.
The linux application just sends out the 4 characters "test" one time.
What I am seeing is that the 1310 sees the same 4 characters on input ("test") over and over and keeps echoing them out. The uartecho.c example is configured to read
one character at a time. It's acting as if the 1310 uart input buffer is never cleared but when I use the UART_control() function to read the number of chars remaining
in the input buffer after calling UART_read() it always says 0.
The code for reading the input buffer size is: UART_control(uart, UART_CMD_GETRXCOUNT, &count);
On the Putty screen I see:
testtesttesttesttesttest...
etc.
The linux side only calls write(fd, "test", 4) once.
Now things get really strange :)
If for every 1310 input byte I added 2 to it's value and echoed that back to linux instead. On the linux side I see:
successfully opened /dev/ttyO4
ping() sent 4 bytes
ping() received 4 bytes
sent: 0x74 (t) got: 0x76 (v)
sent: 0x65 (e) got: 0x67 (g)
sent: 0x73 (s) got: 0x75 (u)
sent: 0x74 (t) got: 0x76 (v)
This led me to believe that the "add 2" operation changed the timing but adding a 10 msec delay between each
1310 RX and TX instead of "add 2" made it fail again.
Any ideas?
Victor