forked from M-Labs/artiq
1
0
Fork 0

sayma: initialize DAC before testing jesd::ready

This commit is contained in:
Sebastien Bourdeauducq 2020-01-20 19:36:15 +08:00
parent 705737f6e3
commit f4a5c4503d
1 changed files with 5 additions and 3 deletions

View File

@ -90,14 +90,16 @@ pub mod jdac {
error!("JESD core PHY not done"); error!("JESD core PHY not done");
return Err("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) { 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)?; basic_request(dacno, jdac_requests::PRINT_STATUS, 0)?;
return Err("JESD core reported not ready"); return Err("JESD core reported not ready");
} }
basic_request(dacno, jdac_requests::INIT, 0)?;
jesd::prbs(dacno, true); jesd::prbs(dacno, true);
basic_request(dacno, jdac_requests::PRBS, 0)?; basic_request(dacno, jdac_requests::PRBS, 0)?;
jesd::prbs(dacno, false); jesd::prbs(dacno, false);