You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Receive processing samples the incoming signal at four times the baud rate. See the design notes document for a nice diagram. Since the first sample time is aligned with the beginning of the start bit, each data or parity bit is sampled three times, at the 25%, 50%, and 75% points. This is also true of the stop bit in case of a single-baud stop bit. Longer stop bits are sampled more times, but the last sample is always 0.25 baud before the nominal end of the stop bit.
Currently, the receive handler stops processing immediately after that last sample, 0.25 baud early. This is not normally a problem. However, there are cases where it does cause a problem, and such a case arose in developing the automated test framework. To change configuration and/or baud rate, the test controller sends a command packet to the unit under test (UUT), and the UUT sends back an acknowledgement. Once this exchange is complete, both devices change to the new configuration and baud rate. The UUT is the transmitter for the final ack, and the controller is the receiver. The transmitter takes the full duration of the stop bit(s) to complete its transmission, but the receiver (test controller) thinks it has finished 0.25 baud earlier. If the test controller immediately begins transmitting a new command at the new baud rate and configuration, the UUT won't be ready to receive it yet.
In the automated test framework, this problem was seen on the transition from 45.45 baud (the last and slowest rate tested) back to 9600 baud, but not on transitions from faster speeds. The test framework currently works around this problem by adding a baud of delay, but a better solution would be for the SlowSoftSerial receive processing to wait until the nominal end of the stop bit(s) before processing the received character.
Activity