diff --git a/services/susres/src/main.rs b/services/susres/src/main.rs index 7ca5b6af5..7b9e32a8a 100644 --- a/services/susres/src/main.rs +++ b/services/susres/src/main.rs @@ -39,7 +39,7 @@ mod implementation { use num_traits::ToPrimitive; const SYSTEM_CLOCK_FREQUENCY: u32 = 12_000_000; // timer0 is now in the always-on domain - const SYSTEM_TICK_INTERVAL_MS: u32 = 20; + const SYSTEM_TICK_INTERVAL_MS: u32 = xous::BASE_QUANTA_MS; fn timer_tick(_irq_no: usize, arg: *mut usize) { let mut timer = CSR::new(arg as *mut u32); diff --git a/xous-rs/src/definitions.rs b/xous-rs/src/definitions.rs index 39a815b3d..d1bc5b1f3 100644 --- a/xous-rs/src/definitions.rs +++ b/xous-rs/src/definitions.rs @@ -40,6 +40,9 @@ pub const EC_REGION_LEN: u32 = 0x0008_0000; pub const PDDB_LOC: u32 = 0x01D8_0000; // PDDB start pub const PDDB_LEN: u32 = EC_REGION_LOC - PDDB_LOC; // must be 64k-aligned (bulk erase block size) for proper function. +// quantum alloted to each process before a context switch is forced +pub const BASE_QUANTA_MS: u32 = 10; + #[cfg(not(any(target_os = "none", target_os = "xous")))] use core::sync::atomic::AtomicU64;