mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
reduce debug spew and add userspace api for reset reason
This commit is contained in:
parent
602e028402
commit
4208ba2e0b
1 changed files with 14 additions and 10 deletions
|
|
@ -35,17 +35,17 @@ fn susres_service() {
|
|||
|
||||
let mut clk_mgr = bao1x_hal::clocks::ClockManagerImpl::new().unwrap();
|
||||
let measured = clk_mgr.measured_freqs();
|
||||
log::info!("computed frequencies:");
|
||||
log::info!(" vco: {}", clk_mgr.vco_freq);
|
||||
log::info!(" fclk: {}", clk_mgr.fclk);
|
||||
log::info!(" aclk: {}", clk_mgr.aclk);
|
||||
log::info!(" hclk: {}", clk_mgr.hclk);
|
||||
log::info!(" iclk: {}", clk_mgr.iclk);
|
||||
log::info!(" pclk: {}", clk_mgr.pclk);
|
||||
log::info!(" per: {}", clk_mgr.perclk);
|
||||
log::info!("measured frequencies:");
|
||||
log::debug!("computed frequencies:");
|
||||
log::debug!(" vco: {}", clk_mgr.vco_freq);
|
||||
log::debug!(" fclk: {}", clk_mgr.fclk);
|
||||
log::debug!(" aclk: {}", clk_mgr.aclk);
|
||||
log::debug!(" hclk: {}", clk_mgr.hclk);
|
||||
log::debug!(" iclk: {}", clk_mgr.iclk);
|
||||
log::debug!(" pclk: {}", clk_mgr.pclk);
|
||||
log::debug!(" per: {}", clk_mgr.perclk);
|
||||
log::debug!("measured frequencies:");
|
||||
for (name, freq) in measured {
|
||||
log::info!(" {}: {} MHz", name, freq);
|
||||
log::debug!(" {}: {} MHz", name, freq);
|
||||
}
|
||||
let hal = bao1x_hal_service::Hal::new();
|
||||
|
||||
|
|
@ -410,6 +410,10 @@ fn susres_service() {
|
|||
Some(ClockOp::GetPer) => {
|
||||
xous::return_scalar(msg.sender, clk_mgr.perclk as usize).unwrap()
|
||||
}
|
||||
Some(ClockOp::ResetReason) => {
|
||||
xous::return_scalar(msg.sender, clk_mgr.reset_reason().raw_value() as usize)
|
||||
.unwrap()
|
||||
}
|
||||
_ => panic!("Incorrect PlatformOp"),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue