I've implemented a simple loopback thread in my firmware:
Code: Select all
while (TRUE) {
short c = (short) chSequentialStreamGet(chp);
consolePutChar((uint8_t) c);
}
I've written a tiny testing tool which sends, reads and compares bytes over serial TwoWayTester.java
I've validated my USB-TTL devices and the testing tool by looping two USB-TTL devices - what I read is ALWAYS what I send.
I am also ALWAYS reading what I've send if I am using Chibi build-in serial-over-usb driver, so I am pretty sure the problem is around the UART driver.
I've tried increasing the buffer the way it helped the simulator - viewtopic.php?f=2&t=1750 - but it did not help.
I am using 2.6.3 with seial_llc.c from 2.6 branch trunk to address viewtopic.php?f=16&t=1976
If needed I can improve my test code in order to figure out if the bytes are lost on read or on write. I will probably try the same test code with older releases because I kind of think some version in the past was pretty reliable in terms on UART.