diff --git a/soc/runtime/dds.c b/soc/runtime/dds.c index 5f9f8650e..61a22d4d5 100644 --- a/soc/runtime/dds.c +++ b/soc/runtime/dds.c @@ -77,18 +77,12 @@ void dds_init(long long int timestamp, int channel) #endif #ifdef DDS_AD9914 - /* - * Enable cosine output (to match AD9858 behavior) - * Enable DAC calibration - * Leave SYNCLK enabled and PLL/divider disabled - */ - DDS_WRITE(DDS_CFR1L, 0x0008); - DDS_WRITE(DDS_CFR1H, 0x0000); - DDS_WRITE(DDS_CFR4H, 0x0105); + DDS_WRITE(DDS_CFR1H, 0x0000); /* Enable cosine output */ + DDS_WRITE(DDS_CFR2L, 0x8900); /* Enable matched latency */ + DDS_WRITE(DDS_CFR4H, 0x0105); /* Enable DAC calibration */ DDS_WRITE(DDS_FUD, 0); - /* Disable DAC calibration */ now += DURATION_DAC_CAL; - DDS_WRITE(DDS_CFR4H, 0x0005); + DDS_WRITE(DDS_CFR4H, 0x0005); /* Disable DAC calibration */ DDS_WRITE(DDS_FUD, 0); #endif } diff --git a/soc/runtime/test_mode.c b/soc/runtime/test_mode.c index 40384ee0a..a15950bee 100644 --- a/soc/runtime/test_mode.c +++ b/soc/runtime/test_mode.c @@ -237,13 +237,13 @@ static void ddsinit(void) long long int t; brg_ddsreset(); - brg_ddswrite(DDS_CFR1L, 0x0008); - brg_ddswrite(DDS_CFR1H, 0x0000); - brg_ddswrite(DDS_CFR4H, 0x0105); + brg_ddswrite(DDS_CFR1H, 0x0000); /* Enable cosine output */ + brg_ddswrite(DDS_CFR2L, 0x8900); /* Enable matched latency */ + brg_ddswrite(DDS_CFR4H, 0x0105); /* Enable DAC calibration */ brg_ddswrite(DDS_FUD, 0); t = clock_get_ms(); while(clock_get_ms() < t + 2); - brg_ddswrite(DDS_CFR4H, 0x0005); + brg_ddswrite(DDS_CFR4H, 0x0005); /* Disable DAC calibration */ brg_ddsfud(); } #endif