no-OS
adf4153.h
Go to the documentation of this file.
1 /**************************************************************************/
34 #ifndef __ADF4153_H__
35 #define __ADF4153_H__
36 
37 /*****************************************************************************/
38 /****************************** Include Files ********************************/
39 /*****************************************************************************/
40 #include <stdint.h>
41 #include "no_os_gpio.h"
42 #include "no_os_spi.h"
43 
44 /*****************************************************************************/
45 /* Device specific MACROs */
46 /*****************************************************************************/
47 /* GPIOs */
48 #define ADF4153_LE_OUT no_os_gpio_direction_output(dev->gpio_le, \
49  NO_OS_GPIO_HIGH)
50 #define ADF4153_LE_LOW no_os_gpio_set_value(dev->gpio_le, \
51  NO_OS_GPIO_LOW)
52 #define ADF4153_LE_HIGH no_os_gpio_set_value(dev->gpio_le, \
53  NO_OS_GPIO_HIGH)
54 
55 #define ADF4153_CE_OUT no_os_gpio_direction_output(dev->gpio_ce, \
56  NO_OS_GPIO_HIGH)
57 #define ADF4153_CE_LOW no_os_gpio_set_value(dev->gpio_ce, \
58  NO_OS_GPIO_LOW)
59 #define ADF4153_CE_HIGH no_os_gpio_set_value(dev->gpio_ce, \
60  NO_OS_GPIO_HIGH)
61 
62 #define ADF4153_LE2_OUT no_os_gpio_direction_output(dev->gpio_le2, \
63  NO_OS_GPIO_HIGH)
64 #define ADF4153_LE2_LOW no_os_gpio_set_value(dev->gpio_le2, \
65  NO_OS_GPIO_LOW)
66 #define ADF4153_LE2_HIGH no_os_gpio_set_value(dev->gpio_le2, \
67  NO_OS_GPIO_HIGH)
68 
69 #define ADF4153_CE2_OUT no_os_gpio_direction_output(dev->gpio_ce2, \
70  NO_OS_GPIO_HIGH)
71 #define ADF4153_CE2_LOW no_os_gpio_set_value(dev->gpio_ce2, \
72  NO_OS_GPIO_LOW)
73 #define ADF4153_CE2_HIGH no_os_gpio_set_value(dev->gpio_ce2, \
74  NO_OS_GPIO_HIGH)
75 
76 /* Control Bits */
77 #define ADF4153_CTRL_MASK 0x3
78 
79 #define ADF4153_CTRL_N_DIVIDER 0 /* N Divider Register */
80 #define ADF4153_CTRL_R_DIVIDER 1 /* R Divider Register */
81 #define ADF4153_CTRL_CONTROL 2 /* Control Register */
82 #define ADF4153_CTRL_NOISE_SPUR 3 /* Noise and Spur Reg*/
83 
84 /* N Divider Register */
85 
86 /* 12-bit fractional value */
87 #define ADF4153_R0_FRAC_OFFSET 2
88 #define ADF4153_R0_FRAC_MASK 0xFFFul
89 #define ADF4153_R0_FRAC(x) ((x) & ADF4153_R0_FRAC_MASK) \
90  << ADF4153_R0_FRAC_OFFSET
91 /* 9-bit integer value */
92 #define ADF4153_R0_INT_OFFSET 14
93 #define ADF4153_R0_INT_MASK 0x1FFul
94 #define ADF4153_R0_INT(x) ((x) & ADF4153_R0_INT_MASK) \
95  << ADF4153_R0_INT_OFFSET
96 
97 /* Fast-Lock */
98 #define ADF4153_R0_FASTLOCK_OFFSET 23
99 #define ADF4153_R0_FASTLOCK_MASK 0x1
100 #define ADF4153_R0_FASTLOCK(x) ((x) & ADF4153_R0_FASTLOCK_MASK) \
101  << ADF4153_R0_FASTLOCK_OFFSET
102 
103 /* R Divider Register */
104 
105 /* 12-bit interpolator modulus value */
106 #define ADF4153_R1_MOD_OFFSET 2
107 #define ADF4153_R1_MOD_MASK 0xFFFul
108 #define ADF4153_R1_MOD(x) ((x) & ADF4153_R1_MOD_MASK) \
109  << ADF4153_R1_MOD_OFFSET
110 /* 4-bit R Counter */
111 #define ADF4153_R1_RCOUNTER_OFFSET 14
112 #define ADF4153_R1_RCOUNTER_MASK 0xFul
113 #define ADF4153_R1_RCOUNTER(x) ((x) & ADF4153_R1_RCOUNTER_MASK) \
114  << ADF4153_R1_RCOUNTER_OFFSET
115 /* Prescale */
116 #define ADF4153_R1_PRESCALE_OFFSET 18
117 #define ADF4153_R1_PRESCALE_MASK 0x1ul
118 #define ADF4153_R1_PRESCALE(x) ((x) & ADF4153_R1_PRESCALE_MASK) \
119  << ADF4153_R1_PRESCALE_OFFSET
120 /* MUXOUT */
121 #define ADF4153_R1_MUXOUT_OFFSET 20
122 #define ADF4153_R1_MUXOUT_MASK 0x7
123 #define ADF4153_R1_MUXOUT(x) ((x) & ADF4153_R1_MUXOUT_MASK) \
124  << ADF4153_R1_MUXOUT_OFFSET
125 /* Load Control */
126 #define ADF4153_R1_LOAD_OFFSET 23
127 #define ADF4153_R1_LOAD_MASK 0x1
128 #define ADF4153_R1_LOAD(x) ((x) & ADF4153_R1_LOAD_MASK) \
129  << ADF4153_R1_LOAD_OFFSET
130 
131 /* Control Register */
132 
133 /* Counter Reset */
134 #define ADF4153_R2_COUNTER_RST_OFFSET 2
135 #define ADF4153_R2_COUNTER_RST_MASK 0x1ul
136 #define ADF4153_R2_COUNTER_RST(x) ((x) & ADF4153_R2_COUNTER_RST_MASK)\
137  << ADF4153_R2_COUNTER_RST_OFFSET
138 /* CP Three-State */
139 #define ADF4153_R2_CP_3STATE_OFFSET 3
140 #define ADF4153_R2_CP_3STATE_MASK 0x1
141 #define ADF4153_R2_CP_3STATE(x) ((x) & ADF4153_R2_CP_3STATE_MASK) \
142  << ADF4153_R2_CP_3STATE_OFFSET
143 /* Power-down */
144 #define ADF4153_R2_POWER_DOWN_OFFSET 4
145 #define ADF4153_R2_POWER_DOWN_MASK 0x1
146 #define ADF4153_R2_POWER_DOWN(x) ((x) & ADF4153_R2_POWER_DOWN_MASK) \
147  << ADF4153_R2_POWER_DOWN_OFFSET
148 /* LDP */
149 #define ADF4153_R2_LDP_OFFSET 5
150 #define ADF4153_R2_LDP_MASK 0x1
151 #define ADF4153_R2_LDP(x) ((x) & ADF4153_R2_LDP_MASK) \
152  << ADF4153_R2_LDP_OFFSET
153 /* PD Polarity */
154 #define ADF4153_R2_PD_POL_OFFSET 6
155 #define ADF4153_R2_PD_POL_MASK 0x1
156 #define ADF4153_R2_PD_POL(x) ((x) & ADF4153_R2_PD_POL_MASK) \
157  << ADF4153_R2_PD_POL_OFFSET
158 /* CP Current Settings and CP/2 */
159 #define ADF4153_R2_CP_CURRENT_OFFSET 7
160 #define ADF4153_R2_CP_CURRENT_MASK 0xF
161 #define ADF4153_R2_CP_CURRENT(x) ((x) & ADF4153_R2_CP_CURRENT_MASK) \
162  << ADF4153_R2_CP_CURRENT_OFFSET
163 /* Reference doubler */
164 #define ADF4153_R2_REF_DOUBLER_OFFSET 11
165 #define ADF4153_R2_REF_DOUBLER_MASK 0x1
166 #define ADF4153_R2_REF_DOUBLER(x) ((x) & ADF4153_R2_REF_DOUBLER_MASK)\
167  << ADF4153_R2_REF_DOUBLER_OFFSET
168 /* Resync */
169 #define ADF4153_R2_RESYNC_OFFSET 12
170 #define ADF4153_R2_RESYNC_MASK 0x7
171 #define ADF4153_R2_RESYNC(x) ((x) & ADF4153_R2_RESYNC_MASK) \
172  << ADF4153_R2_RESYNC_OFFSET
173 
174 /* Noise and spur register */
175 
176 /* Noise and spur mode */
177 #define ADF4153_R3_NOISE_SPURG_MASK 0x3C4
178 #define ADF4153_R3_NOISE_SPURG(x) ( (((x) << 0x2) & 0x7) | \
179  (((x) >> 0x1) << 0x6) ) &\
180  ADF4153_R3_NOISE_SPURG_MASK
181 
182 /* Fast-Lock definitions */
183 #define ADF4153_FASTLOCK_DISABLED 0
184 #define ADF4153_FASTLOCK_ENABLED 1
185 /* Prescale definitions */
186 #define ADF4153_PRESCALER_4_5 0
187 #define ADF4153_PRESCALER_8_9 1
188 /* Muxout definitions */
189 #define ADF4153_MUXOUT_THREESTATE 0
190 #define ADF4153_MUXOUT_DIGITAL_LOCK 1
191 #define ADF4153_MUXOUT_NDIV_OUTPUT 2
192 #define ADF4153_MUXOUT_LOGICHIGH 3
193 #define ADF4153_MUXOUT_RDIV_OUTPUT 4
194 #define ADF4153_MUXOUT_ANALOG_LOCK 5
195 #define ADF4153_MUXOUT_FASTLOCK 6
196 #define ADF4153_MUXOUT_LOGICLOW 7
197 /* Load Control definitions */
198 #define ADF4153_LOAD_NORMAL 0
199 #define ADF4153_LOAD_RESYNC 1
200 /* Counter Reset Definitions */
201 #define ADF4153_CR_DISABLED 0
202 #define ADF4153_CR_ENABLED 1
203 /* CP Three-state definitions */
204 #define ADF4153_CP_DISABLED 0
205 #define ADF4153_CP_THREE_STATE 1
206 /* Power-down definitions */
207 #define ADF4153_PD_DISABLED 0
208 #define ADF4153_PD_ENABLED 1
209 /* LDP definitions */
210 #define ADF4153_LDP_24 0
211 #define ADF4153_LDP_40 1
212 /* PD Polarity definitions */
213 #define ADF4153_PD_POL_NEGATIV 0
214 #define ADF4153_PD_POL_POSITIVE 1
215 /* CR Current Settings definitions */
216 #define ADF4153_CP_CURRENT_0_63 0
217 #define ADF4153_CP_CURRENT_1_25 1
218 #define ADF4153_CP_CURRENT_1_88 2
219 #define ADF4153_CP_CURRENT_2_50 3
220 #define ADF4153_CP_CURRENT_3_13 4
221 #define ADF4153_CP_CURRENT_3_75 5
222 #define ADF4153_CP_CURRENT_4_38 6
223 #define ADF4153_CP_CURRENT_5_00 7
224 #define ADF4153_CP2_CURRENT_0_31 8
225 #define ADF4153_CP2_CURRENT_0_63 9
226 #define ADF4153_CP2_CURRENT_0_94 10
227 #define ADF4153_CP2_CURRENT_1_25 11
228 #define ADF4153_CP2_CURRENT_1_57 12
229 #define ADF4153_CP2_CURRENT_1_88 13
230 #define ADF4153_CP2_CURRENT_2_19 14
231 #define ADF4153_CP2_CURRENT_2_50 15
232 
233 /* Reference doubler definition */
234 #define ADF4153_REF_DOUBLER_DIS 0
235 #define ADF4153_REF_DOUBLER_EN 1
236 /* Noise and Spur mode definitions */
237 #define ADF4153_LOW_SPUR_MODE 0b00000
238 #define ADF4153_LOW_NOISE_SPUR 0b11100
239 #define ADF4153_LOWEST_NOISE 0b11111
240 
241 /*****************************************************************************/
242 /************************** Types Declarations *******************************/
243 /*****************************************************************************/
244 
252 
253  /* Reference Input Frequency*/
254  uint32_t ref_in;
255  /* Channel resolution or Channel spacing */
256  uint32_t channel_spacing;
257 
258  /* N Divider */
262  uint16_t frac_value : 12;
266  uint16_t int_value : 9;
268  uint8_t fastlock : 1;
269 
270  /* R Divider */
274  uint16_t mod_value : 12;
279  uint8_t r_counter : 4;
284  uint8_t prescaler : 1;
286  uint8_t muxout : 3;
291  uint8_t load_control : 1;
292 
293  /* Control Register */
295  uint8_t counter_reset : 1;
299  uint8_t cp_three_state : 1;
301  uint8_t power_down : 1;
303  uint8_t ldp : 1;
305  uint8_t pd_polarity : 1;
309  uint8_t cp_current : 4;
313  uint8_t ref_doubler : 1;
317  uint8_t resync : 4;
318 
319  /* Noise and Spur register */
323  uint8_t noise_spur : 5;
324 
325 };
326 
327 struct adf4153_dev {
328  /* SPI */
330  /* GPIO */
335  /* Device Settings */
337  /* RF input frequency limits */
340  /* Maximum PFD frequency */
342  /* VCO out frequency limits */
345  /* maximum interpolator modulus value */
346  uint16_t adf4153_mod_max;
347 
348  /* Internal buffers for each latch */
349  uint32_t r0; /* the actual value of N Divider Register */
350  uint32_t r1; /* the actual value of R Divider Register */
351  uint32_t r2; /* the actual value of Control Register */
352  uint32_t r3; /* the actual value of Noise and Spur Reg*/
353 };
354 
356  /* SPI */
358  /* GPIO */
363  /* Device Settings */
365 };
366 
367 /*****************************************************************************/
368 /* Functions Prototypes */
369 /*****************************************************************************/
370 /* Initialize the communication with the device */
371 int8_t adf4153_init(struct adf4153_dev **device,
373 
374 /* Free the resources allocated by adf4153_init(). */
375 int32_t adf4153_remove(struct adf4153_dev *dev);
376 
377 /* Update register function */
378 void adf4153_update_latch(struct adf4153_dev *dev,
379  uint32_t latch_data);
380 
381 /* Return the value of a desired latch */
382 uint32_t adf4153_read_latch(struct adf4153_dev *dev,
383  uint8_t latch_type);
384 
385 /* Set the frequency to a desired value */
386 uint64_t adf4153_set_frequency(struct adf4153_dev *dev,
387  uint64_t frequency);
388 
389 /* Return the value of the channel spacing */
390 uint32_t adf4153_get_channel_spacing(struct adf4153_dev *dev);
391 
392 #endif // __ADF4153_H__
ADF4153_R1_MOD
#define ADF4153_R1_MOD(x)
Definition: adf4153.h:108
ADF4153_R2_RESYNC_MASK
#define ADF4153_R2_RESYNC_MASK
Definition: adf4153.h:170
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
adf4153_settings_t::mod_value
uint16_t mod_value
Definition: adf4153.h:274
adf4153_init
int8_t adf4153_init(struct adf4153_dev **device, struct adf4153_init_param init_param)
Initialize SPI and Initial Values for ADF4106 Board.
Definition: adf4153.c:67
adf4153_get_channel_spacing
uint32_t adf4153_get_channel_spacing(struct adf4153_dev *dev)
Return the value of the channel spacing.
Definition: adf4153.c:401
adf4153_read_latch
uint32_t adf4153_read_latch(struct adf4153_dev *dev, uint8_t latch_type)
Return the value of a desired latch.
Definition: adf4153.c:246
adf4153_settings_t::power_down
uint8_t power_down
Definition: adf4153.h:301
ADF4153_R1_MOD_MASK
#define ADF4153_R1_MOD_MASK
Definition: adf4153.h:107
adf4153_init_param::gpio_ce2
struct no_os_gpio_init_param gpio_ce2
Definition: adf4153.h:362
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
ADF4153_LE_HIGH
#define ADF4153_LE_HIGH
Definition: adf4153.h:52
ADF4153_R2_COUNTER_RST_MASK
#define ADF4153_R2_COUNTER_RST_MASK
Definition: adf4153.h:135
DATA_MASK_LSB8
#define DATA_MASK_LSB8
Definition: adf4153.c:48
no_os_spi.h
Header file of SPI Interface.
adf4153_settings_t::load_control
uint8_t load_control
Definition: adf4153.h:291
ADF4153_R1_RCOUNTER
#define ADF4153_R1_RCOUNTER(x)
Definition: adf4153.h:113
adf4153_update_latch
void adf4153_update_latch(struct adf4153_dev *dev, uint32_t latch_data)
Update one of the latch via the SPI interface.
Definition: adf4153.c:199
adf4153_dev::gpio_le2
struct no_os_gpio_desc * gpio_le2
Definition: adf4153.h:333
adf4153_dev::r3
uint32_t r3
Definition: adf4153.h:352
adf4153_settings_t::channel_spacing
uint32_t channel_spacing
Definition: adf4153.h:256
adf4153_dev::gpio_ce
struct no_os_gpio_desc * gpio_ce
Definition: adf4153.h:332
ADF4153_CTRL_N_DIVIDER
#define ADF4153_CTRL_N_DIVIDER
Definition: adf4153.h:79
adf4153.h
Header file of adf4153 driver.
ADF4153_CR_DISABLED
#define ADF4153_CR_DISABLED
Definition: adf4153.h:201
ADF4153_R0_FASTLOCK
#define ADF4153_R0_FASTLOCK(x)
Definition: adf4153.h:100
adf4153_settings_t::int_value
uint16_t int_value
Definition: adf4153.h:266
adf4153_dev::r0
uint32_t r0
Definition: adf4153.h:349
adf4153_settings_t::frac_value
uint16_t frac_value
Definition: adf4153.h:262
device
Definition: ad9361_util.h:69
adf4153_settings_t::noise_spur
uint8_t noise_spur
Definition: adf4153.h:323
adf4153_init_param::gpio_le2
struct no_os_gpio_init_param gpio_le2
Definition: adf4153.h:361
ADF4153_CR_ENABLED
#define ADF4153_CR_ENABLED
Definition: adf4153.h:202
ADF4153_R2_CP_CURRENT
#define ADF4153_R2_CP_CURRENT(x)
Definition: adf4153.h:161
DATA_OFFSET_MSB8
#define DATA_OFFSET_MSB8
Definition: adf4153.c:45
adf4153_dev::adf4153_pfd_max_frq
uint32_t adf4153_pfd_max_frq
Definition: adf4153.h:341
adf4153_dev::adf4153_mod_max
uint16_t adf4153_mod_max
Definition: adf4153.h:346
adf4153_settings_t
Definition: adf4153.h:251
adf4153_init
int8_t adf4153_init(struct adf4153_dev **device, struct adf4153_init_param init_param)
Initialize SPI and Initial Values for ADF4106 Board.
Definition: adf4153.c:67
ADF4153_LOAD_RESYNC
#define ADF4153_LOAD_RESYNC
Definition: adf4153.h:199
ADF4153_R1_LOAD
#define ADF4153_R1_LOAD(x)
Definition: adf4153.h:128
ADF4153_R2_PD_POL
#define ADF4153_R2_PD_POL(x)
Definition: adf4153.h:156
adf4153_dev::gpio_le
struct no_os_gpio_desc * gpio_le
Definition: adf4153.h:331
adf4153_init_param::gpio_le
struct no_os_gpio_init_param gpio_le
Definition: adf4153.h:359
adf4153_settings_t::counter_reset
uint8_t counter_reset
Definition: adf4153.h:295
adf4153_dev::adf4153_rfin_min_frq
uint32_t adf4153_rfin_min_frq
Definition: adf4153.h:338
ADF4153_R2_CP_3STATE
#define ADF4153_R2_CP_3STATE(x)
Definition: adf4153.h:141
ADF4153_R2_POWER_DOWN
#define ADF4153_R2_POWER_DOWN(x)
Definition: adf4153.h:146
ADF4153_CE_OUT
#define ADF4153_CE_OUT
Definition: adf4153.h:55
adf4153_settings_t::fastlock
uint8_t fastlock
Definition: adf4153.h:268
adf4153_update_latch
void adf4153_update_latch(struct adf4153_dev *dev, uint32_t latch_data)
Update one of the latch via the SPI interface.
Definition: adf4153.c:199
ADF4153_LE_LOW
#define ADF4153_LE_LOW
Definition: adf4153.h:50
DATA_OFFSET_MID8
#define DATA_OFFSET_MID8
Definition: adf4153.c:47
ADF4153_R0_FRAC
#define ADF4153_R0_FRAC(x)
Definition: adf4153.h:89
adf4153_dev::adf4153_vco_min_frq
uint32_t adf4153_vco_min_frq
Definition: adf4153.h:343
adf4153_settings_t::ref_doubler
uint8_t ref_doubler
Definition: adf4153.h:313
adf4153_set_frequency
uint64_t adf4153_set_frequency(struct adf4153_dev *dev, uint64_t frequency)
Sets the output frequency.
Definition: adf4153.c:301
adf4153_init_param::adf4153_st
struct adf4153_settings_t adf4153_st
Definition: adf4153.h:364
adf4153_dev::gpio_ce2
struct no_os_gpio_desc * gpio_ce2
Definition: adf4153.h:334
adf4153_settings_t::ref_in
uint32_t ref_in
Definition: adf4153.h:254
adf4153_settings_t::ldp
uint8_t ldp
Definition: adf4153.h:303
ADF4153_PRESCALER_4_5
#define ADF4153_PRESCALER_4_5
Definition: adf4153.h:186
DATA_MASK_MSB8
#define DATA_MASK_MSB8
Definition: adf4153.c:44
ADF4153_R2_REF_DOUBLER_OFFSET
#define ADF4153_R2_REF_DOUBLER_OFFSET
Definition: adf4153.h:164
ADF4153_CTRL_R_DIVIDER
#define ADF4153_CTRL_R_DIVIDER
Definition: adf4153.h:80
ADF4153_R2_COUNTER_RST
#define ADF4153_R2_COUNTER_RST(x)
Definition: adf4153.h:136
ADF4153_R1_PRESCALE_MASK
#define ADF4153_R1_PRESCALE_MASK
Definition: adf4153.h:117
adf4153_dev
Definition: adf4153.h:327
ADF4153_PRESCALER_8_9
#define ADF4153_PRESCALER_8_9
Definition: adf4153.h:187
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
ADF4153_R0_INT
#define ADF4153_R0_INT(x)
Definition: adf4153.h:94
adf4153_read_latch
uint32_t adf4153_read_latch(struct adf4153_dev *dev, uint8_t latch_type)
Return the value of a desired latch.
Definition: adf4153.c:246
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
adf4153_settings_t::cp_three_state
uint8_t cp_three_state
Definition: adf4153.h:299
ADF4153_R2_RESYNC
#define ADF4153_R2_RESYNC(x)
Definition: adf4153.h:171
adf4153_get_channel_spacing
uint32_t adf4153_get_channel_spacing(struct adf4153_dev *dev)
Return the value of the channel spacing.
Definition: adf4153.c:401
ADF4153_CTRL_NOISE_SPUR
#define ADF4153_CTRL_NOISE_SPUR
Definition: adf4153.h:82
CEIL
#define CEIL(a, b)
Definition: adf4153.c:42
ADF4153_LOAD_NORMAL
#define ADF4153_LOAD_NORMAL
Definition: adf4153.h:198
ADF4153_CE_HIGH
#define ADF4153_CE_HIGH
Definition: adf4153.h:59
adf4153_settings_t::pd_polarity
uint8_t pd_polarity
Definition: adf4153.h:305
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
ADF4153_R1_PRESCALE
#define ADF4153_R1_PRESCALE(x)
Definition: adf4153.h:118
adf4153_dev::adf4153_rfin_max_frq
uint32_t adf4153_rfin_max_frq
Definition: adf4153.h:339
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
adf4153_remove
int32_t adf4153_remove(struct adf4153_dev *dev)
Free the resources allocated by adf4153_init().
Definition: adf4153.c:175
ADF4153_R1_MUXOUT
#define ADF4153_R1_MUXOUT(x)
Definition: adf4153.h:123
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
adf4153_tune_rcounter
uint32_t adf4153_tune_rcounter(struct adf4153_dev *dev, uint16_t *r_counter)
Increases the R counter value until the ADF4106_PDF_MAX_FREQ is greater than PFD frequency.
Definition: adf4153.c:276
DATA_MASK_MID8
#define DATA_MASK_MID8
Definition: adf4153.c:46
adf4153_settings_t::cp_current
uint8_t cp_current
Definition: adf4153.h:309
ADF4153_R2_REF_DOUBLER
#define ADF4153_R2_REF_DOUBLER(x)
Definition: adf4153.h:166
adf4153_settings_t::r_counter
uint8_t r_counter
Definition: adf4153.h:279
adf4153_settings_t::resync
uint8_t resync
Definition: adf4153.h:317
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
adf4153_set_frequency
uint64_t adf4153_set_frequency(struct adf4153_dev *dev, uint64_t frequency)
Sets the output frequency.
Definition: adf4153.c:301
no_os_gpio.h
Header file of GPIO Interface.
adf4153_dev::r1
uint32_t r1
Definition: adf4153.h:350
ADF4153_R1_RCOUNTER_MASK
#define ADF4153_R1_RCOUNTER_MASK
Definition: adf4153.h:112
ADF4153_LE_OUT
#define ADF4153_LE_OUT
Definition: adf4153.h:48
adf4153_settings_t::muxout
uint8_t muxout
Definition: adf4153.h:286
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
ADF4153_R2_LDP
#define ADF4153_R2_LDP(x)
Definition: adf4153.h:151
adf4153_dev::spi_desc
struct no_os_spi_desc * spi_desc
Definition: adf4153.h:329
ADF4153_CTRL_CONTROL
#define ADF4153_CTRL_CONTROL
Definition: adf4153.h:81
adf4153_dev::adf4153_st
struct adf4153_settings_t adf4153_st
Definition: adf4153.h:336
FREQ_2_GHZ
#define FREQ_2_GHZ
Definition: adf4153.c:52
DATA_OFFSET_LSB8
#define DATA_OFFSET_LSB8
Definition: adf4153.c:49
adf4153_init_param::spi_init
struct no_os_spi_init_param spi_init
Definition: adf4153.h:357
ADF4153_R0_INT_MASK
#define ADF4153_R0_INT_MASK
Definition: adf4153.h:93
adf4153_init_param::gpio_ce
struct no_os_gpio_init_param gpio_ce
Definition: adf4153.h:360
adf4153_dev::adf4153_vco_max_frq
uint64_t adf4153_vco_max_frq
Definition: adf4153.h:344
adf4153_remove
int32_t adf4153_remove(struct adf4153_dev *dev)
Free the resources allocated by adf4153_init().
Definition: adf4153.c:175
adf4153_settings_t::prescaler
uint8_t prescaler
Definition: adf4153.h:284
adf4153_init_param
Definition: adf4153.h:355
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
adf4153_dev::r2
uint32_t r2
Definition: adf4153.h:351
ADF4153_R0_FRAC_MASK
#define ADF4153_R0_FRAC_MASK
Definition: adf4153.h:88