no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
adf5611.h File Reference

Implementation of adf5611 Driver. More...

#include <stdint.h>
#include <string.h>
#include "no_os_util.h"
#include "no_os_spi.h"
Include dependency graph for adf5611.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  adf5611_init_param
 ADF5611 Inintialization Parameters Structure. More...
 
struct  adf5611_dev
 ADF5611 Device Descriptor. More...
 
struct  reg_sequence
 ADF4382 register format structure for default values. More...
 

Macros

#define ADF5611_SOFT_REST_R_MSK   NO_OS_BIT(7)
 
#define ADF5611_LSB_FIRST_R_MSK   NO_OS_BIT(6)
 
#define ADF5611_ADDRESS_ASC_R_MSK   NO_OS_BIT(5)
 
#define ADF5611_SDO_ACTIVE_R_MSK   NO_OS_BIT(4)
 
#define ADF5611_SDO_ACTIVE_MSK   NO_OS_BIT(3)
 
#define ADF5611_ADDRESS_ASC_MSK   NO_OS_BIT(2)
 
#define ADF5611_LSB_FIRST_MSK   NO_OS_BIT(1)
 
#define ADF5611_SOFT_RESET_MSK   NO_OS_BIT(0)
 
#define ADF5611_RESET_CMD   0x81
 
#define ADF5611_SDO_ACTIVE_SPI_3WIRE   0x0
 
#define ADF5611_SDO_ACTIVE_SPI_4WIRE   0x1
 
#define ADF5611_ADDRESS_ASC_AUTO_DECR   0x0
 
#define ADF5611_ADDRESS_ASC_AUTO_INCR   0x1
 
#define ADF5611_LSB_FIRST_MSB   0x0
 
#define ADF5611_LSB_FIRST_LSB   0x1
 
#define ADF5611_SOFT_RESET_NORMAL_OP   0x0
 
#define ADF5611_SOFT_RESET_EN   0x1
 
#define ADF5611_SINGLE_INSTR_MSK   NO_OS_BIT(7)
 
#define ADF5611_MASTER_READBACK_CTRL_MSK   NO_OS_BIT(5)
 
#define ADF5611_SPI_STREAM_EN   0x0
 
#define ADF5611_SPI_STREAM_DIS   0x1
 
#define ADF5611_RB_SLAVE_REG   0x0
 
#define ADF5611_RB_MASTER_REG   0x1
 
#define ADF5611_CHIP_TYPE   0x06
 
#define ADF5611_PRODUCT_ID_LSB   0x0005
 
#define ADF5611_PRODUCT_ID_MSB   0x0005
 
#define ADF5611_SCRATCHPAD_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_VENDOR_ID_LSB   0x56
 
#define ADF5611_VENDOR_ID_MSB   0x04
 
#define ADF5611_N_INT_LSB_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_N_INT_MID_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_FRAC1WORD_LSB_MSK   NO_OS_GENMASK(7, 4)
 
#define ADF5611_N_INT_MSB_MSK   NO_OS_GENMASK(3, 0)
 
#define ADF5611_FRAC1WORD_MID_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_FRAC1WORD_MID_MSB_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_M_VCO_BIAS_MSK   NO_OS_GENMASK(7, 5)
 
#define ADF5611_FRAC1WORD_MSB_MSK   NO_OS_GENMASK(4, 0)
 
#define ADF5611_M_VCO_BAND_MSK   NO_OS_GENMASK(7, 1)
 
#define ADF5611_M_VCO_CORE_MSK   NO_OS_BIT(0)
 
#define ADF5611_VCO_0_HIGHEST_FREQUENCY   0x0
 
#define ADF5611_VCO_1_LOWEST_FREQUENCY   0x1
 
#define ADF5611_FRAC2WORD_LSB_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_FRAC2WORD_MID_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_FRAC2WORD_MSB_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_MOD2WORD_LSB_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_MOD2WORD_MID_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_MOD2WORD_MSB_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_BLEED_I_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_EN_AUTOCAL_MSK   NO_OS_BIT(7)
 
#define ADF5611_EN_BLEED_MSK   NO_OS_BIT(6)
 
#define ADF5611_EN_DCLK_MODE_MSK   NO_OS_BIT(5)
 
#define ADF5611_EN_DNCLK_MSK   NO_OS_BIT(4)
 
#define ADF5611_DNCLK_DIV1_MSK   NO_OS_GENMASK(3, 2)
 
#define ADF5611_PFD_POL_MSK   NO_OS_BIT(1)
 
#define ADF5611_BLEED_POL_MSK   NO_OS_BIT(0)
 
#define ADF5611_VCO_CALIBRATION_DIS   0x0
 
#define ADF5611_VCO_CALIBRATION_EN   0x1
 
#define ADF5611_BLEED_CURRENT_DIS   0x0
 
#define ADF5611_BLEED_CURRENT_EN   0x1
 
#define ADF5611_FREQUENCY_REDUCTION_DIS   0x0
 
#define ADF5611_FREQUENCY_REDUCTION_EN   0x1
 
#define ADF5611_DIV_NCLK_OFF   0x0
 
#define ADF5611_DIV_NCLK_ON   0x1
 
#define ADF5611_CURRENT_SINK   0x0
 
#define ADF5611_CURRENT_SOURCE   0x1
 
#define ADF5611_R_DIV_LSB_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_R_DIV_MSB_MSK   NO_OS_GENMASK(5, 0)
 
#define ADF5611_INTMODE_EN_MSK   NO_OS_BIT(6)
 
#define ADF5611_RST_RDIV_MSK   NO_OS_BIT(5)
 
#define ADF5611_EN_RCNTR_MSK   NO_OS_BIT(4)
 
#define ADF5611_CP_I_MSK   NO_OS_GENMASK(3, 0)
 
#define ADF5611_FRAC_MODE   0x0
 
#define ADF5611_INTEGER_MODE   0x1
 
#define ADF5611_RFOUT_DIV_MSK   NO_OS_GENMASK(7, 5)
 
#define ADF5611_RFOUT_PWR_MSK   NO_OS_GENMASK(4, 3)
 
#define ADF5611_DIV_PWR_MSK   NO_OS_GENMASK(1, 0)
 
#define ADF5611_PHASE_WORD_LSB_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_PHASE_WORD_MID_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_PHASE_WORD_MSB_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_LSB_P1_MSK   NO_OS_BIT(6)
 
#define ADF5611_VAR_MOD_EN_MSK   NO_OS_BIT(5)
 
#define ADF5611_DITHER1_SCALE_MSK   NO_OS_GENMASK(4, 2)
 
#define ADF5611_EN_DITHER2_MSK   NO_OS_BIT(1)
 
#define ADF5611_EN_DITHER1_MSK   NO_OS_BIT(0)
 
#define ADF5611_PD_ALL_MSK   NO_OS_BIT(7)
 
#define ADF5611_PD_RDIV_MSK   NO_OS_BIT(6)
 
#define ADF5611_PD_NDIV_MSK   NO_OS_BIT(5)
 
#define ADF5611_PD_VCO_MSK   NO_OS_BIT(4)
 
#define ADF5611_PD_LD_MSK   NO_OS_BIT(3)
 
#define ADF5611_PD_PFDCP_MSK   NO_OS_BIT(2)
 
#define ADF5611_PD_ADC_MSK   NO_OS_BIT(1)
 
#define ADF5611_PD_CALGEN_MSK   NO_OS_BIT(0)
 
#define ADF5611_PD_PFDNCLK_MSK   NO_OS_BIT(1)
 
#define ADF5611_PD_ODIV_MSK   NO_OS_BIT(0)
 
#define ADF5611_LDWIN_PW_MSK   NO_OS_GENMASK(7, 5)
 
#define ADF5611_LD_COUNT_MSK   NO_OS_GENMASK(4, 0)
 
#define ADF5611_EN_CP_IBX_MSK   NO_OS_GENMASK(7, 6)
 
#define ADF5611_EN_LOL_MSK   NO_OS_BIT(5)
 
#define ADF5611_EN_LDWIN_MSK   NO_OS_BIT(4)
 
#define ADF5611_SPARE_2A_MSK   NO_OS_BIT(3)
 
#define ADF5611_RST_LD_MSK   NO_OS_BIT(2)
 
#define ADF5611_ABPW_WD_MSK   NO_OS_BIT(1)
 
#define ADF5611_RST_CNTR_MSK   NO_OS_BIT(0)
 
#define ADF5611_MUXOUT_MSK   NO_OS_GENMASK(7, 4)
 
#define ADF5611_EN_MUXOUT_MSK   NO_OS_BIT(3)
 
#define ADF5611_EN_CPTEST_MSK   NO_OS_BIT(2)
 
#define ADF5611_CP_DOWN_MSK   NO_OS_BIT(1)
 
#define ADF5611_CP_UP_MSK   NO_OS_BIT(0)
 
#define ADF5611_CLKODIV_DB_MSK   NO_OS_BIT(7)
 
#define ADF5611_DCLK_DIV_DB_MSK   NO_OS_BIT(6)
 
#define ADF5611_SPARE_2C_MSK   NO_OS_BIT(5)
 
#define ADF5611_RST_SYS_MSK   NO_OS_BIT(4)
 
#define ADF5611_EN_ADC_CLK_MSK   NO_OS_BIT(3)
 
#define ADF5611_EN_VCAL_MSK   NO_OS_BIT(2)
 
#define ADF5611_CAL_CT_SEL_MSK   NO_OS_BIT(1)
 
#define ADF5611_EN_NOTCH_MSK   NO_OS_BIT(0)
 
#define ADF5611_VCO_FSM_TEST_MUX_MSK   NO_OS_GENMASK(7, 5)
 
#define ADF5611_SPARE_2D_MSK   NO_OS_GENMASK(4, 3)
 
#define ADF5611_O_VCO_BIAS_MSK   NO_OS_BIT(2)
 
#define ADF5611_O_VCO_BAND_MSK   NO_OS_BIT(1)
 
#define ADF5611_O_VCO_CORE_MSK   NO_OS_BIT(0)
 
#define ADF5611_CAL_COUNT_TO_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_CAL_VTUNE_TO_LSB_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_0_VCO_DB_MSK   NO_OS_BIT(7)
 
#define ADF5611_CAL_VTUNE_TO_MSB_MSK   NO_OS_GENMASK(6, 0)
 
#define ADF5611_CAL_VCO_TO_LSB_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_DEL_CTRL_DB_MSK   NO_OS_BIT(7)
 
#define ADF5611_CAL_VCO_TO_MSB_MSK   NO_OS_GENMASK(6, 0)
 
#define ADF5611_CNTR_DIV_WORD_LSB_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_SPARE_35_MSK   NO_OS_GENMASK(7, 6)
 
#define ADF5611_CMOS_OV_MSK   NO_OS_BIT(5)
 
#define ADF5611_CMOS_OV(x)
 
#define ADF5611_READ_MODE_MSK   NO_OS_BIT(4)
 
#define ADF5611_CNTR_DIV_WORD_MSB_MSK   NO_OS_GENMASK(3, 0)
 
#define ADF5611_ADC_CLK_DIV_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_EN_ADC_CNV_MSK   NO_OS_BIT(7)
 
#define ADF5611_EN_ADC_VTEST_MSK   NO_OS_BIT(6)
 
#define ADF5611_ADC_VTEST_SEL_MSK   NO_OS_BIT(5)
 
#define ADF5611_ADC_MUX_SEL_MSK   NO_OS_BIT(4)
 
#define ADF5611_ADC_F_CONV_MSK   NO_OS_BIT(3)
 
#define ADF5611_ADC_C_CONV_MSK   NO_OS_BIT(2)
 
#define ADF5611_EN_ADC_MSK   NO_OS_BIT(1)
 
#define ADF5611_ADC_CLK_TEST_SEL_MSK   NO_OS_BIT(0)
 
#define ADF5611_SPARE_38_MSK   NO_OS_BIT(7)
 
#define ADF5611_VPTAT_CALGEN_MSK   NO_OS_GENMASK(6, 0)
 
#define ADF5611_SPARE_39_MSK   NO_OS_BIT(7)
 
#define ADF5611_VCTAT_CALGEN_MSK   NO_OS_GENMASK(6, 0)
 
#define ADF5611_NVMDIN_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_SPARE_3B_MSK   NO_OS_BIT(7)
 
#define ADF5611_NVMADDR_MSK   NO_OS_GENMASK(6, 3)
 
#define ADF5611_NVMNO_OS_BIT_SEL_MSK   NO_OS_GENMASK(2, 0)
 
#define ADF5611_TRIM_LATCH_MSK   NO_OS_BIT(7)
 
#define ADF5611_NVMTEST_MSK   NO_OS_BIT(6)
 
#define ADF5611_NVMPROG_MSK   NO_OS_BIT(5)
 
#define ADF5611_NVMRD_MSK   NO_OS_BIT(4)
 
#define ADF5611_NVMSTART_MSK   NO_OS_BIT(3)
 
#define ADF5611_NVMON_MSK   NO_OS_BIT(2)
 
#define ADF5611_MARGIN_MSK   NO_OS_GENMASK(1, 0)
 
#define ADF5611_NVMDOUT_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_SCAN_MODE_CODE_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_TEMP_OFFSET_MSK   NO_OS_GENMASK(7, 0)
 
#define ADF5611_SPARE_40_MSK   NO_OS_GENMASK(7, 6)
 
#define ADF5611_TEMP_SLOPE_MSK   NO_OS_GENMASK(5, 0)
 
#define ADF5611_ADC_ST_CNV_MSK   NO_OS_BIT(0)
 
#define ADF5611_ADC_BUSY_MSK   NO_OS_BIT(2)
 
#define ADF5611_FSM_BUSY_MSK   NO_OS_BIT(1)
 
#define ADF5611_LOCKED_MSK   NO_OS_BIT(0)
 
#define ADF5611_CORE0_BIAS_TABLE_1_MSK   NO_OS_GENMASK(5, 3)
 
#define ADF5611_CORE0_BIAS_TABLE_0_MSK   NO_OS_GENMASK(2, 0)
 
#define ADF5611_CORE0_BIAS_TABLE_3_MSK   NO_OS_GENMASK(5, 3)
 
#define ADF5611_CORE0_BIAS_TABLE_2_MSK   NO_OS_GENMASK(2, 0)
 
#define ADF5611_CORE0_BIAS_TABLE_5_MSK   NO_OS_GENMASK(5, 3)
 
#define ADF5611_CORE0_BIAS_TABLE_4_MSK   NO_OS_GENMASK(2, 0)
 
#define ADF5611_CORE0_BIAS_TABLE_7_MSK   NO_OS_GENMASK(5, 3)
 
#define ADF5611_CORE0_BIAS_TABLE_6_MSK   NO_OS_GENMASK(2, 0)
 
#define ADF5611_CORE1_BIAS_TABLE_1_MSK   NO_OS_GENMASK(5, 3)
 
#define ADF5611_CORE1_BIAS_TABLE_0_MSK   NO_OS_GENMASK(2, 0)
 
#define ADF5611_CORE1_BIAS_TABLE_3_MSK   NO_OS_GENMASK(5, 3)
 
#define ADF5611_CORE1_BIAS_TABLE_2_MSK   NO_OS_GENMASK(2, 0)
 
#define ADF5611_CORE1_BIAS_TABLE_5_MSK   NO_OS_GENMASK(5, 3)
 
#define ADF5611_CORE1_BIAS_TABLE_4_MSK   NO_OS_GENMASK(2, 0)
 
#define ADF5611_CORE1_BIAS_TABLE_7_MSK   NO_OS_GENMASK(5, 3)
 
#define ADF5611_CORE1_BIAS_TABLE_6_MSK   NO_OS_GENMASK(2, 0)
 
#define ADF5611_SPI_4W_CFG(x)
 
#define ADF5611_SPI_SCRATCHPAD_TEST   0x2A
 
#define ADF5611_SPI_WRITE_CMD   0x0
 
#define ADF5611_SPI_READ_CMD   0x8000
 
#define ADF5611_SPI_DUMMY_DATA   0x00
 
#define ADF5611_BUFF_SIZE_BYTES   3
 
#define ADF5611_VCO_FREQ_MIN   3650000000U
 
#define ADF5611_VCO_FREQ_MAX   7300000000U
 
#define ADF5611_MOD1WORD   0x2000000U
 
#define ADF5611_MOD2WORD_MAX   0xFFFFFFU
 
#define ADF5611_CHANNEL_SPACING_MAX   78125U
 
#define ADF5611_CPI_VAL_MAX   15
 
#define ADF5611_REF_DIV_MAX   16383
 
#define ADF5611_BLEED_TIME_CONST   4
 
#define ADF5611_BLEED_CURRENT   3125
 
#define ADF5611_RFOUT_PWR_MAX   3
 
#define ADF5611_RFOUTDIV_PWR_MAX   ADF5611_RFOUT_PWR_MAX
 
#define ADF5611_RFOUTDIV_DIV_MAX   7U
 
#define ADF5611_POR_DELAY_US   200
 
#define ADF5611_LKD_DELAY_US   500
 
#define ADF5611_RFOUT_MAX   14600000000U
 
#define ADF5611_RFOUT_MIN   7300000000U
 
#define ADF5611_REF_CLK_MAX   300000000000U
 
#define ADF5611_REF_CLK_MIN   50000000U
 
#define ADF5611_OUTPUT_DOUBLER   0x2U
 
#define ADF5611_PFD_FREQ_MAX   100000000U
 
#define ADF5612_RFOUT_MAX   8500000000U
 
#define ADF5612_RFOUT_MIN   7300000000U
 
#define ADF5612_VCO_FREQ_MAX   7300000000U
 
#define KHZ   1000
 
#define MHZ   KHZ * KHZ
 
#define GHZ   KHZ * KHZ * KHZ
 
#define s_TO_ns   1000000000U
 
#define ns_TO_ps   1000
 
#define uA_TO_A   1000000
 

Enumerations

enum  adf5611_device_id {
  ID_ADF5611 ,
  ID_ADF5612
}
 Supported device ids. More...
 

Functions

int adf5611_spi_write (struct adf5611_dev *dev, uint16_t reg_addr, uint8_t data)
 Writes data to ADF5611 over SPI.
 
int adf5611_spi_read (struct adf5611_dev *dev, uint16_t reg_addr, uint8_t *data)
 Reads data from ADF5611 over SPI.
 
int adf5611_spi_update_bits (struct adf5611_dev *dev, uint16_t reg_addr, uint8_t mask, uint8_t data)
 Updates the values of the ADF5611 register.
 
int adf5611_set_ref_clk (struct adf5611_dev *dev, uint64_t val)
 Set the desired reference frequency and reset everything over to maximum supported value of 300MHz to the max. value and everything under the minimum supported value of 50MHz to the min. value.
 
int adf5611_get_ref_clk (struct adf5611_dev *dev, uint64_t *val)
 Gets the user proposed reference frequency.
 
int adf5611_set_ref_div (struct adf5611_dev *dev, int32_t div)
 Set the reference divider value and reset everything over to maximum supported value of 60 to the max value.
 
int adf5611_get_ref_div (struct adf5611_dev *dev, int32_t *div)
 Gets the value the reference divider.
 
int adf5611_set_cp_i (struct adf5611_dev *dev, int32_t reg_val)
 Set the charge pump value which will be written to the register. The value will be between 0 and 15 on 8 bits. For more information please consult the Datasheet.
 
int adf5611_get_cp_i (struct adf5611_dev *dev, int32_t *reg_val)
 Gets the charge pump value from the register. The value will be between 0 and 15 on 8 bits. For more information please consult the Datasheet.
 
int adf5611_set_output_power (struct adf5611_dev *dev, int8_t pwr)
 Set the rfoutput power register value and reset everything over to maximum supported value of 3 to the max. value.
 
int adf5611_get_output_power (struct adf5611_dev *dev, int8_t *pwr)
 Gets the rfoutput power register value.
 
int adf5611_set_rfoutdiv_power (struct adf5611_dev *dev, int32_t pwr)
 Set the rfoutdiv power register value and reset everything over to maximum supported value of 3 to the max. value.
 
int adf5611_get_rfoutdiv_power (struct adf5611_dev *dev, int32_t *pwr)
 Gets the rfoutdiv power register value.
 
int adf5611_set_rfoutdiv_divider (struct adf5611_dev *dev, uint8_t div_val)
 Set the rfoutdiv frequency divider register value and reset everything over to maximum supported value of 128 to the max. value.
 
int adf5611_get_rfoutdiv_divider (struct adf5611_dev *dev, int8_t *div)
 Gets the rfoutdiv divider register value.
 
int adf5611_set_en_rfoutdiv (struct adf5611_dev *dev, bool en)
 Sets the rfoutdiv output block to enable or disable. 1 means the block is powered down else block is powered up.
 
int adf5611_get_en_rfoutdiv (struct adf5611_dev *dev, bool *en)
 Gets the value of rfoutdiv output block if enable or disable.
 
int adf5611_set_rfout (struct adf5611_dev *dev, uint64_t val)
 Set the desired output frequency and reset everything over to maximum supported value of 14.6GHz to the max. value and everything under the minimum supported value of 7.3GHz to the min. value.
 
int adf5611_get_rfout (struct adf5611_dev *dev, uint64_t *val)
 Gets the user proposed output frequency.
 
int adf5611_set_freq (struct adf5611_dev *dev)
 Set the output frequency.
 
int adf5611_init (struct adf5611_dev **device, struct adf5611_init_param *init_param)
 Initialize the ADF5611.
 
int adf5611_remove (struct adf5611_dev *dev)
 Free resources allocated for ADF5611.
 

Detailed Description

Implementation of adf5611 Driver.

Author
Jude Osemene (jude..nosp@m.osem.nosp@m.ene@a.nosp@m.nalo.nosp@m.g.com)

Copyright 2024(c) Analog Devices, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ ADF5611_0_VCO_DB_MSK

#define ADF5611_0_VCO_DB_MSK   NO_OS_BIT(7)

◆ ADF5611_ABPW_WD_MSK

#define ADF5611_ABPW_WD_MSK   NO_OS_BIT(1)

◆ ADF5611_ADC_BUSY_MSK

#define ADF5611_ADC_BUSY_MSK   NO_OS_BIT(2)

◆ ADF5611_ADC_C_CONV_MSK

#define ADF5611_ADC_C_CONV_MSK   NO_OS_BIT(2)

◆ ADF5611_ADC_CLK_DIV_MSK

#define ADF5611_ADC_CLK_DIV_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_ADC_CLK_TEST_SEL_MSK

#define ADF5611_ADC_CLK_TEST_SEL_MSK   NO_OS_BIT(0)

◆ ADF5611_ADC_F_CONV_MSK

#define ADF5611_ADC_F_CONV_MSK   NO_OS_BIT(3)

◆ ADF5611_ADC_MUX_SEL_MSK

#define ADF5611_ADC_MUX_SEL_MSK   NO_OS_BIT(4)

◆ ADF5611_ADC_ST_CNV_MSK

#define ADF5611_ADC_ST_CNV_MSK   NO_OS_BIT(0)

◆ ADF5611_ADC_VTEST_SEL_MSK

#define ADF5611_ADC_VTEST_SEL_MSK   NO_OS_BIT(5)

◆ ADF5611_ADDRESS_ASC_AUTO_DECR

#define ADF5611_ADDRESS_ASC_AUTO_DECR   0x0

◆ ADF5611_ADDRESS_ASC_AUTO_INCR

#define ADF5611_ADDRESS_ASC_AUTO_INCR   0x1

◆ ADF5611_ADDRESS_ASC_MSK

#define ADF5611_ADDRESS_ASC_MSK   NO_OS_BIT(2)

◆ ADF5611_ADDRESS_ASC_R_MSK

#define ADF5611_ADDRESS_ASC_R_MSK   NO_OS_BIT(5)

◆ ADF5611_BLEED_CURRENT

#define ADF5611_BLEED_CURRENT   3125

◆ ADF5611_BLEED_CURRENT_DIS

#define ADF5611_BLEED_CURRENT_DIS   0x0

◆ ADF5611_BLEED_CURRENT_EN

#define ADF5611_BLEED_CURRENT_EN   0x1

◆ ADF5611_BLEED_I_MSK

#define ADF5611_BLEED_I_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_BLEED_POL_MSK

#define ADF5611_BLEED_POL_MSK   NO_OS_BIT(0)

◆ ADF5611_BLEED_TIME_CONST

#define ADF5611_BLEED_TIME_CONST   4

◆ ADF5611_BUFF_SIZE_BYTES

#define ADF5611_BUFF_SIZE_BYTES   3

◆ ADF5611_CAL_COUNT_TO_MSK

#define ADF5611_CAL_COUNT_TO_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_CAL_CT_SEL_MSK

#define ADF5611_CAL_CT_SEL_MSK   NO_OS_BIT(1)

◆ ADF5611_CAL_VCO_TO_LSB_MSK

#define ADF5611_CAL_VCO_TO_LSB_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_CAL_VCO_TO_MSB_MSK

#define ADF5611_CAL_VCO_TO_MSB_MSK   NO_OS_GENMASK(6, 0)

◆ ADF5611_CAL_VTUNE_TO_LSB_MSK

#define ADF5611_CAL_VTUNE_TO_LSB_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_CAL_VTUNE_TO_MSB_MSK

#define ADF5611_CAL_VTUNE_TO_MSB_MSK   NO_OS_GENMASK(6, 0)

◆ ADF5611_CHANNEL_SPACING_MAX

#define ADF5611_CHANNEL_SPACING_MAX   78125U

◆ ADF5611_CHIP_TYPE

#define ADF5611_CHIP_TYPE   0x06

◆ ADF5611_CLKODIV_DB_MSK

#define ADF5611_CLKODIV_DB_MSK   NO_OS_BIT(7)

◆ ADF5611_CMOS_OV

#define ADF5611_CMOS_OV ( x)
Value:
#define ADF5611_CMOS_OV_MSK
Definition adf5611.h:277
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)

◆ ADF5611_CMOS_OV_MSK

#define ADF5611_CMOS_OV_MSK   NO_OS_BIT(5)

◆ ADF5611_CNTR_DIV_WORD_LSB_MSK

#define ADF5611_CNTR_DIV_WORD_LSB_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_CNTR_DIV_WORD_MSB_MSK

#define ADF5611_CNTR_DIV_WORD_MSB_MSK   NO_OS_GENMASK(3, 0)

◆ ADF5611_CORE0_BIAS_TABLE_0_MSK

#define ADF5611_CORE0_BIAS_TABLE_0_MSK   NO_OS_GENMASK(2, 0)

◆ ADF5611_CORE0_BIAS_TABLE_1_MSK

#define ADF5611_CORE0_BIAS_TABLE_1_MSK   NO_OS_GENMASK(5, 3)

◆ ADF5611_CORE0_BIAS_TABLE_2_MSK

#define ADF5611_CORE0_BIAS_TABLE_2_MSK   NO_OS_GENMASK(2, 0)

◆ ADF5611_CORE0_BIAS_TABLE_3_MSK

#define ADF5611_CORE0_BIAS_TABLE_3_MSK   NO_OS_GENMASK(5, 3)

◆ ADF5611_CORE0_BIAS_TABLE_4_MSK

#define ADF5611_CORE0_BIAS_TABLE_4_MSK   NO_OS_GENMASK(2, 0)

◆ ADF5611_CORE0_BIAS_TABLE_5_MSK

#define ADF5611_CORE0_BIAS_TABLE_5_MSK   NO_OS_GENMASK(5, 3)

◆ ADF5611_CORE0_BIAS_TABLE_6_MSK

#define ADF5611_CORE0_BIAS_TABLE_6_MSK   NO_OS_GENMASK(2, 0)

◆ ADF5611_CORE0_BIAS_TABLE_7_MSK

#define ADF5611_CORE0_BIAS_TABLE_7_MSK   NO_OS_GENMASK(5, 3)

◆ ADF5611_CORE1_BIAS_TABLE_0_MSK

#define ADF5611_CORE1_BIAS_TABLE_0_MSK   NO_OS_GENMASK(2, 0)

◆ ADF5611_CORE1_BIAS_TABLE_1_MSK

#define ADF5611_CORE1_BIAS_TABLE_1_MSK   NO_OS_GENMASK(5, 3)

◆ ADF5611_CORE1_BIAS_TABLE_2_MSK

#define ADF5611_CORE1_BIAS_TABLE_2_MSK   NO_OS_GENMASK(2, 0)

◆ ADF5611_CORE1_BIAS_TABLE_3_MSK

#define ADF5611_CORE1_BIAS_TABLE_3_MSK   NO_OS_GENMASK(5, 3)

◆ ADF5611_CORE1_BIAS_TABLE_4_MSK

#define ADF5611_CORE1_BIAS_TABLE_4_MSK   NO_OS_GENMASK(2, 0)

◆ ADF5611_CORE1_BIAS_TABLE_5_MSK

#define ADF5611_CORE1_BIAS_TABLE_5_MSK   NO_OS_GENMASK(5, 3)

◆ ADF5611_CORE1_BIAS_TABLE_6_MSK

#define ADF5611_CORE1_BIAS_TABLE_6_MSK   NO_OS_GENMASK(2, 0)

◆ ADF5611_CORE1_BIAS_TABLE_7_MSK

#define ADF5611_CORE1_BIAS_TABLE_7_MSK   NO_OS_GENMASK(5, 3)

◆ ADF5611_CP_DOWN_MSK

#define ADF5611_CP_DOWN_MSK   NO_OS_BIT(1)

◆ ADF5611_CP_I_MSK

#define ADF5611_CP_I_MSK   NO_OS_GENMASK(3, 0)

◆ ADF5611_CP_UP_MSK

#define ADF5611_CP_UP_MSK   NO_OS_BIT(0)

◆ ADF5611_CPI_VAL_MAX

#define ADF5611_CPI_VAL_MAX   15

◆ ADF5611_CURRENT_SINK

#define ADF5611_CURRENT_SINK   0x0

◆ ADF5611_CURRENT_SOURCE

#define ADF5611_CURRENT_SOURCE   0x1

◆ ADF5611_DCLK_DIV_DB_MSK

#define ADF5611_DCLK_DIV_DB_MSK   NO_OS_BIT(6)

◆ ADF5611_DEL_CTRL_DB_MSK

#define ADF5611_DEL_CTRL_DB_MSK   NO_OS_BIT(7)

◆ ADF5611_DITHER1_SCALE_MSK

#define ADF5611_DITHER1_SCALE_MSK   NO_OS_GENMASK(4, 2)

◆ ADF5611_DIV_NCLK_OFF

#define ADF5611_DIV_NCLK_OFF   0x0

◆ ADF5611_DIV_NCLK_ON

#define ADF5611_DIV_NCLK_ON   0x1

◆ ADF5611_DIV_PWR_MSK

#define ADF5611_DIV_PWR_MSK   NO_OS_GENMASK(1, 0)

◆ ADF5611_DNCLK_DIV1_MSK

#define ADF5611_DNCLK_DIV1_MSK   NO_OS_GENMASK(3, 2)

◆ ADF5611_EN_ADC_CLK_MSK

#define ADF5611_EN_ADC_CLK_MSK   NO_OS_BIT(3)

◆ ADF5611_EN_ADC_CNV_MSK

#define ADF5611_EN_ADC_CNV_MSK   NO_OS_BIT(7)

◆ ADF5611_EN_ADC_MSK

#define ADF5611_EN_ADC_MSK   NO_OS_BIT(1)

◆ ADF5611_EN_ADC_VTEST_MSK

#define ADF5611_EN_ADC_VTEST_MSK   NO_OS_BIT(6)

◆ ADF5611_EN_AUTOCAL_MSK

#define ADF5611_EN_AUTOCAL_MSK   NO_OS_BIT(7)

◆ ADF5611_EN_BLEED_MSK

#define ADF5611_EN_BLEED_MSK   NO_OS_BIT(6)

◆ ADF5611_EN_CP_IBX_MSK

#define ADF5611_EN_CP_IBX_MSK   NO_OS_GENMASK(7, 6)

◆ ADF5611_EN_CPTEST_MSK

#define ADF5611_EN_CPTEST_MSK   NO_OS_BIT(2)

◆ ADF5611_EN_DCLK_MODE_MSK

#define ADF5611_EN_DCLK_MODE_MSK   NO_OS_BIT(5)

◆ ADF5611_EN_DITHER1_MSK

#define ADF5611_EN_DITHER1_MSK   NO_OS_BIT(0)

◆ ADF5611_EN_DITHER2_MSK

#define ADF5611_EN_DITHER2_MSK   NO_OS_BIT(1)

◆ ADF5611_EN_DNCLK_MSK

#define ADF5611_EN_DNCLK_MSK   NO_OS_BIT(4)

◆ ADF5611_EN_LDWIN_MSK

#define ADF5611_EN_LDWIN_MSK   NO_OS_BIT(4)

◆ ADF5611_EN_LOL_MSK

#define ADF5611_EN_LOL_MSK   NO_OS_BIT(5)

◆ ADF5611_EN_MUXOUT_MSK

#define ADF5611_EN_MUXOUT_MSK   NO_OS_BIT(3)

◆ ADF5611_EN_NOTCH_MSK

#define ADF5611_EN_NOTCH_MSK   NO_OS_BIT(0)

◆ ADF5611_EN_RCNTR_MSK

#define ADF5611_EN_RCNTR_MSK   NO_OS_BIT(4)

◆ ADF5611_EN_VCAL_MSK

#define ADF5611_EN_VCAL_MSK   NO_OS_BIT(2)

◆ ADF5611_FRAC1WORD_LSB_MSK

#define ADF5611_FRAC1WORD_LSB_MSK   NO_OS_GENMASK(7, 4)

◆ ADF5611_FRAC1WORD_MID_MSB_MSK

#define ADF5611_FRAC1WORD_MID_MSB_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_FRAC1WORD_MID_MSK

#define ADF5611_FRAC1WORD_MID_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_FRAC1WORD_MSB_MSK

#define ADF5611_FRAC1WORD_MSB_MSK   NO_OS_GENMASK(4, 0)

◆ ADF5611_FRAC2WORD_LSB_MSK

#define ADF5611_FRAC2WORD_LSB_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_FRAC2WORD_MID_MSK

#define ADF5611_FRAC2WORD_MID_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_FRAC2WORD_MSB_MSK

#define ADF5611_FRAC2WORD_MSB_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_FRAC_MODE

#define ADF5611_FRAC_MODE   0x0

◆ ADF5611_FREQUENCY_REDUCTION_DIS

#define ADF5611_FREQUENCY_REDUCTION_DIS   0x0

◆ ADF5611_FREQUENCY_REDUCTION_EN

#define ADF5611_FREQUENCY_REDUCTION_EN   0x1

◆ ADF5611_FSM_BUSY_MSK

#define ADF5611_FSM_BUSY_MSK   NO_OS_BIT(1)

◆ ADF5611_INTEGER_MODE

#define ADF5611_INTEGER_MODE   0x1

◆ ADF5611_INTMODE_EN_MSK

#define ADF5611_INTMODE_EN_MSK   NO_OS_BIT(6)

◆ ADF5611_LD_COUNT_MSK

#define ADF5611_LD_COUNT_MSK   NO_OS_GENMASK(4, 0)

◆ ADF5611_LDWIN_PW_MSK

#define ADF5611_LDWIN_PW_MSK   NO_OS_GENMASK(7, 5)

◆ ADF5611_LKD_DELAY_US

#define ADF5611_LKD_DELAY_US   500

◆ ADF5611_LOCKED_MSK

#define ADF5611_LOCKED_MSK   NO_OS_BIT(0)

◆ ADF5611_LSB_FIRST_LSB

#define ADF5611_LSB_FIRST_LSB   0x1

◆ ADF5611_LSB_FIRST_MSB

#define ADF5611_LSB_FIRST_MSB   0x0

◆ ADF5611_LSB_FIRST_MSK

#define ADF5611_LSB_FIRST_MSK   NO_OS_BIT(1)

◆ ADF5611_LSB_FIRST_R_MSK

#define ADF5611_LSB_FIRST_R_MSK   NO_OS_BIT(6)

◆ ADF5611_LSB_P1_MSK

#define ADF5611_LSB_P1_MSK   NO_OS_BIT(6)

◆ ADF5611_M_VCO_BAND_MSK

#define ADF5611_M_VCO_BAND_MSK   NO_OS_GENMASK(7, 1)

◆ ADF5611_M_VCO_BIAS_MSK

#define ADF5611_M_VCO_BIAS_MSK   NO_OS_GENMASK(7, 5)

◆ ADF5611_M_VCO_CORE_MSK

#define ADF5611_M_VCO_CORE_MSK   NO_OS_BIT(0)

◆ ADF5611_MARGIN_MSK

#define ADF5611_MARGIN_MSK   NO_OS_GENMASK(1, 0)

◆ ADF5611_MASTER_READBACK_CTRL_MSK

#define ADF5611_MASTER_READBACK_CTRL_MSK   NO_OS_BIT(5)

◆ ADF5611_MOD1WORD

#define ADF5611_MOD1WORD   0x2000000U

◆ ADF5611_MOD2WORD_LSB_MSK

#define ADF5611_MOD2WORD_LSB_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_MOD2WORD_MAX

#define ADF5611_MOD2WORD_MAX   0xFFFFFFU

◆ ADF5611_MOD2WORD_MID_MSK

#define ADF5611_MOD2WORD_MID_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_MOD2WORD_MSB_MSK

#define ADF5611_MOD2WORD_MSB_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_MUXOUT_MSK

#define ADF5611_MUXOUT_MSK   NO_OS_GENMASK(7, 4)

◆ ADF5611_N_INT_LSB_MSK

#define ADF5611_N_INT_LSB_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_N_INT_MID_MSK

#define ADF5611_N_INT_MID_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_N_INT_MSB_MSK

#define ADF5611_N_INT_MSB_MSK   NO_OS_GENMASK(3, 0)

◆ ADF5611_NVMADDR_MSK

#define ADF5611_NVMADDR_MSK   NO_OS_GENMASK(6, 3)

◆ ADF5611_NVMDIN_MSK

#define ADF5611_NVMDIN_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_NVMDOUT_MSK

#define ADF5611_NVMDOUT_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_NVMNO_OS_BIT_SEL_MSK

#define ADF5611_NVMNO_OS_BIT_SEL_MSK   NO_OS_GENMASK(2, 0)

◆ ADF5611_NVMON_MSK

#define ADF5611_NVMON_MSK   NO_OS_BIT(2)

◆ ADF5611_NVMPROG_MSK

#define ADF5611_NVMPROG_MSK   NO_OS_BIT(5)

◆ ADF5611_NVMRD_MSK

#define ADF5611_NVMRD_MSK   NO_OS_BIT(4)

◆ ADF5611_NVMSTART_MSK

#define ADF5611_NVMSTART_MSK   NO_OS_BIT(3)

◆ ADF5611_NVMTEST_MSK

#define ADF5611_NVMTEST_MSK   NO_OS_BIT(6)

◆ ADF5611_O_VCO_BAND_MSK

#define ADF5611_O_VCO_BAND_MSK   NO_OS_BIT(1)

◆ ADF5611_O_VCO_BIAS_MSK

#define ADF5611_O_VCO_BIAS_MSK   NO_OS_BIT(2)

◆ ADF5611_O_VCO_CORE_MSK

#define ADF5611_O_VCO_CORE_MSK   NO_OS_BIT(0)

◆ ADF5611_OUTPUT_DOUBLER

#define ADF5611_OUTPUT_DOUBLER   0x2U

◆ ADF5611_PD_ADC_MSK

#define ADF5611_PD_ADC_MSK   NO_OS_BIT(1)

◆ ADF5611_PD_ALL_MSK

#define ADF5611_PD_ALL_MSK   NO_OS_BIT(7)

◆ ADF5611_PD_CALGEN_MSK

#define ADF5611_PD_CALGEN_MSK   NO_OS_BIT(0)

◆ ADF5611_PD_LD_MSK

#define ADF5611_PD_LD_MSK   NO_OS_BIT(3)

◆ ADF5611_PD_NDIV_MSK

#define ADF5611_PD_NDIV_MSK   NO_OS_BIT(5)

◆ ADF5611_PD_ODIV_MSK

#define ADF5611_PD_ODIV_MSK   NO_OS_BIT(0)

◆ ADF5611_PD_PFDCP_MSK

#define ADF5611_PD_PFDCP_MSK   NO_OS_BIT(2)

◆ ADF5611_PD_PFDNCLK_MSK

#define ADF5611_PD_PFDNCLK_MSK   NO_OS_BIT(1)

◆ ADF5611_PD_RDIV_MSK

#define ADF5611_PD_RDIV_MSK   NO_OS_BIT(6)

◆ ADF5611_PD_VCO_MSK

#define ADF5611_PD_VCO_MSK   NO_OS_BIT(4)

◆ ADF5611_PFD_FREQ_MAX

#define ADF5611_PFD_FREQ_MAX   100000000U

◆ ADF5611_PFD_POL_MSK

#define ADF5611_PFD_POL_MSK   NO_OS_BIT(1)

◆ ADF5611_PHASE_WORD_LSB_MSK

#define ADF5611_PHASE_WORD_LSB_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_PHASE_WORD_MID_MSK

#define ADF5611_PHASE_WORD_MID_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_PHASE_WORD_MSB_MSK

#define ADF5611_PHASE_WORD_MSB_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_POR_DELAY_US

#define ADF5611_POR_DELAY_US   200

◆ ADF5611_PRODUCT_ID_LSB

#define ADF5611_PRODUCT_ID_LSB   0x0005

◆ ADF5611_PRODUCT_ID_MSB

#define ADF5611_PRODUCT_ID_MSB   0x0005

◆ ADF5611_R_DIV_LSB_MSK

#define ADF5611_R_DIV_LSB_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_R_DIV_MSB_MSK

#define ADF5611_R_DIV_MSB_MSK   NO_OS_GENMASK(5, 0)

◆ ADF5611_RB_MASTER_REG

#define ADF5611_RB_MASTER_REG   0x1

◆ ADF5611_RB_SLAVE_REG

#define ADF5611_RB_SLAVE_REG   0x0

◆ ADF5611_READ_MODE_MSK

#define ADF5611_READ_MODE_MSK   NO_OS_BIT(4)

◆ ADF5611_REF_CLK_MAX

#define ADF5611_REF_CLK_MAX   300000000000U

◆ ADF5611_REF_CLK_MIN

#define ADF5611_REF_CLK_MIN   50000000U

◆ ADF5611_REF_DIV_MAX

#define ADF5611_REF_DIV_MAX   16383

◆ ADF5611_RESET_CMD

#define ADF5611_RESET_CMD   0x81

◆ ADF5611_RFOUT_DIV_MSK

#define ADF5611_RFOUT_DIV_MSK   NO_OS_GENMASK(7, 5)

◆ ADF5611_RFOUT_MAX

#define ADF5611_RFOUT_MAX   14600000000U

◆ ADF5611_RFOUT_MIN

#define ADF5611_RFOUT_MIN   7300000000U

◆ ADF5611_RFOUT_PWR_MAX

#define ADF5611_RFOUT_PWR_MAX   3

◆ ADF5611_RFOUT_PWR_MSK

#define ADF5611_RFOUT_PWR_MSK   NO_OS_GENMASK(4, 3)

◆ ADF5611_RFOUTDIV_DIV_MAX

#define ADF5611_RFOUTDIV_DIV_MAX   7U

◆ ADF5611_RFOUTDIV_PWR_MAX

#define ADF5611_RFOUTDIV_PWR_MAX   ADF5611_RFOUT_PWR_MAX

◆ ADF5611_RST_CNTR_MSK

#define ADF5611_RST_CNTR_MSK   NO_OS_BIT(0)

◆ ADF5611_RST_LD_MSK

#define ADF5611_RST_LD_MSK   NO_OS_BIT(2)

◆ ADF5611_RST_RDIV_MSK

#define ADF5611_RST_RDIV_MSK   NO_OS_BIT(5)

◆ ADF5611_RST_SYS_MSK

#define ADF5611_RST_SYS_MSK   NO_OS_BIT(4)

◆ ADF5611_SCAN_MODE_CODE_MSK

#define ADF5611_SCAN_MODE_CODE_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_SCRATCHPAD_MSK

#define ADF5611_SCRATCHPAD_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_SDO_ACTIVE_MSK

#define ADF5611_SDO_ACTIVE_MSK   NO_OS_BIT(3)

◆ ADF5611_SDO_ACTIVE_R_MSK

#define ADF5611_SDO_ACTIVE_R_MSK   NO_OS_BIT(4)

◆ ADF5611_SDO_ACTIVE_SPI_3WIRE

#define ADF5611_SDO_ACTIVE_SPI_3WIRE   0x0

◆ ADF5611_SDO_ACTIVE_SPI_4WIRE

#define ADF5611_SDO_ACTIVE_SPI_4WIRE   0x1

◆ ADF5611_SINGLE_INSTR_MSK

#define ADF5611_SINGLE_INSTR_MSK   NO_OS_BIT(7)

◆ ADF5611_SOFT_RESET_EN

#define ADF5611_SOFT_RESET_EN   0x1

◆ ADF5611_SOFT_RESET_MSK

#define ADF5611_SOFT_RESET_MSK   NO_OS_BIT(0)

◆ ADF5611_SOFT_RESET_NORMAL_OP

#define ADF5611_SOFT_RESET_NORMAL_OP   0x0

◆ ADF5611_SOFT_REST_R_MSK

#define ADF5611_SOFT_REST_R_MSK   NO_OS_BIT(7)

◆ ADF5611_SPARE_2A_MSK

#define ADF5611_SPARE_2A_MSK   NO_OS_BIT(3)

◆ ADF5611_SPARE_2C_MSK

#define ADF5611_SPARE_2C_MSK   NO_OS_BIT(5)

◆ ADF5611_SPARE_2D_MSK

#define ADF5611_SPARE_2D_MSK   NO_OS_GENMASK(4, 3)

◆ ADF5611_SPARE_35_MSK

#define ADF5611_SPARE_35_MSK   NO_OS_GENMASK(7, 6)

◆ ADF5611_SPARE_38_MSK

#define ADF5611_SPARE_38_MSK   NO_OS_BIT(7)

◆ ADF5611_SPARE_39_MSK

#define ADF5611_SPARE_39_MSK   NO_OS_BIT(7)

◆ ADF5611_SPARE_3B_MSK

#define ADF5611_SPARE_3B_MSK   NO_OS_BIT(7)

◆ ADF5611_SPARE_40_MSK

#define ADF5611_SPARE_40_MSK   NO_OS_GENMASK(7, 6)

◆ ADF5611_SPI_4W_CFG

#define ADF5611_SPI_4W_CFG ( x)
Value:
no_os_field_prep(ADF5611_SDO_ACTIVE_R_MSK, x))
#define ADF5611_SDO_ACTIVE_R_MSK
Definition adf5611.h:42
#define ADF5611_SDO_ACTIVE_MSK
Definition adf5611.h:43

◆ ADF5611_SPI_DUMMY_DATA

#define ADF5611_SPI_DUMMY_DATA   0x00

◆ ADF5611_SPI_READ_CMD

#define ADF5611_SPI_READ_CMD   0x8000

◆ ADF5611_SPI_SCRATCHPAD_TEST

#define ADF5611_SPI_SCRATCHPAD_TEST   0x2A

◆ ADF5611_SPI_STREAM_DIS

#define ADF5611_SPI_STREAM_DIS   0x1

◆ ADF5611_SPI_STREAM_EN

#define ADF5611_SPI_STREAM_EN   0x0

◆ ADF5611_SPI_WRITE_CMD

#define ADF5611_SPI_WRITE_CMD   0x0

◆ ADF5611_TEMP_OFFSET_MSK

#define ADF5611_TEMP_OFFSET_MSK   NO_OS_GENMASK(7, 0)

◆ ADF5611_TEMP_SLOPE_MSK

#define ADF5611_TEMP_SLOPE_MSK   NO_OS_GENMASK(5, 0)

◆ ADF5611_TRIM_LATCH_MSK

#define ADF5611_TRIM_LATCH_MSK   NO_OS_BIT(7)

◆ ADF5611_VAR_MOD_EN_MSK

#define ADF5611_VAR_MOD_EN_MSK   NO_OS_BIT(5)

◆ ADF5611_VCO_0_HIGHEST_FREQUENCY

#define ADF5611_VCO_0_HIGHEST_FREQUENCY   0x0

◆ ADF5611_VCO_1_LOWEST_FREQUENCY

#define ADF5611_VCO_1_LOWEST_FREQUENCY   0x1

◆ ADF5611_VCO_CALIBRATION_DIS

#define ADF5611_VCO_CALIBRATION_DIS   0x0

◆ ADF5611_VCO_CALIBRATION_EN

#define ADF5611_VCO_CALIBRATION_EN   0x1

◆ ADF5611_VCO_FREQ_MAX

#define ADF5611_VCO_FREQ_MAX   7300000000U

◆ ADF5611_VCO_FREQ_MIN

#define ADF5611_VCO_FREQ_MIN   3650000000U

◆ ADF5611_VCO_FSM_TEST_MUX_MSK

#define ADF5611_VCO_FSM_TEST_MUX_MSK   NO_OS_GENMASK(7, 5)

◆ ADF5611_VCTAT_CALGEN_MSK

#define ADF5611_VCTAT_CALGEN_MSK   NO_OS_GENMASK(6, 0)

◆ ADF5611_VENDOR_ID_LSB

#define ADF5611_VENDOR_ID_LSB   0x56

◆ ADF5611_VENDOR_ID_MSB

#define ADF5611_VENDOR_ID_MSB   0x04

◆ ADF5611_VPTAT_CALGEN_MSK

#define ADF5611_VPTAT_CALGEN_MSK   NO_OS_GENMASK(6, 0)

◆ ADF5612_RFOUT_MAX

#define ADF5612_RFOUT_MAX   8500000000U

◆ ADF5612_RFOUT_MIN

#define ADF5612_RFOUT_MIN   7300000000U

◆ ADF5612_VCO_FREQ_MAX

#define ADF5612_VCO_FREQ_MAX   7300000000U

◆ GHZ

#define GHZ   KHZ * KHZ * KHZ

◆ KHZ

#define KHZ   1000

◆ MHZ

#define MHZ   KHZ * KHZ

◆ ns_TO_ps

#define ns_TO_ps   1000

◆ s_TO_ns

#define s_TO_ns   1000000000U

◆ uA_TO_A

#define uA_TO_A   1000000

Enumeration Type Documentation

◆ adf5611_device_id

Supported device ids.

Enumerator
ID_ADF5611 
ID_ADF5612 

Function Documentation

◆ adf5611_get_cp_i()

int adf5611_get_cp_i ( struct adf5611_dev * dev,
int32_t * reg_val )

Gets the charge pump value from the register. The value will be between 0 and 15 on 8 bits. For more information please consult the Datasheet.

ADF5611 Get the charge pump current attribute

Parameters
dev- The device structure.
reg_val- The charge pump register value.
Returns
0 in case of success or negative error code.

◆ adf5611_get_en_rfoutdiv()

int adf5611_get_en_rfoutdiv ( struct adf5611_dev * dev,
bool * en )

Gets the value of rfoutdiv output block if enable or disable.

ADF5611 Get the enable/disable rfoutdiv

Parameters
dev- The device structure.
en- The status of rfoutdiv output block.
Returns
0 in case of success, negative error code otherwise.

◆ adf5611_get_output_power()

int adf5611_get_output_power ( struct adf5611_dev * dev,
int8_t * pwr )

Gets the rfoutput power register value.

ADF5611 Get the output power attribute

Parameters
dev- The device structure.
pwr- The output power register value.
Returns
0 in case of success or negative error code.

◆ adf5611_get_ref_clk()

int adf5611_get_ref_clk ( struct adf5611_dev * dev,
uint64_t * val )

Gets the user proposed reference frequency.

ADF5611 Get reference frequency attribute

Parameters
dev- The device structure.
val- The reference frequency in Hz.
Returns
0 in case of success or negative error code.

◆ adf5611_get_ref_div()

int adf5611_get_ref_div ( struct adf5611_dev * dev,
int32_t * div )

Gets the value the reference divider.

ADF5611 Get reference divider attribute

Parameters
dev- The device structure.
div- The reference divider value.
Returns
0 in case of success or negative error code.

◆ adf5611_get_rfout()

int adf5611_get_rfout ( struct adf5611_dev * dev,
uint64_t * val )

Gets the user proposed output frequency.

ADF5611 Get output frequency attribute

Parameters
dev- The device structure.
val- The output frequency in Hz.
Returns
0 in case of success or negative error code.

◆ adf5611_get_rfoutdiv_divider()

int adf5611_get_rfoutdiv_divider ( struct adf5611_dev * dev,
int8_t * div )

Gets the rfoutdiv divider register value.

ADF5611 Get the rfoutdiv divider attribute

Parameters
dev- The device structure.
div- The rfoutdiv divider register value.
Returns
0 in case of success or negative error code.

◆ adf5611_get_rfoutdiv_power()

int adf5611_get_rfoutdiv_power ( struct adf5611_dev * dev,
int32_t * pwr )

Gets the rfoutdiv power register value.

ADF5611 Get the rfoutdiv power attribute

Parameters
dev- The device structure.
pwr- The rfoutdiv power register value.
Returns
0 in case of success or negative error code.

◆ adf5611_init()

int adf5611_init ( struct adf5611_dev ** dev,
struct adf5611_init_param * init_param )

Initialize the ADF5611.

ADF5611 Initialization

Parameters
dev- The device structure.
init_param- The structure containing the device initial parameters.
Returns
0 in case of success or negative error code
Here is the caller graph for this function:

◆ adf5611_remove()

int adf5611_remove ( struct adf5611_dev * dev)

Free resources allocated for ADF5611.

ADF5611 Remove

Parameters
dev- The device structure.
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ adf5611_set_cp_i()

int adf5611_set_cp_i ( struct adf5611_dev * dev,
int32_t reg_val )

Set the charge pump value which will be written to the register. The value will be between 0 and 15 on 8 bits. For more information please consult the Datasheet.

ADF5611 Set the charge pump current attribute

Parameters
dev- The device structure.
reg_val- The desired charge pump register value.
Returns
set frequency function in case of success or negative error code.

◆ adf5611_set_en_rfoutdiv()

int adf5611_set_en_rfoutdiv ( struct adf5611_dev * dev,
bool en )

Sets the rfoutdiv output block to enable or disable. 1 means the block is powered down else block is powered up.

ADF5611 Set the enable/disable rfoutdiv

Parameters
dev- The device structure.
en- Enable/Disable rfoutdiv output.
Returns
Result of the writing procedure, error code otherwise.

◆ adf5611_set_freq()

int adf5611_set_freq ( struct adf5611_dev * dev)

Set the output frequency.

ADF5611 Sets frequency

Parameters
dev- The device structure.
Returns
0 in case of success, negative error code otherwise.
Here is the caller graph for this function:

◆ adf5611_set_output_power()

int adf5611_set_output_power ( struct adf5611_dev * dev,
int8_t pwr )

Set the rfoutput power register value and reset everything over to maximum supported value of 3 to the max. value.

ADF5611 Set the output power attribute

Parameters
dev- The device structure.
pwr- The output power register value.
Returns
Result of the writing procedure, error code otherwise.

◆ adf5611_set_ref_clk()

int adf5611_set_ref_clk ( struct adf5611_dev * dev,
uint64_t val )

Set the desired reference frequency and reset everything over to maximum supported value of 300MHz to the max. value and everything under the minimum supported value of 50MHz to the min. value.

ADF5611 Set reference frequency attribute

Parameters
dev- The device structure.
val- The desired reference frequency in Hz.
Returns
0 in case of success or negative error code.

◆ adf5611_set_ref_div()

int adf5611_set_ref_div ( struct adf5611_dev * dev,
int32_t div )

Set the reference divider value and reset everything over to maximum supported value of 60 to the max value.

ADF5611 Set reference divider attribute

Parameters
dev- The device structure.
div- The reference divider value.
Returns
set frequency function in case of success or negative error code.

◆ adf5611_set_rfout()

int adf5611_set_rfout ( struct adf5611_dev * dev,
uint64_t val )

Set the desired output frequency and reset everything over to maximum supported value of 14.6GHz to the max. value and everything under the minimum supported value of 7.3GHz to the min. value.

ADF5611 Set output frequency attribute

Parameters
dev- The device structure.
val- The desired output frequency in Hz.
Returns
set frequency function in case of success or negative error code.
Here is the caller graph for this function:

◆ adf5611_set_rfoutdiv_divider()

int adf5611_set_rfoutdiv_divider ( struct adf5611_dev * dev,
uint8_t div_val )

Set the rfoutdiv frequency divider register value and reset everything over to maximum supported value of 128 to the max. value.

ADF5611 Set the rfoutdiv divider attribute

Parameters
dev- The device structure.
div_val- The rfoutdiv divider register value.
Returns
Result of the writing procedure, error code otherwise.

◆ adf5611_set_rfoutdiv_power()

int adf5611_set_rfoutdiv_power ( struct adf5611_dev * dev,
int32_t pwr )

Set the rfoutdiv power register value and reset everything over to maximum supported value of 3 to the max. value.

ADF5611 Set the rfoutdiv power attribute

Parameters
dev- The device structure.
pwr- The rfoutdiv power register value.
Returns
Result of the writing procedure, error code otherwise.

◆ adf5611_spi_read()

int adf5611_spi_read ( struct adf5611_dev * dev,
uint16_t reg_addr,
uint8_t * data )

Reads data from ADF5611 over SPI.

ADF5611 SPI Read

Parameters
dev- The device structure.
reg_addr- The register address.
data- Data read from the device.
Returns
0 in case of success or negative error code otherwise.
Here is the caller graph for this function:

◆ adf5611_spi_update_bits()

int adf5611_spi_update_bits ( struct adf5611_dev * dev,
uint16_t reg_addr,
uint8_t mask,
uint8_t data )

Updates the values of the ADF5611 register.

ADF5611 updates a bit in the register space over SPI

Parameters
dev- The device structure.
reg_addr- The register address.
mask- Bits to be updated.
data- Update value for the mask.
Returns
0 in case of success or negative error code otherwise.
Here is the caller graph for this function:

◆ adf5611_spi_write()

int adf5611_spi_write ( struct adf5611_dev * dev,
uint16_t reg_addr,
uint8_t data )

Writes data to ADF5611 over SPI.

ADF5611 SPI write

Parameters
dev- The device structure.
reg_addr- The register address.
data- Data value to write.
Returns
0 in case of success or negative error code otherwise.
Here is the caller graph for this function: