From eb554f86f978a56a0bad5457a66ed1edafce3d3c Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 5 Sep 2015 14:52:25 -0600 Subject: [PATCH] dds: do not reset AD9914 --- soc/runtime/dds.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/soc/runtime/dds.c b/soc/runtime/dds.c index 92d83915d..f07684265 100644 --- a/soc/runtime/dds.c +++ b/soc/runtime/dds.c @@ -18,7 +18,7 @@ /* DAC calibration takes max. 1ms as per datasheet */ #define DURATION_DAC_CAL (147000 << RTIO_FINE_TS_WIDTH) /* not counting final FUD */ -#define DURATION_INIT (10*DURATION_WRITE + DURATION_DAC_CAL) +#define DURATION_INIT (8*DURATION_WRITE + DURATION_DAC_CAL) #define DURATION_PROGRAM (6*DURATION_WRITE) /* not counting FUD */ #else @@ -59,8 +59,17 @@ void dds_init(long long int timestamp, int channel) #endif channel <<= 1; DDS_WRITE(DDS_GPIO, channel); +#ifndef DDS_AD9914 + /* + * Resetting a AD9914 intermittently crashes it. It does not produce any + * output until power-cycled. + * Increasing the reset pulse length and the delay until the first write + * to 300ns do not solve the problem. + * The chips seem fine without a reset. + */ DDS_WRITE(DDS_GPIO, channel | 1); /* reset */ DDS_WRITE(DDS_GPIO, channel); +#endif #ifdef DDS_AD9858 /*