From 51e28de2f61a978481d27824073567142ae657d2 Mon Sep 17 00:00:00 2001 From: Harry Ho Date: Thu, 16 Sep 2021 15:37:46 +0800 Subject: [PATCH] ad9154: check alignment phase error after one-shot sync --- artiq/firmware/libboard_artiq/ad9154.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/artiq/firmware/libboard_artiq/ad9154.rs b/artiq/firmware/libboard_artiq/ad9154.rs index d6d3b2c02..493f1593a 100644 --- a/artiq/firmware/libboard_artiq/ad9154.rs +++ b/artiq/firmware/libboard_artiq/ad9154.rs @@ -545,5 +545,10 @@ pub fn sync(dacno: u8) -> Result { return Err("no sysref edge"); } let realign_occured = sync_status & ad9154_reg::SYNC_ROTATE != 0; + let phase_error = sync_status & ad9154_reg::SYNC_WLIM != 0; + if !realign_occured && phase_error { + // see also: SYNC_ERRWINDOW + warn!(" phase error window exceeded but clock did not rotate"); + } Ok(realign_occured) }