Go to the documentation of this file.
34 #ifndef SRC_ADF5902_H_
35 #define SRC_ADF5902_H_
49 #define ADF5902_REG0 0x0
50 #define ADF5902_REG1 0x1
51 #define ADF5902_REG2 0x2
52 #define ADF5902_REG3 0x3
53 #define ADF5902_REG4 0x4
54 #define ADF5902_REG5 0x5
55 #define ADF5902_REG6 0x6
56 #define ADF5902_REG7 0x7
57 #define ADF5902_REG8 0x8
58 #define ADF5902_REG9 0x9
59 #define ADF5902_REG10 0xA
60 #define ADF5902_REG11 0xB
61 #define ADF5902_REG12 0xC
62 #define ADF5902_REG13 0xD
63 #define ADF5902_REG14 0xE
64 #define ADF5902_REG15 0xF
65 #define ADF5902_REG16 0x10
66 #define ADF5902_REG17 0x11
69 #define ADF5902_REG0_PLO(x) (((x) & 0x1) << 5)
70 #define ADF5902_REG0_PTX1(x) (((x) & 0x1) << 6)
71 #define ADF5902_REG0_PTX2(x) (((x) & 0x1) << 7)
72 #define ADF5902_REG0_PADC(x) (((x) & 0x1) << 8)
73 #define ADF5902_REG0_VCAL(x) (((x) & 0x1) << 9)
74 #define ADF5902_REG0_PVCO(x) (((x) & 0x1) << 10)
75 #define ADF5902_REG0_TX1C(x) (((x) & 0x1) << 11)
76 #define ADF5902_REG0_TX2C(x) (((x) & 0x1) << 12)
77 #define ADF5902_REG0_RESERVED (0x4007FU << 13)
80 #define ADF5902_POWER_DOWN_LO 0x0
81 #define ADF5902_POWER_UP_LO 0x1
83 #define ADF5902_POWER_DOWN_TX1 0x0
84 #define ADF5902_POWER_UP_TX1 0x1
86 #define ADF5902_POWER_DOWN_TX2 0x0
87 #define ADF5902_POWER_UP_TX2 0x1
89 #define ADF5902_POWER_DOWN_ADC 0x0
90 #define ADF5902_POWER_UP_ADC 0x1
92 #define ADF5902_VCO_NORMAL_OP 0x0
93 #define ADF5902_VCO_FULL_CAL 0x1
95 #define ADF5902_POWER_DOWN_VCO 0x0
96 #define ADF5902_POWER_UP_VCO 0x1
98 #define ADF5902_TX1_NORMAL_OP 0x0
99 #define ADF5902_TX1_AMP_CAL 0x1
101 #define ADF5902_TX2_NORMAL_OP 0x0
102 #define ADF5902_TX2_AMP_CAL 0x1
105 #define ADF5902_REG1_TX_AMP_CAL_REF(x) (((x) & 0xFF) << 5)
106 #define ADF5902_REG1_RESERVED (0x7FFBFU << 13)
109 #define ADF5902_TX_AMP_CAL_MIN_REF_CODE 0x00
110 #define ADF5902_TX_AMP_CAL_MAX_REF_CODE 0xFF
113 #define ADF5902_REG2_ADC_CLK_DIV(x) (((x) & 0xFF) << 5)
114 #define ADF5902_REG2_ADC_AVG(x) (((x) & 0x3) << 13)
115 #define ADF5902_REG2_ADC_START(x) (((x) & 0x1) << 15)
116 #define ADF5902_REG2_RESERVED (0x2 << 16)
119 #define ADF5902_ADC_MIN_CLK_DIVIDER 0x1
120 #define ADF5902_ADC_MAX_CLK_DIVIDER 0x7F
122 #define ADF5902_ADC_AVG_1 0x0
123 #define ADF5902_ADC_AVG_2 0x1
124 #define ADF5902_ADC_AVG_3 0x2
125 #define ADF5902_ADC_AVG_4 0x3
127 #define ADF5902_ADC_NORMAL_OP 0x0
128 #define ADF5902_START_ADC_CONV 0x1
131 #define ADF5902_REG3_READBACK_CTRL(x) (((x) & 0x3F) << 5)
132 #define ADF5902_REG3_IO_LVL(x) (((x) & 0x1) << 11)
133 #define ADF5902_REG3_MUXOUT(x) (((x) & 0xF) << 12)
134 #define ADF5902_REG3_RESERVED (0x189 << 16)
137 #define ADF5902_REG_RB_NONE 0x0
138 #define ADF5902_REG0_RB 0x1
139 #define ADF5902_REG1_RB 0x2
140 #define ADF5902_REG2_RB 0x3
141 #define ADF5902_REG3_RB 0x4
142 #define ADF5902_REG4_RB 0x5
143 #define ADF5902_REG5_RB 0x6
144 #define ADF5902_REG6_RB 0x7
145 #define ADF5902_REG7_RB 0x8
146 #define ADF5902_REG8_RB 0x9
147 #define ADF5902_REG9_RB 0xA
148 #define ADF5902_REG10_RB 0xB
149 #define ADF5902_REG11_RB 0xC
150 #define ADF5902_REG12_RB 0xD
151 #define ADF5902_REG13_SEL_0_RB 0xE
152 #define ADF5902_REG14_SEL_0_RB 0xF
153 #define ADF5902_REG15_SEL_0_RB 0x10
154 #define ADF5902_REG16_SEL_0_RB 0x11
155 #define ADF5902_REG17_RB 0x12
156 #define ADF5902_ADC_RB 0x16
157 #define ADF5902_FREQ_RB 0x1A
158 #define ADF5902_REG13_SEL_1_RB 0x33
159 #define ADF5902_REG14_SEL_1_RB 0x34
160 #define ADF5902_REG15_SEL_1_RB 0x35
161 #define ADF5902_REG16_SEL_1_RB 0x36
162 #define ADF5902_REG13_SEL_2_RB 0x37
163 #define ADF5902_REG14_SEL_2_RB 0x38
164 #define ADF5902_REG15_SEL_2_RB 0x39
165 #define ADF5902_REG16_SEL_2_RB 0x3A
166 #define ADF5902_REG13_SEL_3_RB 0x3B
167 #define ADF5902_REG14_SEL_3_RB 0x3C
168 #define ADF5902_REG15_SEL_3_RB 0x3D
169 #define ADF5902_REG16_SEL_3_RB 0x3F
171 #define ADF5902_IO_LVL_1V8 0x0
172 #define ADF5902_IO_LVL_3V3 0x1
174 #define ADF5902_MUXOUT_TRISTATE_OUT 0x0
175 #define ADF5902_MUXOUT_LOGIC_HIGH 0x1
176 #define ADF5902_MUXOUT_LOGIC_LOW 0x2
177 #define ADF5902_MUXOUT_R_DIV_OUT 0x3
178 #define ADF5902_MUXOUT_N_DIV_OUT 0x4
179 #define ADF5902_MUXOUT_CAL_BUSY 0x7
180 #define ADF5902_MUXOUT_R_DIV_OUT_2 0xB
181 #define ADF5902_MUXOUT_N_DIV_OUT_2 0xC
182 #define ADF5902_MUXOUT_RAMP_STATUS 0xF
185 #define ADF5902_REG4_TEST_BUS(x) (((x) & 0x7FFF) << 5)
186 #define ADF5902_REG4_RESERVED (0x0 << 16)
189 #define ADF5902_TEST_BUS_NONE 0x0000
190 #define ADF5902_RAMP_COMPL_TO_MUXOUT 0x00C0
191 #define ADF5902_RAMP_DOWN_TO_MUXOUT 0x0100
192 #define ADF5902_TEMP_SENS_TO_ATEST 0x0503
193 #define ADF5902_TEMP_SENS_TO_ADC 0x0903
196 #define ADF5902_REG5_FRAC_MSB_WORD(x) (((x) & 0xFFF) << 5)
197 #define ADF5902_REG5_INTEGER_WORD(x) (((x) & 0xFFF) << 17)
198 #define ADF5902_REG5_RAMP_ON(x) (((x) & 0x1) << 29)
199 #define ADF5902_REG5_RESERVED (0x0 << 30)
202 #define ADF5902_MIN_FRAC_MSB_WORD 0x000
203 #define ADF5902_MAX_FRAC_MSB_WORD 0xFFF
205 #define ADF5902_MIN_INT_MSB_WORD 0x000
206 #define ADF5902_MAX_INT_MSB_WORD 0xFFF
208 #define ADF5902_RAMP_ON_DISABLED 0x0
209 #define ADF5902_RAMP_ON_ENABLED 0x1
212 #define ADF5902_REG6_FRAC_LSB_WORD(x) (((x) & 0x1FFF) << 5)
213 #define ADF5902_REG6_RESERVED (0x0 << 18)
216 #define ADF5902_MIN_FRAC_LSB_WORD 0x000
217 #define ADF5902_MAX_FRAC_LSB_WORD 0x1FFF
220 #define ADF5902_REG7_R_DIVIDER(x) (((x) & 0x1F) << 5)
221 #define ADF5902_REG7_REF_DOUBLER(x) (((x) & 0x1) << 10)
222 #define ADF5902_REG7_R_DIV_2(x) (((x) & 0x1) << 11)
223 #define ADF5902_REG7_CLK_DIV(x) (((x) & 0xFFF) << 12)
224 #define ADF5902_REG7_MASTER_RESET(x) (((x) & 0x1) << 25)
225 #define ADF5902_REG7_RESERVED ((0x0 << 26) | (0x1 << 24))
228 #define ADF5902_MIN_R_DIVIDER 0x01
229 #define ADF5902_MAX_R_DIVIDER 0x1F
231 #define ADF5902_R_DIV_2_DISABLE 0x0
232 #define ADF5902_R_DIV_2_ENABLE 0x1
234 #define ADF5902_REF_DOUBLER_DISABLE 0x0
235 #define ADF5902_REF_DOUBLER_ENABLE 0x1
237 #define ADF5902_MIN_CLK_DIVIDER 0x000
238 #define ADF5902_MAX_CLK_DIVIDER 0xFFF
240 #define ADF5902_MASTER_RESET_DISABLE 0x0
241 #define ADF5902_MASTER_RESET_ENABLE 0x1
244 #define ADF5902_REG8_FREQ_CAL_DIV(x) (((x) & 0x3FF) << 5)
245 #define ADF5902_REG8_RESERVED (0x8000 << 15)
248 #define ADF5902_MIN_FREQ_CAL_DIV 0x000
249 #define ADF5902_MAX_FREQ_CAL_DIV 0x3FF
252 #define ADF5902_REG9_RESERVED_CALIB (0x15105C9 << 5)
253 #define ADF5902_REG9_RESERVED_NORMAL (0x14005C9 << 5)
256 #define ADF5902_REG10_RESERVED (0xE99532 << 5)
259 #define ADF5902_REG11_CNTR_RESET(x) (((x) & 0x1) << 5)
260 #define ADF5902_REG11_RAMP_MODE(x) (((x) & 0x3) << 7)
261 #define ADF5902_REG11_SING_FULL_TRI(x) (((x) & 0x1) << 9)
262 #define ADF5902_REG11_SD_RESET(x) (((x) & 0x1) << 11)
263 #define ADF5902_REG11_RESERVED ((0x0 << 6) | (0x0 << 10) | (0x0 << 12))
266 #define ADF5902_CNTR_RESET_DISABLE 0x0
267 #define ADF5902_CNTR_RESET_ENABLE 0x1
269 #define ADF5902_CONT_SAWTOOTH 0x0
270 #define ADF5902_SAWTOOTH_BURST 0x1
271 #define ADF5902_CONTINUOUS_TRIANGULAR 0x2
272 #define ADF5902_SINGLE_RAMP_BURST 0x3
274 #define ADF5902_SINGLE_FULL_TRI_DISBLE 0x0
275 #define ADF5902_SINGLE_FULL_TRI_ENABLE 0x1
277 #define ADF5902_SD_RESET_ENABLE 0x0
278 #define ADF5902_SD_RESET_DISABLE 0x1
281 #define ADF5902_REG12_CP_TRISTATE(x) (((x) & 0x1) << 15)
282 #define ADF5902_REG12_CHARGE_PUMP(x) (((x) & 0xF) << 17)
283 #define ADF5902_REG12_RESERVED ((0x0 << 5) | (0x1 << 16) | (0x2 << 21))
286 #define ADF5902_CP_TRISTATE_DISABLE 0x0
287 #define ADF5902_CP_TRISTATE_ENABLE 0x1
289 #define ADF5902_CP_CURRENT_280UA 0x0
290 #define ADF5902_CP_CURRENT_560UA 0x1
291 #define ADF5902_CP_CURRENT_840UA 0x2
292 #define ADF5902_CP_CURRENT_1MA12 0x3
293 #define ADF5902_CP_CURRENT_1MA40 0x4
294 #define ADF5902_CP_CURRENT_1MA68 0x5
295 #define ADF5902_CP_CURRENT_1MA96 0x6
296 #define ADF5902_CP_CURRENT_2MA24 0x7
297 #define ADF5902_CP_CURRENT_2MA52 0x8
298 #define ADF5902_CP_CURRENT_2MA80 0x9
299 #define ADF5902_CP_CURRENT_3MA08 0xA
300 #define ADF5902_CP_CURRENT_3MA36 0xB
301 #define ADF5902_CP_CURRENT_3MA64 0xC
302 #define ADF5902_CP_CURRENT_3MA92 0xD
303 #define ADF5902_CP_CURRENT_4MA20 0xE
304 #define ADF5902_CP_CURRENT_4MA48 0xF
307 #define ADF5902_REG13_CLK_DIV_SEL(x) (((x) & 0x3) << 5)
308 #define ADF5902_REG13_CLK_DIV_2(x) (((x) & 0xFFF) << 7)
309 #define ADF5902_REG13_CLK_DIV_MODE(x) (((x) & 0x3) << 19)
310 #define ADF5902_REG13_LE_SEL(x) (((x) & 0x1) << 21)
311 #define ADF5902_REG13_RESERVED (0x0 << 22)
314 #define ADF5902_CLK_DIV_SEL_0 0x0
315 #define ADF5902_CLK_DIV_SEL_1 0x1
316 #define ADF5902_CLK_DIV_SEL_2 0x2
317 #define ADF5902_CLK_DIV_SEL_3 0x3
319 #define ADF5902_MIN_CLK_DIV_2 0x000
320 #define ADF5902_MAX_CLK_DIV_2 0xFFF
322 #define ADF5902_CLK_DIV_OFF 0x0
323 #define ADF5902_FREQ_MEASURE 0x2
324 #define ADF5902_RAMP_DIV 0x3
326 #define ADF5902_LE_FROM_PIN 0x0
327 #define ADF5902_LE_SYNC_REFIN 0x1
330 #define ADF5902_REG14_DEV_WORD(x) (((x) & 0xFFFF) << 5)
331 #define ADF5902_REG14_DEV_OFFSET(x) (((x) & 0xF) << 21)
332 #define ADF5902_REG14_DEV_SEL(x) (((x) & 0x3) << 25)
333 #define ADF5902_REG14_TX_RAMP_CLK(x) (((x) & 0x1) << 30)
334 #define ADF5902_REG14_TX_DATA_INV(x) (((x) & 0x1) << 31)
335 #define ADF5902_REG14_RESERVED (0x0 << 27)
338 #define ADF5902_MAX_DEV_WORD 0x7FFF
339 #define ADF5902_MIN_DEV_WORD (int16_t)0x8000
341 #define ADF5902_MAX_DEV_OFFSET 0x9
342 #define ADF5902_MIN_DEV_OFFSET 0x0
344 #define ADF5902_DEV_SEL_0 0x0
345 #define ADF5902_DEV_SEL_1 0x1
346 #define ADF5902_DEV_SEL_2 0x2
347 #define ADF5902_DEV_SEL_3 0x3
349 #define ADF5902_TX_RAMP_CLK_DIV 0x0
350 #define ADF5902_TX_RAMP_TX_DATA_PIN 0x1
352 #define AD5902_TX_DATA_INV_DISABLE 0x0
353 #define AD5902_TX_DATA_INV_ENABLE 0x1
356 #define ADF5902_REG15_STEP_WORD(x) (((x) & 0xFFFFF) << 5)
357 #define ADF5902_REG15_STEP_SEL(x) (((x) & 0x3) << 25)
358 #define ADF5902_REG15_RESERVED (0x0 << 27)
361 #define ADF5902_MIN_STEP_WORD 0x00000
362 #define ADF5902_MAX_STEP_WORD 0xFFFFF
364 #define ADF5902_STEP_SEL_0 0x0
365 #define ADF5902_STEP_SEL_1 0x1
366 #define ADF5902_STEP_SEL_2 0x2
367 #define ADF5902_STEP_SEL_3 0x3
370 #define ADF5902_REG16_DEL_START_WORD(x) (((x) & 0xFFF) << 5)
371 #define ADF5902_REG16_RAMP_DEL(x) (((x) & 0x1) << 19)
372 #define ADF5902_REG16_TX_DATA_TRIG(x) (((x) & 0x1) << 20)
373 #define ADF5902_REG16_DEL_SEL(x) (((x) & 0x3) << 23)
374 #define ADF5902_REG16_RESERVED ((0x0 << 17) | (0x0 << 21) | (0x1 << 25))
376 #define ADF5902_MIN_DELAY_START_WRD 0x000
377 #define ADF5902_MAX_DELAY_START_WRD 0xFFF
379 #define ADF5902_RAMP_DEL_DISABLE 0x0
380 #define ADF5902_RAMP_DEL_ENABLE 0x1
382 #define ADF5902_TX_DATA_TRIG_DISABLE 0x0
383 #define ADF5902_TX_DATA_TRIG_ENABLE 0x1
385 #define ADF5902_DEL_SEL_0 0x0
386 #define ADF5902_DEL_SEL_1 0x1
387 #define ADF5902_DEL_SEL_2 0x2
388 #define ADF5902_DEL_SEL_3 0x3
391 #define ADF5902_REG17_RESERVED (0x0 << 5)
394 #define ADF5902_MAX_VCO_FREQ 24250000000ull
395 #define ADF5902_MIN_VCO_FREQ 24000000000ull
396 #define ADF5902_MIN_REFIN_FREQ 10000000
397 #define ADF5902_MAX_REFIN_FREQ 260000000
398 #define ADF5902_MAX_FREQ_PFD 110000000
399 #define ADF5902_MAX_SLOPE_NO 4
400 #define ADF5902_MAX_DELAY_WORD_NO 4
401 #define ADF5902_MAX_CLK2_DIV_NO 4
402 #define ADF5902_VLSB 0.00733f
403 #define ADF5902_VOFF 0.699f
404 #define ADF5902_VGAIN 0.0064f
405 #define ADF5902_SPI_DUMMY_DATA 0x0
406 #define ADF5902_FREQ_CAL_DIV_100KHZ 100000
407 #define ADF5902_CLK1_DIV_25KHZ 25000
408 #define ADF5902_ADC_CLK_DIV_1MHZ 1000000
409 #define ADF5902_BUFF_SIZE_BYTES 4
410 #define ADF5902_FRAC_MSB_MSK 0xFFF
411 #define ADF5902_FRAC_LSB_MSK 0x1FFF
#define ADF5902_REG10_RESERVED
Definition: adf5902.h:256
#define ADF5902_MAX_CLK_DIV_2
Definition: adf5902.h:320
uint16_t freq_cal_div
Definition: adf5902.h:503
uint8_t ref_div_factor
Definition: adf5902.h:491
#define ADF5902_REG8_FREQ_CAL_DIV(x)
Definition: adf5902.h:244
#define ADF5902_REG7_MASTER_RESET(x)
Definition: adf5902.h:224
uint8_t ramp_delay_en
Definition: adf5902.h:444
#define ADF5902_REG6
Definition: adf5902.h:55
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
uint8_t ref_div2_en
Definition: adf5902.h:438
uint16_t ramp_status
Definition: adf5902.h:531
#define ADF5902_TX_RAMP_TX_DATA_PIN
Definition: adf5902.h:350
#define ADF5902_REG3_MUXOUT(x)
Definition: adf5902.h:133
#define ADF5902_REG7_R_DIV_2(x)
Definition: adf5902.h:222
#define ADF5902_RAMP_DIV
Definition: adf5902.h:324
#define ADF5902_CONTINUOUS_TRIANGULAR
Definition: adf5902.h:271
#define ADF5902_R_DIV_2_DISABLE
Definition: adf5902.h:231
int32_t adf5902_recalibrate(struct adf5902_dev *dev)
Recalibration procedure.
Definition: adf5902.c:676
#define ADF5902_REF_DOUBLER_ENABLE
Definition: adf5902.h:235
struct slope * slopes
Definition: adf5902.h:525
#define ADF5902_REG12_CP_TRISTATE(x)
Definition: adf5902.h:281
#define ADF5902_CNTR_RESET_ENABLE
Definition: adf5902.h:267
uint8_t cp_tristate_en
Definition: adf5902.h:543
#define ADF5902_LE_SYNC_REFIN
Definition: adf5902.h:327
#define ADF5902_MAX_DELAY_START_WRD
Definition: adf5902.h:377
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 ADF5902_TX1_AMP_CAL
Definition: adf5902.h:99
int32_t adf5902_write(struct adf5902_dev *dev, uint8_t reg_addr, uint32_t data)
Writes 4 bytes of data to ADF5902.
Definition: adf5902.c:55
#define ADF5902_ADC_AVG_4
Definition: adf5902.h:125
Header file of SPI Interface.
#define ADF5902_REG13_CLK_DIV_MODE(x)
Definition: adf5902.h:309
int32_t adf5902_read_temp(struct adf5902_dev *dev, float *temp)
Free resoulces allocated for ADF5902.
Definition: adf5902.c:738
uint8_t tx_trig_en
Definition: adf5902.h:446
#define ADF5902_REG7_RESERVED
Definition: adf5902.h:225
#define ADF5902_REG6_RESERVED
Definition: adf5902.h:213
struct no_os_spi_desc * spi_desc
Definition: adf5902.h:481
#define ADF5902_REG5_RAMP_ON(x)
Definition: adf5902.h:198
#define ADF5902_FREQ_RB
Definition: adf5902.h:157
#define ADF5902_REG12
Definition: adf5902.h:61
uint8_t ref_div2_en
Definition: adf5902.h:495
#define ADF5902_REG1
Definition: adf5902.h:50
uint8_t tx_ramp_clk
Definition: adf5902.h:456
#define ADF5902_REG2
Definition: adf5902.h:51
uint64_t ref_in
Definition: adf5902.h:485
#define ADF5902_REG0_TX2C(x)
Definition: adf5902.h:76
Header file of Delay functions.
#define ADF5902_REG11_RAMP_MODE(x)
Definition: adf5902.h:260
#define ADF5902_POWER_UP_TX1
Definition: adf5902.h:84
#define ADF5902_FREQ_CAL_DIV_100KHZ
Definition: adf5902.h:406
#define ADF5902_RAMP_COMPL_TO_MUXOUT
Definition: adf5902.h:190
#define ADF5902_REG8_RESERVED
Definition: adf5902.h:245
#define ADF5902_LE_FROM_PIN
Definition: adf5902.h:326
uint16_t * clk2_div
Definition: adf5902.h:535
#define ADF5902_REG0_PTX1(x)
Definition: adf5902.h:70
#define ADF5902_REG0_RESERVED
Definition: adf5902.h:77
Definition: ad9361_util.h:69
#define ADF5902_REG15_RESERVED
Definition: adf5902.h:358
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
uint8_t tx_data_invert
Definition: adf5902.h:529
uint8_t adc_avg
Definition: adf5902.h:440
#define ADF5902_RAMP_ON_DISABLED
Definition: adf5902.h:208
#define ADF5902_REG9
Definition: adf5902.h:58
#define ADF5902_TX_DATA_TRIG_DISABLE
Definition: adf5902.h:382
#define ADF5902_TX_DATA_TRIG_ENABLE
Definition: adf5902.h:383
#define ADF5902_REG15
Definition: adf5902.h:64
#define ADF5902_SINGLE_RAMP_BURST
Definition: adf5902.h:272
uint8_t tx_amp_cal_ref
Definition: adf5902.h:513
#define ADF5902_REG13_CLK_DIV_SEL(x)
Definition: adf5902.h:307
struct no_os_spi_init_param * spi_init
Definition: adf5902.h:428
#define ADF5902_VGAIN
Definition: adf5902.h:404
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
#define ADF5902_SPI_DUMMY_DATA
Definition: adf5902.h:405
#define ADF5902_REG7_REF_DOUBLER(x)
Definition: adf5902.h:221
uint16_t clk1_div_ramp
Definition: adf5902.h:507
uint8_t cp_current
Definition: adf5902.h:472
#define ADF5902_REG2_ADC_AVG(x)
Definition: adf5902.h:114
#define ADF5902_REG10
Definition: adf5902.h:59
#define ADF5902_REG2_ADC_CLK_DIV(x)
Definition: adf5902.h:113
#define ADF5902_DEL_SEL_3
Definition: adf5902.h:388
#define ADF5902_POWER_DOWN_TX2
Definition: adf5902.h:86
#define ADF5902_MAX_INT_MSB_WORD
Definition: adf5902.h:206
#define ADF5902_FRAC_LSB_MSK
Definition: adf5902.h:411
#define ADF5902_REG13_CLK_DIV_2(x)
Definition: adf5902.h:308
#define ADF5902_ADC_RB
Definition: adf5902.h:156
#define ADF5902_REG17_RESERVED
Definition: adf5902.h:391
#define ADF5902_REG13
Definition: adf5902.h:62
#define ADF5902_REG0_PADC(x)
Definition: adf5902.h:72
uint8_t tx_trig_en
Definition: adf5902.h:517
uint16_t frac_msb
Definition: adf5902.h:499
int32_t adf5902_write(struct adf5902_dev *dev, uint8_t reg_addr, uint32_t data)
Writes 4 bytes of data to ADF5902.
Definition: adf5902.c:55
#define ADF5902_REG5_FRAC_MSB_WORD(x)
Definition: adf5902.h:196
#define ADF5902_REG5_INTEGER_WORD(x)
Definition: adf5902.h:197
#define ADF5902_REG16_TX_DATA_TRIG(x)
Definition: adf5902.h:372
uint16_t int_div
Definition: adf5902.h:497
uint8_t le_sel
Definition: adf5902.h:537
#define ADF5902_REG3_IO_LVL(x)
Definition: adf5902.h:132
int32_t adf5902_readback(struct adf5902_dev *dev, uint8_t reg_addr, uint32_t *data)
Readback data from ADF5902.
Definition: adf5902.c:76
int32_t adf5902_remove(struct adf5902_dev *dev)
Free resoulces allocated for ADF5902.
Definition: adf5902.c:904
uint8_t clk_div_mode
Definition: adf5902.h:470
#define ADF5902_MIN_REFIN_FREQ
Definition: adf5902.h:396
#define ADF5902_REG5
Definition: adf5902.h:54
#define ADF5902_REG3_RESERVED
Definition: adf5902.h:134
#define NO_OS_DIV_ROUND_UP(x, y)
Definition: no_os_util.h:52
#define ADF5902_REG16_RESERVED
Definition: adf5902.h:374
#define ADF5902_MAX_DELAY_WORD_NO
Definition: adf5902.h:400
#define ADF5902_REG4_TEST_BUS(x)
Definition: adf5902.h:185
#define ADF5902_REG6_FRAC_LSB_WORD(x)
Definition: adf5902.h:212
#define ADF5902_RAMP_DEL_DISABLE
Definition: adf5902.h:379
#define ADF5902_MIN_VCO_FREQ
Definition: adf5902.h:395
struct slope * slopes
Definition: adf5902.h:454
uint8_t ramp_mode
Definition: adf5902.h:476
#define ADF5902_CNTR_RESET_DISABLE
Definition: adf5902.h:266
#define ADF5902_ADC_CLK_DIV_1MHZ
Definition: adf5902.h:408
#define ADF5902_REG7
Definition: adf5902.h:56
#define ADF5902_MAX_DEV_OFFSET
Definition: adf5902.h:341
#define ADF5902_REG7_CLK_DIV(x)
Definition: adf5902.h:223
Definition: adf5902.h:417
uint8_t slopes_no
Definition: adf5902.h:452
Definition: adf5902.h:426
#define ADF5902_ADC_MAX_CLK_DIVIDER
Definition: adf5902.h:120
uint8_t delay_words_no
Definition: adf5902.h:448
#define ADF5902_TX_RAMP_CLK_DIV
Definition: adf5902.h:349
uint8_t clk2_div_no
Definition: adf5902.h:533
#define ADF5902_REG11_CNTR_RESET(x)
Definition: adf5902.h:259
#define ADF5902_REG3
Definition: adf5902.h:52
#define ADF5902_REG15_STEP_SEL(x)
Definition: adf5902.h:357
#define ADF5902_TEMP_SENS_TO_ATEST
Definition: adf5902.h:192
uint8_t clk2_div_no
Definition: adf5902.h:464
uint8_t tx_data_invert
Definition: adf5902.h:458
#define ADF5902_RAMP_DOWN_TO_MUXOUT
Definition: adf5902.h:191
uint8_t adc_avg
Definition: adf5902.h:511
#define ADF5902_REF_DOUBLER_DISABLE
Definition: adf5902.h:234
#define ADF5902_FRAC_MSB_MSK
Definition: adf5902.h:410
int32_t adf5902_init(struct adf5902_dev **device, struct adf5902_init_param *init_param)
Initializes the ADF5902.
Definition: adf5902.c:470
uint8_t ref_doubler_en
Definition: adf5902.h:493
uint8_t le_sel
Definition: adf5902.h:468
#define ADF5902_REG3_READBACK_CTRL(x)
Definition: adf5902.h:131
#define ADF5902_REG12_RESERVED
Definition: adf5902.h:283
uint8_t tx_amp_cal_ref
Definition: adf5902.h:442
uint16_t clk1_div
Definition: adf5902.h:505
#define ADF5902_REG2_RESERVED
Definition: adf5902.h:116
#define ADF5902_VOFF
Definition: adf5902.h:403
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:104
#define ADF5902_RAMP_DEL_ENABLE
Definition: adf5902.h:380
uint8_t dev_offset
Definition: adf5902.h:421
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
uint8_t ramp_delay_en
Definition: adf5902.h:515
#define ADF5902_MAX_FREQ_CAL_DIV
Definition: adf5902.h:249
struct no_os_gpio_desc * gpio_ce
Definition: adf5902.h:483
#define ADF5902_VLSB
Definition: adf5902.h:402
#define ADF5902_REG0_PVCO(x)
Definition: adf5902.h:74
#define ADF5902_POWER_UP_VCO
Definition: adf5902.h:96
int32_t adf5902_remove(struct adf5902_dev *dev)
Free resoulces allocated for ADF5902.
Definition: adf5902.c:904
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
#define ADF5902_REG0_VCAL(x)
Definition: adf5902.h:73
Header file for adf5902 Driver.
uint64_t rf_out
Definition: adf5902.h:434
#define ADF5902_CONT_SAWTOOTH
Definition: adf5902.h:269
#define ADF5902_TEST_BUS_NONE
Definition: adf5902.h:189
uint64_t ref_in
Definition: adf5902.h:432
#define ADF5902_REG1_RESERVED
Definition: adf5902.h:106
#define ADF5902_REG16
Definition: adf5902.h:65
#define ADF5902_CLK_DIV_SEL_3
Definition: adf5902.h:317
#define ADF5902_MAX_VCO_FREQ
Definition: adf5902.h:394
#define ADF5902_REG11_RESERVED
Definition: adf5902.h:263
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:49
#define ADF5902_REG13_RESERVED
Definition: adf5902.h:311
#define ADF5902_MUXOUT_CAL_BUSY
Definition: adf5902.h:179
#define ADF5902_POWER_UP_TX2
Definition: adf5902.h:87
#define ADF5902_REG0_PTX2(x)
Definition: adf5902.h:71
#define ADF5902_MUXOUT_RAMP_STATUS
Definition: adf5902.h:182
int16_t dev_word
Definition: adf5902.h:419
#define ADF5902_MASTER_RESET_DISABLE
Definition: adf5902.h:240
#define ADF5902_CLK_DIV_OFF
Definition: adf5902.h:322
#define ADF5902_REG16_RAMP_DEL(x)
Definition: adf5902.h:371
#define ADF5902_CLK1_DIV_25KHZ
Definition: adf5902.h:407
#define ADF5902_REG4
Definition: adf5902.h:53
uint8_t ramp_mode
Definition: adf5902.h:545
#define ADF5902_CP_TRISTATE_DISABLE
Definition: adf5902.h:286
#define AD5902_TX_DATA_INV_DISABLE
Definition: adf5902.h:352
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
#define ADF5902_VCO_NORMAL_OP
Definition: adf5902.h:92
#define ADF5902_MAX_STEP_WORD
Definition: adf5902.h:362
#define ADF5902_MAX_FREQ_PFD
Definition: adf5902.h:398
#define ADF5902_REG12_CHARGE_PUMP(x)
Definition: adf5902.h:282
#define ADF5902_MAX_REFIN_FREQ
Definition: adf5902.h:397
#define ADF5902_R_DIV_2_ENABLE
Definition: adf5902.h:232
uint8_t cp_tristate_en
Definition: adf5902.h:474
#define ADF5902_REG14_DEV_OFFSET(x)
Definition: adf5902.h:331
int32_t adf5902_init(struct adf5902_dev **device, struct adf5902_init_param *init_param)
Initializes the ADF5902.
Definition: adf5902.c:470
#define ADF5902_TX2_AMP_CAL
Definition: adf5902.h:102
#define ADF5902_REG15_STEP_WORD(x)
Definition: adf5902.h:356
#define ADF5902_TEMP_SENS_TO_ADC
Definition: adf5902.h:193
#define ADF5902_REG0_PLO(x)
Definition: adf5902.h:69
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
#define ADF5902_REG0
Definition: adf5902.h:49
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
int32_t adf5902_readback(struct adf5902_dev *dev, uint8_t reg_addr, uint32_t *data)
Readback data from ADF5902.
Definition: adf5902.c:76
#define ADF5902_POWER_DOWN_TX1
Definition: adf5902.h:83
#define ADF5902_REG9_RESERVED_CALIB
Definition: adf5902.h:252
#define ADF5902_POWER_UP_ADC
Definition: adf5902.h:90
#define AD5902_TX_DATA_INV_ENABLE
Definition: adf5902.h:353
#define ADF5902_SAWTOOTH_BURST
Definition: adf5902.h:270
uint16_t adc_clk_div
Definition: adf5902.h:509
#define ADF5902_REG4_RESERVED
Definition: adf5902.h:186
#define ADF5902_REG5_RESERVED
Definition: adf5902.h:199
int32_t adf5902f_compute_frequency(struct adf5902_dev *dev, uint64_t *freq)
Measure output locked frequency.
Definition: adf5902.c:794
#define ADF5902_MASTER_RESET_ENABLE
Definition: adf5902.h:241
#define ADF5902_POWER_DOWN_LO
Definition: adf5902.h:80
uint8_t tx_ramp_clk
Definition: adf5902.h:527
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
int32_t adf5902_recalibrate(struct adf5902_dev *dev)
Recalibration procedure.
Definition: adf5902.c:676
#define ADF5902_MAX_CLK2_DIV_NO
Definition: adf5902.h:401
uint32_t step_word
Definition: adf5902.h:423
#define ADF5902_VCO_FULL_CAL
Definition: adf5902.h:93
uint16_t * delay_wd
Definition: adf5902.h:521
Header file of GPIO Interface.
uint16_t delay_wd[ADF5902_MAX_DELAY_WORD_NO]
Definition: adf5902.h:450
#define ADF5902_REG2_ADC_START(x)
Definition: adf5902.h:115
uint8_t cp_current
Definition: adf5902.h:541
uint64_t f_pfd
Definition: adf5902.h:489
#define ADF5902_REG9_RESERVED_NORMAL
Definition: adf5902.h:253
#define ADF5902_CP_TRISTATE_ENABLE
Definition: adf5902.h:287
#define ADF5902_POWER_UP_LO
Definition: adf5902.h:81
#define ADF5902_TX2_NORMAL_OP
Definition: adf5902.h:101
uint16_t ramp_status
Definition: adf5902.h:460
struct no_os_gpio_init_param * gpio_ce_param
Definition: adf5902.h:430
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
uint16_t frac_lsb
Definition: adf5902.h:501
#define ADF5902_REG0_TX1C(x)
Definition: adf5902.h:75
#define ADF5902_REG16_DEL_START_WORD(x)
Definition: adf5902.h:370
#define ADF5902_CP_CURRENT_4MA48
Definition: adf5902.h:304
Header file of utility functions.
#define ADF5902_REG17
Definition: adf5902.h:66
#define ADF5902_FREQ_MEASURE
Definition: adf5902.h:323
#define ADF5902_REG14_DEV_SEL(x)
Definition: adf5902.h:332
#define ADF5902_REG14
Definition: adf5902.h:63
uint64_t rf_out
Definition: adf5902.h:487
uint8_t slopes_no
Definition: adf5902.h:523
uint8_t delay_words_no
Definition: adf5902.h:519
#define ADF5902_REG14_RESERVED
Definition: adf5902.h:335
#define ADF5902_REG13_LE_SEL(x)
Definition: adf5902.h:310
#define ADF5902_STEP_SEL_3
Definition: adf5902.h:367
uint8_t ref_doubler_en
Definition: adf5902.h:436
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:147
#define ADF5902_REG14_DEV_WORD(x)
Definition: adf5902.h:330
#define ADF5902_BUFF_SIZE_BYTES
Definition: adf5902.h:409
#define ADF5902_START_ADC_CONV
Definition: adf5902.h:128
uint16_t clk2_div[ADF5902_MAX_CLK2_DIV_NO]
Definition: adf5902.h:466
int32_t adf5902f_compute_frequency(struct adf5902_dev *dev, uint64_t *freq)
Measure output locked frequency.
Definition: adf5902.c:794
#define ADF5902_REG16_DEL_SEL(x)
Definition: adf5902.h:373
#define ADF5902_MAX_CLK_DIVIDER
Definition: adf5902.h:238
uint8_t clk_div_mode
Definition: adf5902.h:539
#define ADF5902_REG7_R_DIVIDER(x)
Definition: adf5902.h:220
uint16_t clk1_div_ramp
Definition: adf5902.h:462
#define ADF5902_REG1_TX_AMP_CAL_REF(x)
Definition: adf5902.h:105
#define ADF5902_TX1_NORMAL_OP
Definition: adf5902.h:98
#define ADF5902_REG_RB_NONE
Definition: adf5902.h:137
#define ADF5902_IO_LVL_3V3
Definition: adf5902.h:172
#define ADF5902_REG8
Definition: adf5902.h:57
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
#define ADF5902_ADC_NORMAL_OP
Definition: adf5902.h:127
#define ADF5902_REG11
Definition: adf5902.h:60
int32_t adf5902_read_temp(struct adf5902_dev *dev, float *temp)
Free resoulces allocated for ADF5902.
Definition: adf5902.c:738
Definition: adf5902.h:479