I am currently testing a T30 with an Iris board, image 1.4 of CE7, using C# and your UART demo application slightly modified.
Everything works well until I close the port. If data was sent, sometimes there is an additionnal 8 bytes sent after closing the port.
I rooted down the problem to the DiscardOutBuffer() method. If I call it after sending data I get the problem.
comPort1 = new SerialPort(); ... opened_port = comPort1; opened_port.Write(txtSend.Text.ToCharArray(), 0, txtSend.Text.Length); opened_port.DiscardOutBuffer();
If I send the string “testing 1-2-3” and monitor the output on a PC using Tera Term, I get “testing 1-2-33-2-3-2-”. If I send “1234567” I get “123456756745674”. However if I send a multiple of 8 bytes everything is OK.
It looks like a bug since DiscardOutBuffer() should silently flush the buffer and not output 8 bytes from the sent buffer, which should alredy been flushed after sending the data…
This occurs on all UART, baud rate and parity setting. Any idea?