mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
make ticktimer scale with system clock setting in loader
This commit is contained in:
parent
2cb22e6b10
commit
781c74ba79
2 changed files with 6 additions and 2 deletions
|
|
@ -25,6 +25,7 @@ num-derive = { version = "0.4.2", default-features = false }
|
||||||
num-traits = { version = "0.2.14", default-features = false }
|
num-traits = { version = "0.2.14", default-features = false }
|
||||||
xous-semver = "0.1.2"
|
xous-semver = "0.1.2"
|
||||||
utralib = { version = "0.1.25", optional = true, default-features = false }
|
utralib = { version = "0.1.25", optional = true, default-features = false }
|
||||||
|
loader = { path = "../../loader", optional = true }
|
||||||
|
|
||||||
# TODO: fix this
|
# TODO: fix this
|
||||||
#[target.'cfg(target_arch = "arm")'.dependencies]
|
#[target.'cfg(target_arch = "arm")'.dependencies]
|
||||||
|
|
@ -39,7 +40,7 @@ precursor = ["utralib/precursor", "susres/precursor", "watchdog"]
|
||||||
hosted = ["utralib/hosted", "susres/hosted", "watchdog"]
|
hosted = ["utralib/hosted", "susres/hosted", "watchdog"]
|
||||||
renode = ["utralib/renode", "susres/renode", "watchdog"]
|
renode = ["utralib/renode", "susres/renode", "watchdog"]
|
||||||
|
|
||||||
cramium-soc = ["utralib/cramium-soc", "utralib/std"]
|
cramium-soc = ["utralib/cramium-soc", "utralib/std", "loader/cramium-soc"]
|
||||||
cramium-fpga = ["utralib/cramium-fpga"]
|
cramium-fpga = ["utralib/cramium-fpga"]
|
||||||
hosted-baosec = []
|
hosted-baosec = []
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,10 @@ impl XousTickTimer {
|
||||||
wdt: CSR::new(wdt.as_mut_ptr() as *mut u32),
|
wdt: CSR::new(wdt.as_mut_ptr() as *mut u32),
|
||||||
};
|
};
|
||||||
// TODO: base this off of some system-level constant
|
// TODO: base this off of some system-level constant
|
||||||
xtt.csr.wo(utra::ticktimer::CLOCKS_PER_TICK, 200_000);
|
xtt.csr.wo(
|
||||||
|
utra::ticktimer::CLOCKS_PER_TICK,
|
||||||
|
(loader::SYSTEM_CLOCK_FREQUENCY / 2) / (1000 * TICKS_PER_MS as u32),
|
||||||
|
);
|
||||||
|
|
||||||
#[cfg(feature = "watchdog")]
|
#[cfg(feature = "watchdog")]
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue