From c66f9483f8b243bf21896e7f2094d42b946afbdf Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 12 Jul 2018 12:33:50 +0800 Subject: [PATCH] hmc7043: wait after changing delays Allows for the SPI transaction to finish, and for the delay to stabilize. --- artiq/firmware/libboard_artiq/hmc830_7043.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/artiq/firmware/libboard_artiq/hmc830_7043.rs b/artiq/firmware/libboard_artiq/hmc830_7043.rs index 6866b92a6..0eb7f3ad1 100644 --- a/artiq/firmware/libboard_artiq/hmc830_7043.rs +++ b/artiq/firmware/libboard_artiq/hmc830_7043.rs @@ -386,6 +386,7 @@ pub mod hmc7043 { } else { unimplemented!(); } + clock::spin_us(100); } fn sysref_offset_fpga(phase_offset: u16) { @@ -394,12 +395,14 @@ pub mod hmc7043 { spi_setup(); write(0x0111, analog_delay); write(0x0112, digital_delay); + clock::spin_us(100); } fn sysref_slip() { spi_setup(); write(0x0002, 0x02); write(0x0002, 0x00); + clock::spin_us(100); } fn sysref_sample() -> bool {