cleanup perclk setting on boot0

This commit is contained in:
bunnie 2025-12-16 00:56:10 +08:00
parent 5cd165fe8e
commit fb7da782cf
2 changed files with 4 additions and 4 deletions

View file

@ -358,8 +358,8 @@ pub unsafe fn init_clock_asic_350mhz() -> u32 {
daric_cgu.add(utra::sysctrl::SFR_CGUFD_CFGFDCR_0_4_4.offset()).write_volatile(0x070f); // pclk
// hard coded
daric_cgu.add(utra::sysctrl::SFR_CGUFDPER.offset()).write_volatile(0x19191);
let perclk = 175000000;
daric_cgu.add(utra::sysctrl::SFR_CGUFDPER.offset()).write_volatile(0x009191);
let perclk = 100_000_000;
// turn off gates
daric_cgu.add(utra::sysctrl::SFR_ACLKGR.offset()).write_volatile(0x00); // mbox/qfc turned off

View file

@ -122,7 +122,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
@ -159,7 +159,7 @@ pub fn setup_tx(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