From fdb0da2399fe6c3dfeb08822823ca6c325ae734d Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 18 Dec 2025 02:22:02 +0800 Subject: [PATCH] update two spots where the /2 on perclk was missed --- baremetal/src/platform/bao1x/bao1x.rs | 2 +- baremetal/src/platform/bao1x/debug.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/baremetal/src/platform/bao1x/bao1x.rs b/baremetal/src/platform/bao1x/bao1x.rs index ca5c6e891..5da9b4beb 100644 --- a/baremetal/src/platform/bao1x/bao1x.rs +++ b/baremetal/src/platform/bao1x/bao1x.rs @@ -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); diff --git a/baremetal/src/platform/bao1x/debug.rs b/baremetal/src/platform/bao1x/debug.rs index 73b86f751..5bcb2075e 100644 --- a/baremetal/src/platform/bao1x/debug.rs +++ b/baremetal/src/platform/bao1x/debug.rs @@ -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