bsp/tms570: Add clock BSP options

Update #4982.
This commit is contained in:
Sebastian Huber
2024-04-23 21:06:52 +02:00
committed by Amar Takhar
parent 28e4a46d67
commit cc6f1d86cc
11 changed files with 142 additions and 10 deletions

View File

@@ -297,7 +297,7 @@ bool tms570_sci_set_attributes(
/* Apply baudrate to the hardware */
baudrate *= 2 * 16;
bauddiv = (BSP_PLL_OUT_CLOCK + baudrate / 2) / baudrate;
bauddiv = (TMS570_VCLK_HZ + baudrate / 2) / baudrate;
ctx->regs->BRS = bauddiv? bauddiv - 1: 0;
ctx->regs->GCR1 |= TMS570_SCI_GCR1_SWnRST | TMS570_SCI_GCR1_TXENA |