summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2018-11-14 23:48:56 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2018-11-14 23:48:56 +0100
commit5247a21436976e5ec745b237fd38bb3817cdb117 (patch)
tree95441803425670ec242d1d054b67fa0fe30123df
parentbsp/tms570: correct inclusion of header files for build with HW init. (diff)
downloadrtems-5247a21436976e5ec745b237fd38bb3817cdb117.tar.bz2
bsp/tms570: correct baudrate calculation.
-rw-r--r--bsps/arm/tms570/console/tms570-sci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bsps/arm/tms570/console/tms570-sci.c b/bsps/arm/tms570/console/tms570-sci.c
index 48986e9a2e..9f16c42428 100644
--- a/bsps/arm/tms570/console/tms570-sci.c
+++ b/bsps/arm/tms570/console/tms570-sci.c
@@ -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;