no-OS
adf4106.h
Go to the documentation of this file.
1 /**************************************************************************/
34 #ifndef __ADF4106_H__
35 #define __ADF4106_H__
36 
37 /*****************************************************************************/
38 /****************************** Include Files ********************************/
39 /*****************************************************************************/
40 #include <stdint.h>
41 #include "no_os_delay.h"
42 #include "no_os_gpio.h"
43 #include "no_os_spi.h"
44 
45 /*****************************************************************************/
46 /* Device specific MACROs */
47 /*****************************************************************************/
48 /* GPIOs */
49 #define ADF4106_LE_OUT no_os_gpio_direction_output(dev->gpio_le, \
50  NO_OS_GPIO_HIGH)
51 #define ADF4106_LE_LOW no_os_gpio_set_value(dev->gpio_le, \
52  NO_OS_GPIO_LOW)
53 #define ADF4106_LE_HIGH no_os_gpio_set_value(dev->gpio_le, \
54  NO_OS_GPIO_HIGH)
55 
56 #define ADF4106_CE_OUT no_os_gpio_direction_output(dev->gpio_ce, \
57  NO_OS_GPIO_HIGH)
58 #define ADF4106_CE_LOW no_os_gpio_set_value(dev->gpio_ce, \
59  NO_OS_GPIO_LOW)
60 #define ADF4106_CE_HIGH no_os_gpio_set_value(dev->gpio_ce, \
61  NO_OS_GPIO_HIGH)
62 
63 #define ADF4106_LE2_OUT no_os_gpio_direction_output(dev->gpio_le2, \
64  NO_OS_GPIO_HIGH)
65 #define ADF4106_LE2_LOW no_os_gpio_set_value(dev->gpio_le2, \
66  NO_OS_GPIO_LOW)
67 #define ADF4106_LE2_HIGH no_os_gpio_set_value(dev->gpio_le2, \
68  NO_OS_GPIO_HIGH)
69 
70 #define ADF4106_CE2_OUT no_os_gpio_direction_output(dev->gpio_ce2, \
71  NO_OS_GPIO_HIGH)
72 #define ADF4106_CE2_LOW no_os_gpio_set_value(dev->gpio_ce2, \
73  NO_OS_GPIO_LOW)
74 #define ADF4106_CE2_HIGH no_os_gpio_set_value(dev->gpio_ce2, \
75  NO_OS_GPIO_HIGH)
76 
77 /* Control Bits */
78 #define ADF4106_CTRL_MASK 0x3
79 
80 #define ADF4106_CTRL_R_COUNTER 0 /* Reference Counter */
81 #define ADF4106_CTRL_N_COUNTER 1 /* N Counter */
82 #define ADF4106_CTRL_FUNCTION_LATCH 2 /* Function Latch*/
83 #define ADF4106_CTRL_INIT_LATCH 3 /* Initialization Latch*/
84 
85 /* Reference Counter Latch */
86 
87 #define ADF4106_R_COUNTER_OFFSET 2
88 #define ADF4106_R_COUNTER_MASK 0x3FFFul
89 #define ADF4106_R_COUNTER(x) ((x) & ADF4106_R_COUNTER_MASK) \
90  << ADF4106_R_COUNTER_OFFSET
91 /* Anti-backlash Pulse Width options */
92 #define ADF4106_R_ABP_OFFSET 16
93 #define ADF4106_R_ABP_MASK 0x3
94 #define ADF4106_R_ABP(x) ((x) & ADF4106_R_ABP_MASK) \
95  << ADF4106_R_ABP_OFFSET
96 #define ADF4106_R_ABP_2_9NS 0
97 #define ADF4106_R_ABP_1_3NS 1
98 #define ADF4106_R_ABP_6_0NS 2
99 
100 /* Test Mode Bits */
101 #define ADF4106_R_TMB_OFFSET 18
102 #define ADF4106_R_TMB_MASK 0x1
103 #define ADF4106_R_TMB(x) ((x) & ADF4106_R_TMB_MASK) \
104  << ADF4106_R_TMB_OFFSET
105 #define ADF4106_R_TMB_NORMAL 0
106 /* Lock Detect Precision */
107 #define ADF4106_R_LDP_OFFSET 20
108 #define ADF4106_R_LDP_MASK 0x1
109 #define ADF4106_R_LDP(x) ((x) & ADF4106_R_LDP_MASK) \
110  << ADF4106_R_LDP_OFFSET
111 #define ADF4106_R_LDP_3 0
112 #define ADF4106_R_LDP_5 1
113 
114 /* N Counter Latch */
115 #define ADF4106_N_COUNTER_A_OFFSET 2
116 #define ADF4106_N_COUNTER_A_MASK 0x3F
117 #define ADF4106_N_COUNTER_A(x) ((x) & ADF4106_N_COUNTER_A_MASK) \
118  << ADF4106_N_COUNTER_A_OFFSET
119 #define ADF4106_N_COUNTER_B_OFFSET 8
120 #define ADF4106_N_COUNTER_B_MASK 0x1FFF
121 #define ADF4106_N_COUNTER_B(x) ((x) & ADF4106_N_COUNTER_B_MASK) \
122  << ADF4106_N_COUNTER_B_OFFSET
123 /* Charge Pump Gain Settings */
124 #define ADF4106_N_CP_OFFSET 21
125 #define ADF4106_N_CP_MASK 0x1
126 #define ADF4106_N_CP(x) ((x) & ADF4106_N_CP_MASK) \
127  << ADF4106_N_CP_OFFSET
128 #define ADF4106_N_CP_GAIN_1 0
129 #define ADF4106_N_CP_GAIN_2 1
130 
131 /********* Function and Initialization register offsets and masks ************/
132 /* Counter Reset Bit */
133 #define ADF4106_CR_OFFSET 2
134 #define ADF4106_CR_MASK 0x1ul
135 #define ADF4106_CR(x) ((x) & ADF4106_CR_MASK) \
136  << ADF4106_CR_OFFSET
137 /* Power Down Bit 1 */
138 #define ADF4106_PD1_OFFSET 3
139 #define ADF4106_PD1_MASK 0x1
140 #define ADF4106_PD1(x) ((x) & ADF4106_PD1_MASK) \
141  << ADF4106_PD1_OFFSET
142 /* Muxout Control */
143 #define ADF4106_MUXOUT_OFFSET 4
144 #define ADF4106_MUXOUT_MASK 0x7
145 #define ADF4106_MUXOUT(x) ((x) & ADF4106_MUXOUT_MASK) \
146  << ADF4106_MUXOUT_OFFSET
147 /* Phase Detector Polarity */
148 #define ADF4106_PDPOL_OFFSET 7
149 #define ADF4106_PDPOL_MASK 0x1
150 #define ADF4106_PDPOL(x) ((x) & ADF4106_PDPOL_MASK) \
151  << ADF4106_PDPOL_OFFSET
152 /* Charge Pump Output*/
153 #define ADF4106_CP_OFFSET 8
154 #define ADF4106_CP_MASK 0x1
155 #define ADF4106_CP(x) ((x) & ADF4106_CP_MASK) \
156  << ADF4106_CP_OFFSET
157 /* Fast-lock Mode */
158 #define ADF4106_FASTLOCK_OFFSET 9
159 #define ADF4106_FASTLOCK_MASK 0x3
160 #define ADF4106_FASTLOCK(x) ((x) & ADF4106_FASTLOCK_MASK) \
161  << ADF4106_FASTLOCK_OFFSET
162 /* Timer Counter Control */
163 #define ADF4106_TCC_OFFSET 11
164 #define ADF4106_TCC_MASK 0xF
165 #define ADF4106_TCC(x) ((x) & ADF4106_TCC_MASK) \
166  << ADF4106_TCC_OFFSET
167 /* Current Setting Position */
168 #define ADF4106_CS1_OFFSET 15
169 #define ADF4106_CS1_MASK 0x7
170 #define ADF4106_CS1(x) ((x) << ADF4106_CS1_OFFSET)
171 #define ADF4106_CS2_OFFSET 18
172 #define ADF4106_CS2_MASK 0x7
173 #define ADF4106_CS2(x) ((x) << ADF4106_CS2_OFFSET)
174 
175 /* Synchronous or asynchronous power down*/
176 #define ADF4106_PD2_OFFSET 21
177 #define ADF4106_PD2_MASK 0x1
178 #define ADF4106_PD2(x) ((x) & ADF4106_PD2_MASK) \
179  << ADF4106_PD2_OFFSET
180 /* Prescaler value */
181 #define ADF4106_PS_OFFSET 22
182 #define ADF4106_PS_MASK 0x3
183 #define ADF4106_PS(x) ((x) & ADF4106_PS_MASK) \
184  << ADF4106_PS_OFFSET
185 
186 /* Counter Reset Bit Definition */
187 #define ADF4106_CR_NORMAL 0
188 #define ADF4106_CR_RESET 1
189 /* Power Down Bit 1 Definition */
190 #define ADF4106_PD1_NORMAL 0
191 #define ADF4106_PD1_POWER_DOWN 1
192 /* Muxout Control Definition */
193 #define ADF4106_MUXOUT_3STATE 0
194 #define ADF4106_MUXOUT_DLOCK_DETECT 1
195 #define ADF4106_MUXOUT_NDIV_OUTPUT 2
196 #define ADF4106_MUXOUT_AVDD 3
197 #define ADF4106_MUXOUT_RDIV_OUTPUT 4
198 #define ADF4106_MUXOUT_NCH_OPENDRAIN 5
199 #define ADF4106_MUXOUT_SERIAL_OUTPUT 6
200 #define ADF4106_MUXOUT_DGND 7
201 /* Phase Detector Polarity Definition */
202 #define ADF4106_PDPOL_NEGATIVE 0
203 #define ADF4106_PDPOL_POSITIVE 1
204 /* Charge Pump Output Definition */
205 #define ADF4106_CP_NORMAL 0
206 #define ADF4106_CP_THREE_STATE 1
207 /* Fast-lock Mode Definition */
208 #define ADF4106_FASTLOCK_DISABLE 0
209 #define ADF4106_FASTLOCK_MODE1 1
210 #define ADF4106_FASTLOCK_MODE2 3
211 /* Timer Counter Control Definition */
212 #define ADF4106_TCC_3 0
213 #define ADF4106_TCC_7 1
214 #define ADF4106_TCC_11 2
215 #define ADF4106_TCC_15 3
216 #define ADF4106_TCC_19 4
217 #define ADF4106_TCC_23 5
218 #define ADF4106_TCC_27 6
219 #define ADF4106_TCC_31 7
220 #define ADF4106_TCC_35 8
221 #define ADF4106_TCC_39 9
222 #define ADF4106_TCC_43 10
223 #define ADF4106_TCC_47 11
224 #define ADF4106_TCC_51 12
225 #define ADF4106_TCC_55 13
226 #define ADF4106_TCC_59 14
227 #define ADF4106_TCC_63 15
228 /* Current Settings Definitions */
229 #define ADF4106_CS_0_62 0
230 #define ADF4106_CS_1_25 1
231 #define ADF4106_CS_1_87 2
232 #define ADF4106_CS_2_5 3
233 #define ADF4106_CS_3_12 4
234 #define ADF4106_CS_3_75 5
235 #define ADF4106_CS_4_37 6
236 #define ADF4106_CS_5_0 7
237 /* Synchronous or asynchronous power down Definition */
238 #define ADF4106_ASYNC_PWD 0
239 #define ADF4106_SYNC_PWD 1
240 /* Prescaler value Definition */
241 #define ADF4106_PS_8_9 0
242 #define ADF4106_PS_16_17 1
243 #define ADF4106_PS_32_33 2
244 #define ADF4106_PS_64_65 3
245 
246 /* Default prescaler for ADF4001 and ADF4002 */
247 #define ADF4106_PRESCALE(x) (8 << (x))
248 
249 /*****************************************************************************/
250 /************************** Types Declarations *******************************/
251 /*****************************************************************************/
252 
260 
262  uint32_t ref_in;
263 
265  uint32_t pfd_max;
266 
268  uint16_t ref_counter : 14;
273  uint8_t anti_backlash_width : 2;
275  uint8_t test_mode_bits : 1;
280 
281  /* N Latch */
283  uint8_t a_n_counter : 6;
285  uint16_t b_n_counter : 13;
287  uint8_t cp_gain : 1;
288 
289  /* Functional/Initialization latch */
291  uint8_t counter_reset : 1;
293  uint8_t power_down1 : 1;
295  uint8_t muxout_control : 3;
297  uint8_t phase_detector_pol : 1;
299  uint8_t cp_type : 1;
301  uint8_t fast_lock_mode : 2;
309  uint8_t current_setting1 : 3;
313  uint8_t current_setting2 : 3;
315  uint8_t power_down2 : 1;
317  uint8_t prescaler_value : 2;
318 
319 };
320 
321 /* Supported devices */
326 };
327 
328 /* Initialization methods */
333 };
334 
340 };
341 
342 struct adf4106_dev {
343  /* SPI */
345  /* GPIO */
350  /* Device Settings */
354  /* Internal buffers for each latch */
355  uint32_t r_latch;
356  uint32_t n_latch;
357  uint32_t f_latch;
358  uint32_t i_latch;
359 };
360 
362  /* SPI */
364  /* GPIO */
369  /* Device Settings */
373 };
374 
375 /*****************************************************************************/
376 /* Functions Prototypes */
377 /*****************************************************************************/
378 /* Initialize the communication with the device */
379 int8_t adf4106_init(struct adf4106_dev **device,
381 
382 /* Free the resources allocated by adf4106_init(). */
383 int32_t adf4106_remove(struct adf4106_dev *dev);
384 
385 /* Update register function */
386 void adf4106_update_latch(struct adf4106_dev *dev,
387  uint32_t latch_data);
388 
389 /* Return the value of a desired latch */
390 uint32_t adf4106_read_latch(struct adf4106_dev *dev,
391  uint8_t latch_type);
392 
393 /* PLL initialization functions */
394 void adf4106_init_latch_method(struct adf4106_dev *dev);
395 void adf4106_init_cepin_method(struct adf4106_dev *dev);
397 
398 /* Set the frequency to a desired value */
399 uint64_t adf4106_set_frequency(struct adf4106_dev *dev,
400  uint64_t frequency);
401 
402 #endif // __ADF4106_H__
ADF4106_N_CP
#define ADF4106_N_CP(x)
Definition: adf4106.h:126
adf4106_settings_t::test_mode_bits
uint8_t test_mode_bits
Definition: adf4106.h:275
ADF4106_CE_HIGH
#define ADF4106_CE_HIGH
Definition: adf4106.h:60
adf4106_dev
Definition: adf4106.h:342
ADF4106_PS_OFFSET
#define ADF4106_PS_OFFSET
Definition: adf4106.h:181
adf4106_init_param::gpio_le
struct no_os_gpio_init_param gpio_le
Definition: adf4106.h:365
adf4106.h
Header file of ADF4106 driver. This driver supporting the following devices : ADF4001,...
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
adf4106_init_param::gpio_le2
struct no_os_gpio_init_param gpio_le2
Definition: adf4106.h:367
adf4106_settings_t::timer_counter_control
uint8_t timer_counter_control
Definition: adf4106.h:305
ADF4106_CS1
#define ADF4106_CS1(x)
Definition: adf4106.h:170
ADF4106_R_TMB
#define ADF4106_R_TMB(x)
Definition: adf4106.h:103
adf4106_settings_t::pfd_max
uint32_t pfd_max
Definition: adf4106.h:265
adf4106_dev::spi_desc
struct no_os_spi_desc * spi_desc
Definition: adf4106.h:344
ADF4106_CS2
#define ADF4106_CS2(x)
Definition: adf4106.h:173
adf4106_init_param::gpio_ce2
struct no_os_gpio_init_param gpio_ce2
Definition: adf4106.h:368
no_os_spi_write_and_read
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
ID_ADF4106
@ ID_ADF4106
Definition: adf4106.h:325
ADF4106_CTRL_N_COUNTER
#define ADF4106_CTRL_N_COUNTER
Definition: adf4106.h:81
ADF4106_CR
#define ADF4106_CR(x)
Definition: adf4106.h:135
no_os_spi.h
Header file of SPI Interface.
adf4106_settings_t::ref_in
uint32_t ref_in
Definition: adf4106.h:262
adf4106_set_frequency
uint64_t adf4106_set_frequency(struct adf4106_dev *dev, uint64_t frequency)
Sets the output frequency.
Definition: adf4106.c:413
adf4106_dev::gpio_ce2
struct no_os_gpio_desc * gpio_ce2
Definition: adf4106.h:349
ADF4106_CTRL_INIT_LATCH
#define ADF4106_CTRL_INIT_LATCH
Definition: adf4106.h:83
adf4106_remove
int32_t adf4106_remove(struct adf4106_dev *dev)
Free the resources allocated by adf4106_init().
Definition: adf4106.c:156
adf4106_dev::adf4106_st
struct adf4106_settings_t adf4106_st
Definition: adf4106.h:352
adf4106_init
int8_t adf4106_init(struct adf4106_dev **device, struct adf4106_init_param init_param)
Initialize SPI and Initial Values for ADF4106 Board.
Definition: adf4106.c:90
adf4106_dev::r_latch
uint32_t r_latch
Definition: adf4106.h:355
chip_info
const struct adf4106_chip_info chip_info[]
Definition: adf4106.c:56
FREQ_5_2_GHZ
#define FREQ_5_2_GHZ
Definition: adf4106.c:50
ADF4106_LE_LOW
#define ADF4106_LE_LOW
Definition: adf4106.h:51
INIT_LATCH
@ INIT_LATCH
Definition: adf4106.h:330
no_os_delay.h
Header file of Delay functions.
adf4106_dev::f_latch
uint32_t f_latch
Definition: adf4106.h:357
adf4106_tune_rcounter
uint16_t adf4106_tune_rcounter(struct adf4106_dev *dev, uint16_t r_counter)
Increases the R counter value until the ADF4106_PDF_MAX_FREQ is greater than PFD frequency.
Definition: adf4106.c:392
ADF4106_PDPOL
#define ADF4106_PDPOL(x)
Definition: adf4106.h:150
adf4106_dev::gpio_ce
struct no_os_gpio_desc * gpio_ce
Definition: adf4106.h:347
device
Definition: ad9361_util.h:69
adf4106_init
int8_t adf4106_init(struct adf4106_dev **device, struct adf4106_init_param init_param)
Initialize SPI and Initial Values for ADF4106 Board.
Definition: adf4106.c:90
adf4106_settings_t::fast_lock_mode
uint8_t fast_lock_mode
Definition: adf4106.h:301
adf4106_settings_t::phase_detector_pol
uint8_t phase_detector_pol
Definition: adf4106.h:297
ADF4106_R_ABP
#define ADF4106_R_ABP(x)
Definition: adf4106.h:94
DATA_MASK_MID8
#define DATA_MASK_MID8
Definition: adf4106.c:43
ADF4106_CTRL_MASK
#define ADF4106_CTRL_MASK
Definition: adf4106.h:78
adf4106_set_frequency
uint64_t adf4106_set_frequency(struct adf4106_dev *dev, uint64_t frequency)
Sets the output frequency.
Definition: adf4106.c:413
ADF4106_R_COUNTER_MASK
#define ADF4106_R_COUNTER_MASK
Definition: adf4106.h:88
ADF4106_CTRL_FUNCTION_LATCH
#define ADF4106_CTRL_FUNCTION_LATCH
Definition: adf4106.h:82
adf4106_init_param::adf4106_st
struct adf4106_settings_t adf4106_st
Definition: adf4106.h:372
ADF4106_TCC
#define ADF4106_TCC(x)
Definition: adf4106.h:165
adf4106_init_param::spi_init
struct no_os_spi_init_param spi_init
Definition: adf4106.h:363
ADF4106_N_COUNTER_A
#define ADF4106_N_COUNTER_A(x)
Definition: adf4106.h:117
ADF4106_R_COUNTER
#define ADF4106_R_COUNTER(x)
Definition: adf4106.h:89
adf4106_settings_t::lock_detect_precision
uint8_t lock_detect_precision
Definition: adf4106.h:279
adf4106_init_counte_reset_method
void adf4106_init_counte_reset_method(struct adf4106_dev *dev)
Counter reset method.
Definition: adf4106.c:308
adf4106_settings_t::a_n_counter
uint8_t a_n_counter
Definition: adf4106.h:283
ADF4106_CE_OUT
#define ADF4106_CE_OUT
Definition: adf4106.h:56
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
ADF4106_MUXOUT
#define ADF4106_MUXOUT(x)
Definition: adf4106.h:145
adf4106_settings_t::current_setting2
uint8_t current_setting2
Definition: adf4106.h:313
ADF4106_R_LDP
#define ADF4106_R_LDP(x)
Definition: adf4106.h:109
adf4106_dev::i_latch
uint32_t i_latch
Definition: adf4106.h:358
adf4106_settings_t::anti_backlash_width
uint8_t anti_backlash_width
Definition: adf4106.h:273
ID_ADF4002
@ ID_ADF4002
Definition: adf4106.h:324
ADF4106_PS
#define ADF4106_PS(x)
Definition: adf4106.h:183
adf4106_settings_t::power_down2
uint8_t power_down2
Definition: adf4106.h:315
adf4106_init_cepin_method
void adf4106_init_cepin_method(struct adf4106_dev *dev)
CE Pin method.
Definition: adf4106.c:266
adf4106_init_cepin_method
void adf4106_init_cepin_method(struct adf4106_dev *dev)
CE Pin method.
Definition: adf4106.c:266
adf4106_chip_info::vco_max_frequency
uint64_t vco_max_frequency
Definition: adf4106.h:336
ADF4106_CR_RESET
#define ADF4106_CR_RESET
Definition: adf4106.h:188
adf4106_chip_info
Definition: adf4106.h:335
adf4106_init_t
adf4106_init_t
Definition: adf4106.h:329
ADF4106_PRESCALE
#define ADF4106_PRESCALE(x)
Definition: adf4106.h:247
ADF4106_PS_32_33
#define ADF4106_PS_32_33
Definition: adf4106.h:243
ADF4106_PS_16_17
#define ADF4106_PS_16_17
Definition: adf4106.h:242
adf4106_init_param::this_device
enum adf4106_type_t this_device
Definition: adf4106.h:370
DATA_OFFSET_LSB8
#define DATA_OFFSET_LSB8
Definition: adf4106.c:46
INIT_COUNTER_RESET
@ INIT_COUNTER_RESET
Definition: adf4106.h:332
adf4106_update_latch
void adf4106_update_latch(struct adf4106_dev *dev, uint32_t latch_data)
Update one of the latch via the SPI interface.
Definition: adf4106.c:180
ADF4106_CTRL_R_COUNTER
#define ADF4106_CTRL_R_COUNTER
Definition: adf4106.h:80
ADF4106_CE_LOW
#define ADF4106_CE_LOW
Definition: adf4106.h:58
ADF4106_N_COUNTER_B_MASK
#define ADF4106_N_COUNTER_B_MASK
Definition: adf4106.h:120
adf4106_dev::this_device
enum adf4106_type_t this_device
Definition: adf4106.h:353
adf4106_init_param
Definition: adf4106.h:361
no_os_gpio_remove
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
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
adf4106_update_latch
void adf4106_update_latch(struct adf4106_dev *dev, uint32_t latch_data)
Update one of the latch via the SPI interface.
Definition: adf4106.c:180
adf4106_settings_t::power_down1
uint8_t power_down1
Definition: adf4106.h:293
adf4106_dev::chip_info
struct adf4106_chip_info chip_info
Definition: adf4106.h:351
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
DATA_OFFSET_MSB8
#define DATA_OFFSET_MSB8
Definition: adf4106.c:42
adf4106_settings_t::cp_gain
uint8_t cp_gain
Definition: adf4106.h:287
adf4106_settings_t::counter_reset
uint8_t counter_reset
Definition: adf4106.h:291
adf4106_settings_t::ref_counter
uint16_t ref_counter
Definition: adf4106.h:268
ADF4106_CR_NORMAL
#define ADF4106_CR_NORMAL
Definition: adf4106.h:187
adf4106_dev::gpio_le
struct no_os_gpio_desc * gpio_le
Definition: adf4106.h:346
no_os_gpio_get
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
no_os_malloc
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
ADF4106_FASTLOCK
#define ADF4106_FASTLOCK(x)
Definition: adf4106.h:160
ID_ADF4001
@ ID_ADF4001
Definition: adf4106.h:323
ADF4106_CP
#define ADF4106_CP(x)
Definition: adf4106.h:155
ADF4106_PD2
#define ADF4106_PD2(x)
Definition: adf4106.h:178
no_os_free
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
ADF4106_LE_OUT
#define ADF4106_LE_OUT
Definition: adf4106.h:49
adf4106_init_counte_reset_method
void adf4106_init_counte_reset_method(struct adf4106_dev *dev)
Counter reset method.
Definition: adf4106.c:308
adf4106_chip_info::pfd_min_frequency
uint32_t pfd_min_frequency
Definition: adf4106.h:339
DATA_MASK_LSB8
#define DATA_MASK_LSB8
Definition: adf4106.c:45
ADF4106_N_COUNTER_B
#define ADF4106_N_COUNTER_B(x)
Definition: adf4106.h:121
ADF4106_PS_8_9
#define ADF4106_PS_8_9
Definition: adf4106.h:241
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
ADF4106_PD1
#define ADF4106_PD1(x)
Definition: adf4106.h:140
adf4106_init_param::init_method
enum adf4106_init_t init_method
Definition: adf4106.h:371
adf4106_settings_t::b_n_counter
uint16_t b_n_counter
Definition: adf4106.h:285
adf4106_settings_t::cp_type
uint8_t cp_type
Definition: adf4106.h:299
adf4106_dev::n_latch
uint32_t n_latch
Definition: adf4106.h:356
adf4106_settings_t::prescaler_value
uint8_t prescaler_value
Definition: adf4106.h:317
ADF4106_N_COUNTER_A_MASK
#define ADF4106_N_COUNTER_A_MASK
Definition: adf4106.h:116
adf4106_read_latch
uint32_t adf4106_read_latch(struct adf4106_dev *dev, uint8_t latch_type)
Return the value of a desired latch.
Definition: adf4106.c:362
no_os_spi_remove
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
adf4106_init_latch_method
void adf4106_init_latch_method(struct adf4106_dev *dev)
Initialization latch method.
Definition: adf4106.c:224
no_os_gpio.h
Header file of GPIO Interface.
adf4106_read_latch
uint32_t adf4106_read_latch(struct adf4106_dev *dev, uint8_t latch_type)
Return the value of a desired latch.
Definition: adf4106.c:362
no_os_spi_init
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
adf4106_settings_t
store the value of all the latch and the input reference frequency
Definition: adf4106.h:259
ADF4106_CR_MASK
#define ADF4106_CR_MASK
Definition: adf4106.h:134
INIT_CEPIN
@ INIT_CEPIN
Definition: adf4106.h:331
adf4106_dev::gpio_le2
struct no_os_gpio_desc * gpio_le2
Definition: adf4106.h:348
FREQ_2_4_GHZ
#define FREQ_2_4_GHZ
Definition: adf4106.c:49
adf4106_init_param::gpio_ce
struct no_os_gpio_init_param gpio_ce
Definition: adf4106.h:366
DATA_MASK_MSB8
#define DATA_MASK_MSB8
Definition: adf4106.c:41
DATA_OFFSET_MID8
#define DATA_OFFSET_MID8
Definition: adf4106.c:44
adf4106_chip_info::vco_min_frequency
uint32_t vco_min_frequency
Definition: adf4106.h:338
adf4106_type_t
adf4106_type_t
Definition: adf4106.h:322
adf4106_chip_info::pfd_max_frequency
uint32_t pfd_max_frequency
Definition: adf4106.h:337
adf4106_remove
int32_t adf4106_remove(struct adf4106_dev *dev)
Free the resources allocated by adf4106_init().
Definition: adf4106.c:156
adf4106_settings_t::muxout_control
uint8_t muxout_control
Definition: adf4106.h:295
ADF4106_LE_HIGH
#define ADF4106_LE_HIGH
Definition: adf4106.h:53
adf4106_init_latch_method
void adf4106_init_latch_method(struct adf4106_dev *dev)
Initialization latch method.
Definition: adf4106.c:224
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
adf4106_settings_t::current_setting1
uint8_t current_setting1
Definition: adf4106.h:309