satman: switch clocks

This commit is contained in:
mwojcik 2023-01-20 14:40:15 +08:00
parent 831079f95f
commit 0e74afe64f
1 changed files with 7 additions and 0 deletions

View File

@ -477,6 +477,13 @@ pub extern fn main_core0() -> i32 {
}
timer.delay_us(1500); // wait for CPLL/QPLL lock
info!("Switching SYS clocks...");
unsafe {
csr::sys_crg::clock_switch_write(1);
}
timer.delay_us(10_000); // wait for SYS PLL lock
unsafe {
csr::drtio_transceiver::txenable_write(0xffffffffu32 as _);
}