[PATCH] TMS570 console driver, SCI frame error (baudrate calculation error)
Gedare Bloom
gedare at rtems.org
Tue Jul 11 17:52:27 UTC 2023
Hi Zack,
Thanks for the patch. Someone should probably test it, or identify in
the documentation why this calculation was off-by-1. Pavel, any clues?
Gedare
On Sun, Jul 9, 2023 at 10:09 PM zack <zakthertemsdev at gmail.com> wrote:
>
> Fixes #4903
> diff --git a/bsps/arm/tms570/console/tms570-sci.c b/bsps/arm/tms570/console/tms570-sci.c
> index 768770a4c8..59a0b7e6f1 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? bauddiv - 1: 0;
> + ctx->regs->BRS = bauddiv? bauddiv - 2: 0;
>
> ctx->regs->GCR1 |= TMS570_SCI_GCR1_SWnRST | TMS570_SCI_GCR1_TXENA |
> TMS570_SCI_GCR1_RXENA;
> --
> 2.34.1
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list