mirror of
https://github.com/m-labs/artiq.git
synced 2025-01-07 17:43:34 +08:00
satman: backport JESD204 STPL fix from 73271600
This commit is contained in:
parent
a694d130b7
commit
33a15a6513
@ -104,10 +104,6 @@ pub mod jdac {
|
||||
basic_request(dacno, jdac_requests::PRBS, 0)?;
|
||||
jesd::prbs(dacno, false);
|
||||
|
||||
jesd::stpl(dacno, true);
|
||||
basic_request(dacno, jdac_requests::STPL, 0)?;
|
||||
jesd::stpl(dacno, false);
|
||||
|
||||
basic_request(dacno, jdac_requests::INIT, 0)?;
|
||||
clock::spin_us(5000);
|
||||
|
||||
@ -129,4 +125,19 @@ pub mod jdac {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn stpl() -> Result<(), &'static str> {
|
||||
for dacno in 0..csr::JDCG.len() {
|
||||
let dacno = dacno as u8;
|
||||
|
||||
info!("Running STPL test on DAC-{}...", dacno);
|
||||
|
||||
jesd::stpl(dacno, true);
|
||||
basic_request(dacno, jdac_requests::STPL, 0)?;
|
||||
jesd::stpl(dacno, false);
|
||||
|
||||
info!(" ...done STPL test");
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
@ -526,6 +526,9 @@ pub extern fn main() -> i32 {
|
||||
let rep0_is_up = repeaters[0].is_up();
|
||||
if rep0_is_up && !rep0_was_up {
|
||||
jdcg::jdac::init();
|
||||
if let Err(e) = jdcg::jdac::stpl() {
|
||||
error!("STPL test failed: {}", e);
|
||||
}
|
||||
}
|
||||
rep0_was_up = rep0_is_up;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user