update two spots where the /2 on perclk was missed

This commit is contained in:
bunnie 2025-12-18 02:22:02 +08:00
parent dd7929f912
commit fdb0da2399
2 changed files with 2 additions and 2 deletions

View file

@ -224,7 +224,7 @@ pub fn clockset_wrapper(freq: u32) -> u32 {
udma::Uart::get_handle(utra::udma_uart_2::HW_UDMA_UART_2_BASE, uart_buf_addr, uart_buf_addr)
};
let baudrate: u32 = crate::UART_BAUD;
let freq: u32 = perclk / 2;
let freq: u32 = perclk;
udma_uart.set_baud(baudrate, freq);
crate::println!("clock set done, perclk is {} MHz", perclk / 1_000_000);

View file

@ -174,7 +174,7 @@ pub fn setup_rx(perclk: u32) -> bao1x_hal::udma::Uart {
}
let baudrate: u32 = crate::UART_BAUD;
let freq: u32 = perclk / 2;
let freq: u32 = perclk;
// the address of the UART buffer is "hard-allocated" at an offset one page from the top of
// IFRAM0. This is a convention that must be respected by the UDMA UART library implementation