Skip to content

Commit

Permalink
fixup! cpu/fe310: use CLOCK_CORECLOCK macro to get cpu freq
Browse files Browse the repository at this point in the history
  • Loading branch information
aabadie committed Dec 16, 2019
1 parent 8630418 commit f0ad7ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpu/fe310/periph/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int uart_init(uart_t dev, uint32_t baudrate, uart_rx_cb_t rx_cb, void *arg)
uart_poweron(dev);

/* Calculate baudrate divisor given current CPU clk rate */
uartDiv = CLOCK_CORECLOCK / baudrate;
uartDiv = cpu_freq() / baudrate;

/* Enable UART 8-N-1 at given baudrate */
_REG32(uart_config[dev].addr, UART_REG_DIV) = uartDiv;
Expand Down

0 comments on commit f0ad7ff

Please sign in to comment.