<div dir="ltr"><div>First, the patch commit message needs to reference the ticket (#4903).</div><div><br></div><div>It would be nice to have Pavel's feedback but the submitter of <a href="https://devel.rtems.org/ticket/4903">https://devel.rtems.org/ticket/4903</a></div><div>provided the fix but not in patch format.  What do you think we should do beyond trust the </div><div>submitter of the ticket?</div><div><p style="color:rgb(0,0,0);font-family:Verdana,Arial,"Bitstream Vera Sans",Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,221)">bsps/arm/tms570/console/tms570-sci.c: tms570_sci_set_attributes()<br></p><pre class="gmail-wiki" style="background:rgb(247,247,247);border:1px solid rgb(215,215,215);border-radius:0.3em;margin:1em 1.75em;padding:0.25em;overflow:auto;color:rgb(0,0,0);font-size:13px">/* Apply baudrate to the hardware */
  baudrate *= 2 * 16;
  bauddiv = (BSP_PLL_OUT_CLOCK + baudrate / 2) / baudrate;
  ctx->regs->BRS = bauddiv? bauddiv - 1: 0;

</pre><p style="color:rgb(0,0,0);font-family:Verdana,Arial,"Bitstream Vera Sans",Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,221)">replacing with 2 fixed frame error<br></p><pre class="gmail-wiki" style="background:rgb(247,247,247);border:1px solid rgb(215,215,215);border-radius:0.3em;margin:1em 1.75em;padding:0.25em;overflow:auto;color:rgb(0,0,0);font-size:13px">ctx->regs->BRS = bauddiv? bauddiv - 2: 0;
</pre><p style="color:rgb(0,0,0);font-family:Verdana,Arial,"Bitstream Vera Sans",Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,221)">there is issue in baudrate calculation</p></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 11, 2023 at 12:52 PM Gedare Bloom <<a href="mailto:gedare@rtems.org">gedare@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Zack,<br>
<br>
Thanks for the patch. Someone should probably test it, or identify in<br>
the documentation why this calculation was off-by-1. Pavel, any clues?<br>
<br>
Gedare<br>
<br>
On Sun, Jul 9, 2023 at 10:09 PM zack <<a href="mailto:zakthertemsdev@gmail.com" target="_blank">zakthertemsdev@gmail.com</a>> wrote:<br>
><br>
> Fixes #4903<br>
> diff --git a/bsps/arm/tms570/console/tms570-sci.c b/bsps/arm/tms570/console/tms570-sci.c<br>
> index 768770a4c8..59a0b7e6f1 100644<br>
> --- a/bsps/arm/tms570/console/tms570-sci.c<br>
> +++ b/bsps/arm/tms570/console/tms570-sci.c<br>
> @@ -311,7 +311,7 @@ bool tms570_sci_set_attributes(<br>
>    /* Apply baudrate to the hardware */<br>
>    baudrate *= 2 * 16;<br>
>    bauddiv = (BSP_PLL_OUT_CLOCK + baudrate / 2) / baudrate;<br>
> -  ctx->regs->BRS = bauddiv? bauddiv - 1: 0;<br>
> +  ctx->regs->BRS = bauddiv? bauddiv - 2: 0;<br>
><br>
>    ctx->regs->GCR1 |= TMS570_SCI_GCR1_SWnRST | TMS570_SCI_GCR1_TXENA |<br>
>                       TMS570_SCI_GCR1_RXENA;<br>
> --<br>
> 2.34.1<br>
><br>
> _______________________________________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div>