> > > but testing stop bits seems less useful to me. Even if you > > discover framing error what would you do ? Trash the byte ? > > Ask for resend ? > > Hardware USARTs generally return a framing or overrun error > and (I think) along with the data which was received. Upper > level software then chooses what do to with the octet (ask > for resend, etc). Different UART's behave differently things when they receive an incorrectly-framed packet. The approach I took in my interrupt-driven software UART (which I personally would like to see done in hardware) is to hold the last 32 bits that came in [sampled with a 3xbaud clock] and grab a byte whenever a properly-aligned byte has been shifted in. IMHO, this should allow the UART to correctly-align itself after a framing error much faster than the conventional techniques (other approaches include delaying start-bit detect until the next *falling edge*, or regarding the missing stop bit as the next byte's start bit). Does anyone know if any hardware designer has ever done a UART this way?