Skip to content

Commit

Permalink
sayma: initialize DAC before testing jesd::ready
Browse files Browse the repository at this point in the history
  • Loading branch information
sbourdeauducq committed Jan 20, 2020
1 parent 705737f commit f4a5c45
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions artiq/firmware/satman/jdcg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,16 @@ pub mod jdac {
error!("JESD core PHY not done");
return Err("JESD core PHY not done");
}

basic_request(dacno, jdac_requests::INIT, 0)?;

// JESD ready depends on JSYNC being valid, so DAC init needs to happen first
if !jesd::ready(dacno) {
error!("JESD core reported not ready, sending status print request");
error!("JESD core reported not ready, sending DAC status print request");
basic_request(dacno, jdac_requests::PRINT_STATUS, 0)?;
return Err("JESD core reported not ready");
}

basic_request(dacno, jdac_requests::INIT, 0)?;

jesd::prbs(dacno, true);
basic_request(dacno, jdac_requests::PRBS, 0)?;
jesd::prbs(dacno, false);
Expand Down

0 comments on commit f4a5c45

Please sign in to comment.