Go to the documentation of this file.
48 #define AD6676_SPI_CONFIG 0x000
49 #define AD6676_DEVICE_CONFIG 0x002
50 #define AD6676_CHIP_TYPE 0x003
51 #define AD6676_CHIP_ID0 0x004
52 #define AD6676_CHIP_ID1 0x005
53 #define AD6676_GRADE_REVISION 0x006
54 #define AD6676_VENDOR_ID0 0x00C
55 #define AD6676_VENDOR_ID1 0x00D
56 #define AD6676_PCBL_DONE 0x0FE
59 #define AD6676_FADC_0 0x100
60 #define AD6676_FADC_1 0x101
61 #define AD6676_FIF_0 0x102
62 #define AD6676_FIF_1 0x103
63 #define AD6676_BW_0 0x104
64 #define AD6676_BW_1 0x105
65 #define AD6676_LEXT 0x106
66 #define AD6676_MRGN_L 0x107
67 #define AD6676_MRGN_U 0x108
68 #define AD6676_MRGN_IF 0x109
69 #define AD6676_XSCALE_1 0x10A
72 #define AD6676_CAL_CTRL 0x115
73 #define AD6676_CAL_CMD 0x116
74 #define AD6676_CAL_DONE 0x117
75 #define AD6676_ADC_CONFIG 0x118
76 #define AD6676_FORCE_END_CAL 0x11A
79 #define AD6676_DEC_MODE 0x140
80 #define AD6676_MIX1_TUNING 0x141
81 #define AD6676_MIX2_TUNING 0x142
82 #define AD6676_MIX1_INIT 0x143
83 #define AD6676_MIX2_INIT_LSB 0x144
84 #define AD6676_MIX2_INIT_MSB 0x145
85 #define AD6676_DP_CTRL 0x146
88 #define AD6676_STANDBY 0x150
89 #define AD6676_PD_DIG 0x151
90 #define AD6676_PD_PIN_CTRL 0x152
91 #define AD6676_STBY_DAC 0x250
94 #define AD6676_ATTEN_MODE 0x180
95 #define AD6676_ATTEN_VALUE_PIN0 0x181
96 #define AD6676_ATTEN_VALUE_PIN1 0x182
97 #define AD6676_ATTEN_INIT 0x183
98 #define AD6676_ATTEN_CTL 0x184
101 #define AD6676_ADCRE_THRH 0x188
102 #define AD6676_ADCRE_PULSE_LEN 0x189
103 #define AD6676_ATTEN_STEP_RE 0x18A
104 #define AD6676_TIME_PER_STEP 0x18B
107 #define AD6676_ADC_UNSTABLE 0x18F
108 #define AD6676_PKTHRH0_LSB 0x193
109 #define AD6676_PKTHRH0_MSB 0x194
110 #define AD6676_PKTHRH1_LSB 0x195
111 #define AD6676_PKTHRH1_MSB 0x196
112 #define AD6676_LOWTHRH_LSB 0x197
113 #define AD6676_LOWTHRH_MSB 0x198
114 #define AD6676_DWELL_TIME_MANTISSA 0x199
115 #define AD6676_DWELL_TIME_EXP 0x19A
116 #define AD6676_FLAG0_SEL 0x19B
117 #define AD6676_FLAG1_SEL 0x19C
118 #define AD6676_EN_FLAG 0x19E
121 #define AD6676_FORCE_GPIO 0x1B0
122 #define AD6676_FORCE_GPIO_OUT 0x1B1
123 #define AD6676_FORCE_GPIO_VAL 0x1B2
124 #define AD6676_READ_GPO 0x1B3
125 #define AD6676_READ_GPI 0x1B4
128 #define AD6676_DID 0x1C0
129 #define AD6676_BID 0x1C1
130 #define AD6676_L 0x1C3
131 #define AD6676_F 0x1C4
132 #define AD6676_K 0x1C5
133 #define AD6676_M 0x1C6
134 #define AD6676_S 0x1C9
135 #define AD6676_HD 0x1CA
136 #define AD6676_RES1 0x1CB
137 #define AD6676_RES2 0x1CC
138 #define AD6676_LID0 0x1D0
139 #define AD6676_LID1 0x1D1
140 #define AD6676_FCHK0 0x1D8
141 #define AD6676_FCHK1 0x1D9
142 #define AD6676_EN_LFIFO 0x1E0
143 #define AD6676_SWAP 0x1E1
144 #define AD6676_LANE_PD 0x1E2
145 #define AD6676_MIS1 0x1E3
146 #define AD6676_SYNC_PIN 0x1E4
147 #define AD6676_TEST_GEN 0x1E5
148 #define AD6676_KF_ILAS 0x1E6
149 #define AD6676_SYNCB_CTRL 0x1E7
150 #define AD6676_MIX_CTRL 0x1E8
151 #define AD6676_K_OFFSET 0x1E9
152 #define AD6676_SYSREF 0x1EA
153 #define AD6676_SER1 0x1EB
154 #define AD6676_SER2 0x1EC
156 #define AD6676_CLKSYN_ENABLE 0x2A0
157 #define AD6676_CLKSYN_INT_N_LSB 0x2A1
158 #define AD6676_CLKSYN_INT_N_MSB 0x2A2
159 #define AD6676_CLKSYN_LOGEN 0x2A5
160 #define AD6676_CLKSYN_KVCO_VCO 0x2A9
161 #define AD6676_CLKSYN_VCO_BIAS 0x2AA
162 #define AD6676_CLKSYN_VCO_CAL 0x2AB
163 #define AD6676_CLKSYN_I_CP 0x2AC
164 #define AD6676_CLKSYN_CP_CAL 0x2AD
165 #define AD6676_CLKSYN_VCO_VAR 0x2B7
166 #define AD6676_CLKSYN_R_DIV 0x2BB
167 #define AD6676_CLKSYN_STATUS 0x2BC
168 #define AD6676_JESDSYN_STATUS 0x2DC
170 #define AD6676_SHUFFLE_THREG0 0x342
171 #define AD6676_SHUFFLE_THREG1 0x343
177 #define SPI_CONF_SW_RESET (0x81)
178 #define SPI_CONF_SDIO_DIR (0x18)
184 #define SYN_STAT_PLL_LCK (1 << 3)
185 #define SYN_STAT_VCO_CAL_BUSY (1 << 1)
186 #define SYN_STAT_CP_CAL_DONE (1 << 0)
191 #define DP_CTRL_OFFSET_BINARY (1 << 0)
192 #define DP_CTRL_TWOS_COMPLEMENT (0 << 0)
197 #define TESTGENMODE_OFF 0x0
198 #define TESTGENMODE_ALT_CHECKERBOARD 0x1
199 #define TESTGENMODE_ONE_ZERO_TOGGLE 0x2
200 #define TESTGENMODE_PN23_SEQ 0x3
201 #define TESTGENMODE_PN9_SEQ 0x4
202 #define TESTGENMODE_REP_USER_PAT 0x5
203 #define TESTGENMODE_SING_USER_PAT 0x6
204 #define TESTGENMODE_RAMP 0x7
205 #define TESTGENMODE_MOD_RPAT 0x8
206 #define TESTGENMODE_JSPAT 0x10
207 #define TESTGENMODE_JTSPAT 0x11
213 #define R_DIV(x) ((x) << 6)
214 #define CLKSYN_R_DIV_SYSREF_CTRL (1 << 3)
215 #define CLKSYN_R_DIV_CLKIN_IMPED (1 << 2)
216 #define CLKSYN_R_DIV_RESERVED 0x31
221 #define EN_EXT_CK (1 << 7)
222 #define EN_ADC_CK (1 << 6)
223 #define EN_SYNTH (1 << 5)
224 #define EN_VCO_PTAT (1 << 4)
225 #define EN_VCO_ALC (1 << 3)
226 #define EN_VCO (1 << 2)
227 #define EN_OVER_IDE_CAL (1 << 1)
228 #define EN_OVER_IDE (1 << 0)
234 #define RESET_CAL (1 << 3)
240 #define INIT_ALC_VALUE(x) ((x) << 4)
241 #define ALC_DIS (1 << 3)
246 #define CP_CAL_EN (1 << 7)
261 #define XCMD3 (1 << 7)
262 #define XCMD2 (1 << 6)
263 #define XCMD1 (1 << 5)
264 #define XCMD0 (1 << 4)
265 #define RESON1_CAL (1 << 3)
266 #define FLASH_CAL (1 << 2)
267 #define INIT_ADC (1 << 1)
268 #define TUNE_ADC (1 << 0)
273 #define PD_SYSREF_RX (1 << 3)
274 #define LVDS_SYNCB (1 << 2)
280 #define FORCE_END_CAL (1 << 0)
283 #define CAL_DONE (1 << 0)
285 #define MHz 1000000UL
286 #define MIN_FADC 2000000000ULL
287 #define MIN_FADC_INT_SYNTH 2925000000ULL
288 #define MAX_FADC 3200000000ULL
290 #define MIN_FIF 70000000ULL
291 #define MAX_FIF 450000000ULL
293 #define MIN_BW 20000000ULL
294 #define MAX_BW 160000000ULL
296 #define CHIP_ID1_AD6676 0x03
297 #define CHIP_ID0_AD6676 0xBB
#define DP_CTRL_TWOS_COMPLEMENT
Definition: ad6676.h:192
#define AD6676_LEXT
Definition: ad6676.h:65
#define DEC_16
Definition: ad6676.h:254
#define AD6676_DEC_MODE
Definition: ad6676.h:79
int32_t ad6676_test(struct ad6676_dev *dev, uint32_t test_mode)
Perform an interface test.
Definition: ad6676.c:782
#define AD6676_BID
Definition: ad6676.h:129
#define AD6676_L
Definition: ad6676.h:130
#define SCR
Definition: ad6676.h:277
#define no_os_min_t(type, x, y)
Definition: no_os_util.h:61
#define AD6676_FADC_0
Definition: ad6676.h:59
uint32_t f_adc_hz
Definition: ad6676.h:301
#define AD6676_M
Definition: ad6676.h:133
#define AD6676_ATTEN_VALUE_PIN1
Definition: ad6676.h:96
@ FLASH_CAL
Definition: t_mykonos.h:828
int32_t ad6676_spi_write(struct ad6676_dev *dev, uint16_t reg_addr, uint8_t reg_data)
SPI write to device.
Definition: ad6676.c:78
#define PD_SYSREF_RX
Definition: ad6676.h:273
uint8_t scrambling_en
Definition: ad6676.h:317
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:159
#define DEC_24
Definition: ad6676.h:253
uint8_t bw_margin_high_mhz
Definition: ad6676.h:305
uint8_t decimation
Definition: ad6676.h:307
Header file of SPI Interface.
#define AD6676_MRGN_L
Definition: ad6676.h:66
uint8_t use_extclk
Definition: ad6676.h:311
#define EN_SYNTH
Definition: ad6676.h:223
uint8_t scale
Definition: ad6676.h:310
#define EN_EXT_CK
Definition: ad6676.h:221
#define INIT_ALC_VALUE(x)
Definition: ad6676.h:240
Header file of Delay functions.
#define AD6676_CLKSYN_STATUS
Definition: ad6676.h:167
#define AD6676_SPI_CONFIG
Definition: ad6676.h:48
uint8_t lvds_syncb
Definition: ad6676.h:318
#define AD6676_CAL_CMD
Definition: ad6676.h:73
#define SYN_STAT_PLL_LCK
Definition: ad6676.h:184
int32_t ad6676_set_attenuation(struct ad6676_dev *dev, struct ad6676_init_param *init_param)
Set attenuation in decibels or disable attenuator.
Definition: ad6676.c:611
Definition: ad9361_util.h:69
int32_t ad6676_spi_read(struct ad6676_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
SPI read from device.
Definition: ad6676.c:52
uint8_t shuffle_thresh
Definition: ad6676.h:315
uint64_t ad6676_get_fif(struct ad6676_dev *dev, struct ad6676_init_param *init_param)
Get the target IF frequency.
Definition: ad6676.c:204
#define AD6676_DID
Definition: ad6676.h:128
#define AD6676_SER2
Definition: ad6676.h:154
#define AD6676_ATTEN_VALUE_PIN0
Definition: ad6676.h:95
#define SPI_CONF_SW_RESET
Definition: ad6676.h:177
#define AD6676_MRGN_IF
Definition: ad6676.h:68
uint8_t bw_margin_low_mhz
Definition: ad6676.h:304
#define XCMD0
Definition: ad6676.h:264
#define CP_CAL_EN
Definition: ad6676.h:246
#define AD6676_F
Definition: ad6676.h:131
#define EN_VCO
Definition: ad6676.h:226
#define AD6676_CHIP_ID0
Definition: ad6676.h:51
#define AD6676_DP_CTRL
Definition: ad6676.h:85
#define MIN_FIF
Definition: ad6676.h:290
#define DEC_32
Definition: ad6676.h:252
uint64_t no_os_do_div(uint64_t *n, uint64_t base)
int32_t ad6676_set_attenuation(struct ad6676_dev *dev, struct ad6676_init_param *init_param)
Set attenuation in decibels or disable attenuator.
Definition: ad6676.c:611
uint8_t shuffle_ctrl
Definition: ad6676.h:314
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
#define AD6676_CLKSYN_CP_CAL
Definition: ad6676.h:164
#define CLKSYN_R_DIV_RESERVED
Definition: ad6676.h:216
#define INIT_ADC
Definition: ad6676.h:267
int8_t bw_margin_if_mhz
Definition: ad6676.h:306
int32_t ad6676_shuffle_setup(struct ad6676_dev *dev, struct ad6676_init_param *init_param)
Setup shuffling rate and threshold for the adaptive shuffler.
Definition: ad6676.c:499
#define AD6676_MIX2_TUNING
Definition: ad6676.h:81
#define DEC_12
Definition: ad6676.h:255
uint8_t attenuation
Definition: ad6676.h:309
#define RESON1_CAL
Definition: ad6676.h:265
int32_t ad6676_update(struct ad6676_dev *dev, struct ad6676_init_param *init_param)
Reconfigure device for other target frequency and bandwidth and recalibrate.
Definition: ad6676.c:734
int32_t ad6676_test(struct ad6676_dev *dev, uint32_t test_mode)
Perform an interface test.
Definition: ad6676.c:782
#define TESTGENMODE_OFF
Definition: ad6676.h:197
#define AD6676_CLKSYN_LOGEN
Definition: ad6676.h:159
uint64_t m
Definition: ad6676.h:322
#define AD6676_FIF_0
Definition: ad6676.h:61
int32_t ad6676_spi_read(struct ad6676_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
SPI read from device.
Definition: ad6676.c:52
struct no_os_spi_desc * spi_desc
Definition: ad6676.h:329
#define AD6676_XSCALE_1
Definition: ad6676.h:69
uint64_t ad6676_get_fif(struct ad6676_dev *dev, struct ad6676_init_param *init_param)
Get the target IF frequency.
Definition: ad6676.c:204
#define CAL_DONE
Definition: ad6676.h:283
uint32_t ref_clk
Definition: ad6676.h:300
#define TUNE_ADC
Definition: ad6676.h:268
#define SPI_CONF_SDIO_DIR
Definition: ad6676.h:178
#define AD6676_CLKSYN_ENABLE
Definition: ad6676.h:156
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
uint8_t n_lanes
Definition: ad6676.h:320
#define no_os_clamp(val, min_val, max_val)
Definition: no_os_util.h:69
#define SYN_STAT_CP_CAL_DONE
Definition: ad6676.h:186
uint8_t sysref_pd
Definition: ad6676.h:319
#define MHz
Definition: ad6676.h:285
#define CLKSYN_R_DIV_CLKIN_IMPED
Definition: ad6676.h:215
#define AD6676_S
Definition: ad6676.h:134
struct no_os_spi_init_param spi_init
Definition: ad6676.h:324
uint32_t f_if_hz
Definition: ad6676.h:302
#define AD6676_CLKSYN_VCO_BIAS
Definition: ad6676.h:161
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
#define no_os_clamp_t(type, val, min_val, max_val)
Definition: no_os_util.h:71
#define EN_VCO_PTAT
Definition: ad6676.h:224
int32_t ad6676_update(struct ad6676_dev *dev, struct ad6676_init_param *init_param)
Reconfigure device for other target frequency and bandwidth and recalibrate.
Definition: ad6676.c:734
#define AD6676_CLKSYN_INT_N_LSB
Definition: ad6676.h:157
#define AD6676_SHUFFLE_THREG0
Definition: ad6676.h:170
int32_t ad6676_spi_write(struct ad6676_dev *dev, uint16_t reg_addr, uint8_t reg_data)
SPI write to device.
Definition: ad6676.c:78
#define R_DIV(x)
Definition: ad6676.h:213
uint8_t spi3wire
Definition: ad6676.h:312
#define LVDS_SYNCB
Definition: ad6676.h:274
#define AD6676_TEST_GEN
Definition: ad6676.h:147
#define AD6676_CLKSYN_VCO_VAR
Definition: ad6676.h:165
#define CHIP_ID0_AD6676
Definition: ad6676.h:297
#define EN_VCO_ALC
Definition: ad6676.h:225
#define AD6676_CLKSYN_R_DIV
Definition: ad6676.h:166
uint8_t ext_l
Definition: ad6676.h:308
uint8_t frames_per_multiframe
Definition: ad6676.h:321
#define RESET_CAL
Definition: ad6676.h:234
#define XCMD1
Definition: ad6676.h:263
#define AD6676_MRGN_U
Definition: ad6676.h:67
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
#define MIN_FADC
Definition: ad6676.h:286
#define EN_ADC_CK
Definition: ad6676.h:222
#define SYN_STAT_VCO_CAL_BUSY
Definition: ad6676.h:185
#define MIN_FADC_INT_SYNTH
Definition: ad6676.h:287
#define AD6676_BW_0
Definition: ad6676.h:63
#define CLKSYN_R_DIV_SYSREF_CTRL
Definition: ad6676.h:214
#define MAX_FIF
Definition: ad6676.h:291
#define AD6676_MIX1_TUNING
Definition: ad6676.h:80
#define AD6676_CLKSYN_KVCO_VCO
Definition: ad6676.h:160
#define AD6676_SYNCB_CTRL
Definition: ad6676.h:149
#define MAX_BW
Definition: ad6676.h:294
int32_t ad6676_setup(struct ad6676_dev **device, struct ad6676_init_param init_param)
Initialize the device.
Definition: ad6676.c:632
#define AD6676_FORCE_END_CAL
Definition: ad6676.h:76
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
#define MAX_FADC
Definition: ad6676.h:288
uint32_t bw_hz
Definition: ad6676.h:303
Header file of AD6676 Driver.
Header file of utility functions.
#define MIN_BW
Definition: ad6676.h:293
#define AD6676_CLKSYN_VCO_CAL
Definition: ad6676.h:162
int32_t ad6676_setup(struct ad6676_dev **device, struct ad6676_init_param init_param)
Initialize the device.
Definition: ad6676.c:632
int32_t ad6676_set_fif(struct ad6676_dev *dev, struct ad6676_init_param *init_param)
Set the target IF frequency.
Definition: ad6676.c:188
#define AD6676_K
Definition: ad6676.h:132
#define FORCE_END_CAL
Definition: ad6676.h:280
#define EN_OVER_IDE
Definition: ad6676.h:228
int32_t ad6676_set_fif(struct ad6676_dev *dev, struct ad6676_init_param *init_param)
Set the target IF frequency.
Definition: ad6676.c:188
#define AD6676_CAL_DONE
Definition: ad6676.h:74
#define AD6676_CLKSYN_I_CP
Definition: ad6676.h:163
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
#define AD6676_JESDSYN_STATUS
Definition: ad6676.h:168