fix boot delay calibrations

This commit is contained in:
bunnie 2025-10-27 19:07:33 +08:00
parent 4486438df3
commit fb3c89949c
2 changed files with 2 additions and 4 deletions

View file

@ -33,7 +33,6 @@ pub const UART_IFRAM_ADDR: usize = bao1x_hal::board::UART_DMA_TX_BUF_PHYS;
/// Also relying on the IFR region setting the SRAM trimming to work at this safe default
/// so we don't have to initialize it in boot0.
pub const DEFAULT_FCLK_FREQUENCY: u32 = 350_000_000;
use bao1x_api::SYSTEM_TICK_INTERVAL_MS;
pub fn early_init() {
let daric_cgu = sysctrl::HW_SYSCTRL_BASE as *mut u32;
@ -128,7 +127,7 @@ pub fn setup_timer() {
timer.wfo(utra::timer0::EV_ENABLE_ZERO, 0);
timer.wfo(utra::timer0::EV_PENDING_ZERO, 1);
let ms = SYSTEM_TICK_INTERVAL_MS;
let ms = 1;
timer.wfo(utra::timer0::EN_EN, 0b0); // disable the timer
// load its values
timer.wfo(utra::timer0::LOAD_LOAD, 0);

View file

@ -33,7 +33,6 @@ pub const FREE_MEM_LEN: usize = (RAM_BASE + RAM_SIZE) - FREE_MEM_START - STACK_L
pub const UART_IFRAM_ADDR: usize = bao1x_hal::board::UART_DMA_TX_BUF_PHYS;
const SAFE_FCLK_FREQUENCY: u32 = 350_000_000;
use bao1x_api::SYSTEM_TICK_INTERVAL_MS;
// Dabao port/pin constants have to be vendored in because this crate is compiled with baosec as the target.
const DABAO_SE0_PIN: u8 = 13;
@ -279,7 +278,7 @@ pub fn setup_timer(sysclk_freq: u32) {
timer.wfo(utra::timer0::EV_ENABLE_ZERO, 0);
timer.wfo(utra::timer0::EV_PENDING_ZERO, 1);
let ms = SYSTEM_TICK_INTERVAL_MS;
let ms = 1;
timer.wfo(utra::timer0::EN_EN, 0b0); // disable the timer
// load its values
timer.wfo(utra::timer0::LOAD_LOAD, 0);