forked from M-Labs/artiq
1
0
Fork 0

ad9154: check alignment phase error after one-shot sync

This commit is contained in:
Harry Ho 2021-09-16 15:37:46 +08:00
parent f5b9eab84b
commit 51e28de2f6
1 changed files with 5 additions and 0 deletions

View File

@ -545,5 +545,10 @@ pub fn sync(dacno: u8) -> Result<bool, &'static str> {
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)
}