From fb3c89949c3fcfa4d2e4f932d5a0f3e6ef14bc39 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 27 Oct 2025 19:07:33 +0800 Subject: [PATCH] fix boot delay calibrations --- bao1x-boot/boot0/src/platform/bao1x/bao1x.rs | 3 +-- bao1x-boot/boot1/src/platform/bao1x/bao1x.rs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bao1x-boot/boot0/src/platform/bao1x/bao1x.rs b/bao1x-boot/boot0/src/platform/bao1x/bao1x.rs index 1d9b6c016..63b78029c 100644 --- a/bao1x-boot/boot0/src/platform/bao1x/bao1x.rs +++ b/bao1x-boot/boot0/src/platform/bao1x/bao1x.rs @@ -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); diff --git a/bao1x-boot/boot1/src/platform/bao1x/bao1x.rs b/bao1x-boot/boot1/src/platform/bao1x/bao1x.rs index e1180c144..1c4b82bb7 100644 --- a/bao1x-boot/boot1/src/platform/bao1x/bao1x.rs +++ b/bao1x-boot/boot1/src/platform/bao1x/bao1x.rs @@ -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);