From 6b428ef3be5f9e75a442744d3e5b6db22d9c29e4 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 20 Jan 2020 20:12:13 +0800 Subject: [PATCH] sayma: initialize DAC before testing jesd::ready --- artiq/firmware/satman/jdcg.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/artiq/firmware/satman/jdcg.rs b/artiq/firmware/satman/jdcg.rs index 340b59ce0..1237e493a 100644 --- a/artiq/firmware/satman/jdcg.rs +++ b/artiq/firmware/satman/jdcg.rs @@ -94,14 +94,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);