diff --git a/src/satman/src/main.rs b/src/satman/src/main.rs index c1f70ef..15b2530 100644 --- a/src/satman/src/main.rs +++ b/src/satman/src/main.rs @@ -441,6 +441,7 @@ pub extern fn main_core0() -> i32 { log::set_max_level(log::LevelFilter::Info); init_gateware(); + timer.delay_us(500); // wait for FCLK to reset and PLL to lock info!("ARTIQ satellite manager starting..."); info!("gateware ident {}", identifier_read(&mut [0; 64])); @@ -458,6 +459,13 @@ pub extern fn main_core0() -> i32 { csr::drtio_transceiver::stable_clkin_write(1); } timer.delay_us(20_000); // wait for CPLL/QPLL/MMCM lock + let clk = unsafe { csr::sys_crg::current_clock_read() }; + if clk == 1 { + info!("SYS CLK switched successfully"); + } + else { + error!("SYS CLK did not switch"); + } unsafe { csr::drtio_transceiver::txenable_write(0xffffffffu32 as _);