bsp/tms570: Fix SCI baud calculation

The bug was introduced by cc6f1d86cc.

Update #4982.
This commit is contained in:
Sebastian Huber
2024-06-25 10:06:29 +02:00
committed by Kinsey Moore
parent 263cbb9408
commit e5b6fa026a

View File

@@ -296,7 +296,7 @@ bool tms570_sci_set_attributes(
}
/* Apply baudrate to the hardware */
baudrate *= 2 * 16;
baudrate *= 16;
bauddiv = (TMS570_VCLK_HZ + baudrate / 2) / baudrate;
ctx->regs->BRS = bauddiv? bauddiv - 1: 0;