Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd rounding to Baud Rate Divisor calculation. Permits operation at … #55
Conversation
…30400. regression tested at standard speeds 9600, 19200, 38400, 57600, 115200...
The Baud Rate Generator Divisor calculations in UARTClass::init() do not round, leading to error rates higher than they could be. In particular, the error at 230400bps is both large and in the opposite direction of the 16u2 error, and it fails. Adding rounding allows it to work.
regression tested at standard speeds 9600, 19200, 38400, 57600, 115200...