From 0e74afe64fd858ad8559d96cb104de31b7b385f1 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Fri, 20 Jan 2023 14:40:15 +0800 Subject: [PATCH] satman: switch clocks --- src/satman/src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/satman/src/main.rs b/src/satman/src/main.rs index 76a2f58..d8a42b6 100644 --- a/src/satman/src/main.rs +++ b/src/satman/src/main.rs @@ -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 _); }