diff options
Diffstat (limited to 'bsps/riscv/riscv/console/fe310-uart.c')
-rw-r--r-- | bsps/riscv/riscv/console/fe310-uart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bsps/riscv/riscv/console/fe310-uart.c b/bsps/riscv/riscv/console/fe310-uart.c index 506521add0..ddabcff4c8 100644 --- a/bsps/riscv/riscv/console/fe310-uart.c +++ b/bsps/riscv/riscv/console/fe310-uart.c @@ -53,7 +53,7 @@ static void fe310_uart_write ( fe310_uart_context * ctx = (fe310_uart_context*) base; size_t i; - ctx->regs->div = riscv_get_core_frequency() / 115200 - 1; + ctx->regs->div = (riscv_get_core_frequency() / 115200 - 1) & 0xFFFF; ctx->regs->txctrl |= 1; ctx->regs->rxctrl |= 1; |