From 5f8eeb47bb30030f13a4382d2977bea82992d67c Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sat, 17 Dec 2022 02:09:20 +0000 Subject: [PATCH] firmware: Rename si5324 crystal_{ref -> as_ckin2} [nfc] This would have made the issue in the pre-740543d4e code much more obvious (the config option by itself does not have any effect on the choice of active reference input). --- artiq/firmware/libboard_artiq/si5324.rs | 6 +++--- artiq/firmware/runtime/rtio_clocking.rs | 14 +++++++------- artiq/firmware/satman/main.rs | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/artiq/firmware/libboard_artiq/si5324.rs b/artiq/firmware/libboard_artiq/si5324.rs index 22b452d54..ee3feb1a1 100644 --- a/artiq/firmware/libboard_artiq/si5324.rs +++ b/artiq/firmware/libboard_artiq/si5324.rs @@ -28,7 +28,7 @@ pub struct FrequencySettings { pub n31: u32, pub n32: u32, pub bwsel: u8, - pub crystal_ref: bool + pub crystal_as_ckin2: bool } pub enum Input { @@ -83,7 +83,7 @@ fn map_frequency_settings(settings: &FrequencySettings) -> Result Result<()> { }; init()?; - if settings.crystal_ref { + if settings.crystal_as_ckin2 { write(0, read(0)? | 0x40)?; // FREE_RUN=1 } write(2, (read(2)? & 0x0f) | (s.bwsel << 4))?; diff --git a/artiq/firmware/runtime/rtio_clocking.rs b/artiq/firmware/runtime/rtio_clocking.rs index da4d8ad92..ffe1de082 100644 --- a/artiq/firmware/runtime/rtio_clocking.rs +++ b/artiq/firmware/runtime/rtio_clocking.rs @@ -142,7 +142,7 @@ fn setup_si5324_as_synthesizer(cfg: RtioClock) { n31 : 6, n32 : 6, bwsel : 4, - crystal_ref: false + crystal_as_ckin2: false }, SI5324_EXT_INPUT ) @@ -158,7 +158,7 @@ fn setup_si5324_as_synthesizer(cfg: RtioClock) { n31 : 52, n32 : 52, bwsel : 4, - crystal_ref: false + crystal_as_ckin2: false }, SI5324_EXT_INPUT ) @@ -174,7 +174,7 @@ fn setup_si5324_as_synthesizer(cfg: RtioClock) { n31 : 63, n32 : 63, bwsel : 4, - crystal_ref: false + crystal_as_ckin2: false }, SI5324_EXT_INPUT ) @@ -190,7 +190,7 @@ fn setup_si5324_as_synthesizer(cfg: RtioClock) { n31 : 7139, n32 : 7139, bwsel : 3, - crystal_ref: true + crystal_as_ckin2: true }, si5324::Input::Ckin2 ) @@ -206,7 +206,7 @@ fn setup_si5324_as_synthesizer(cfg: RtioClock) { n31 : 7139, n32 : 7139, bwsel : 3, - crystal_ref: true + crystal_as_ckin2: true }, si5324::Input::Ckin2 ) @@ -222,7 +222,7 @@ fn setup_si5324_as_synthesizer(cfg: RtioClock) { n31 : 4565, n32 : 4565, bwsel : 4, - crystal_ref: true + crystal_as_ckin2: true }, si5324::Input::Ckin2 ) @@ -238,7 +238,7 @@ fn setup_si5324_as_synthesizer(cfg: RtioClock) { n31 : 4565, n32 : 4565, bwsel : 4, - crystal_ref: true + crystal_as_ckin2: true }, si5324::Input::Ckin2 ) diff --git a/artiq/firmware/satman/main.rs b/artiq/firmware/satman/main.rs index f24fd5d34..b867a1bc1 100644 --- a/artiq/firmware/satman/main.rs +++ b/artiq/firmware/satman/main.rs @@ -434,7 +434,7 @@ const SI5324_SETTINGS: si5324::FrequencySettings n31 : 75, n32 : 75, bwsel : 4, - crystal_ref: true + crystal_as_ckin2: true }; #[cfg(all(has_si5324, rtio_frequency = "125.0"))] @@ -447,7 +447,7 @@ const SI5324_SETTINGS: si5324::FrequencySettings n31 : 63, n32 : 63, bwsel : 4, - crystal_ref: true + crystal_as_ckin2: true }; #[cfg(all(has_si5324, rtio_frequency = "100.0"))] @@ -460,7 +460,7 @@ const SI5324_SETTINGS: si5324::FrequencySettings n31 : 50, n32 : 50, bwsel : 4, - crystal_ref: true + crystal_as_ckin2: true }; #[no_mangle]