forked from Imagelibrary/rtems
bsp/tms570: correct baudrate calculation.
This commit is contained in:
@@ -311,7 +311,7 @@ bool tms570_sci_set_attributes(
|
||||
/* Apply baudrate to the hardware */
|
||||
baudrate *= 2 * 16;
|
||||
bauddiv = (BSP_PLL_OUT_CLOCK + baudrate / 2) / baudrate;
|
||||
ctx->regs->BRS = bauddiv;
|
||||
ctx->regs->BRS = bauddiv? bauddiv - 1: 0;
|
||||
|
||||
ctx->regs->GCR1 |= TMS570_SCI_GCR1_SWnRST | TMS570_SCI_GCR1_TXENA |
|
||||
TMS570_SCI_GCR1_RXENA;
|
||||
|
||||
Reference in New Issue
Block a user