no-OS
Loading...
Searching...
No Matches
ad9517.h File Reference

Header file of AD9517 Driver. More...

#include <stdint.h>
#include "no_os_spi.h"
Include dependency graph for ad9517.h:

Classes

struct  ad9517_platform_data
 
struct  ad9517_lvpecl_channel_spec
 
struct  ad9517_lvds_cmos_channel_spec
 
struct  ad9517_state
 
struct  ad9517_dev
 
struct  ad9517_init_param
 

Macros

#define AD9517_READ   (1 << 15)
 
#define AD9517_WRITE   (0 << 15)
 
#define AD9517_CNT(x)
 
#define AD9517_ADDR(x)
 
#define AD9517_T1B   (1 << 16)
 
#define AD9517_T2B   (2 << 16)
 
#define AD9517_T3B   (3 << 16)
 
#define AD9517_TRANSF_LEN(x)
 
#define AD9517_REG_SERIAL_PORT_CONFIG   (AD9517_T1B | 0x000)
 
#define AD9517_REG_PART_ID   (AD9517_T1B | 0x003)
 
#define AD9517_REG_READBACK_CTRL   (AD9517_T1B | 0x004)
 
#define AD9517_REG_PFD_CHARGE_PUMP   (AD9517_T1B | 0x010)
 
#define AD9517_REG_R_COUNTER   (AD9517_T2B | 0x012)
 
#define AD9517_REG_A_COUNTER   (AD9517_T1B | 0x013)
 
#define AD9517_REG_B_COUNTER   (AD9517_T2B | 0x015)
 
#define AD9517_REG_PLL_CTRL_1   (AD9517_T1B | 0x016)
 
#define AD9517_REG_PLL_CTRL_2   (AD9517_T1B | 0x017)
 
#define AD9517_REG_PLL_CTRL_3   (AD9517_T1B | 0x018)
 
#define AD9517_REG_PLL_CTRL_4   (AD9517_T1B | 0x019)
 
#define AD9517_REG_PLL_CTRL_5   (AD9517_T1B | 0x01A)
 
#define AD9517_REG_PLL_CTRL_6   (AD9517_T1B | 0x01B)
 
#define AD9517_REG_PLL_CTRL_7   (AD9517_T1B | 0x01C)
 
#define AD9517_REG_PLL_CTRL_8   (AD9517_T1B | 0x01D)
 
#define AD9517_REG_PLL_READBACK   (AD9517_T1B | 0x01F)
 
#define AD9517_REG_OUT4_DELAY_BYPASS   (AD9517_T1B | 0x0A0)
 
#define AD9517_REG_OUT4_DELAY_FULL_SCALE   (AD9517_T1B | 0x0A1)
 
#define AD9517_REG_OUT4_DELAY_FRACTION   (AD9517_T1B | 0x0A2)
 
#define AD9517_REG_OUT5_DELAY_BYPASS   (AD9517_T1B | 0x0A3)
 
#define AD9517_REG_OUT5_DELAY_FULL_SCALE   (AD9517_T1B | 0x0A4)
 
#define AD9517_REG_OUT5_DELAY_FRACTION   (AD9517_T1B | 0x0A5)
 
#define AD9517_REG_OUT6_DELAY_BYPASS   (AD9517_T1B | 0x0A6)
 
#define AD9517_REG_OUT6_DELAY_FULL_SCALE   (AD9517_T1B | 0x0A7)
 
#define AD9517_REG_OUT6_DELAY_FRACTION   (AD9517_T1B | 0x0A8)
 
#define AD9517_REG_OUT7_DELAY_BYPASS   (AD9517_T1B | 0x0A9)
 
#define AD9517_REG_OUT7_DELAY_FULL_SCALE   (AD9517_T1B | 0x0AA)
 
#define AD9517_REG_OUT7_DELAY_FRACTION   (AD9517_T1B | 0x0AB)
 
#define AD9517_REG_LVPECL_OUT0   (AD9517_T1B | 0x0F0)
 
#define AD9517_REG_LVPECL_OUT1   (AD9517_T1B | 0x0F1)
 
#define AD9517_REG_LVPECL_OUT2   (AD9517_T1B | 0x0F4)
 
#define AD9517_REG_LVPECL_OUT3   (AD9517_T1B | 0x0F5)
 
#define AD9517_REG_LVDS_CMOS_OUT4   (AD9517_T1B | 0x140)
 
#define AD9517_REG_LVDS_CMOS_OUT5   (AD9517_T1B | 0x141)
 
#define AD9517_REG_LVDS_CMOS_OUT6   (AD9517_T1B | 0x142)
 
#define AD9517_REG_LVDS_CMOS_OUT7   (AD9517_T1B | 0x143)
 
#define AD9517_REG_DIVIDER_0_0   (AD9517_T1B | 0x190)
 
#define AD9517_REG_DIVIDER_0_1   (AD9517_T1B | 0x191)
 
#define AD9517_REG_DIVIDER_0_2   (AD9517_T1B | 0x192)
 
#define AD9517_REG_DIVIDER_1_0   (AD9517_T1B | 0x196)
 
#define AD9517_REG_DIVIDER_1_1   (AD9517_T1B | 0x197)
 
#define AD9517_REG_DIVIDER_1_2   (AD9517_T1B | 0x198)
 
#define AD9517_REG_LVDS_CMOS_DIVIDER_2_0   (AD9517_T1B | 0x199)
 
#define AD9517_REG_LVDS_CMOS_DIVIDER_2_1   (AD9517_T1B | 0x19A)
 
#define AD9517_REG_LVDS_CMOS_DIVIDER_2_2   (AD9517_T1B | 0x19B)
 
#define AD9517_REG_LVDS_CMOS_DIVIDER_2_3   (AD9517_T1B | 0x19C)
 
#define AD9517_REG_LVDS_CMOS_DIVIDER_2_4   (AD9517_T1B | 0x19D)
 
#define AD9517_REG_LVDS_CMOS_DIVIDER_3_0   (AD9517_T1B | 0x19E)
 
#define AD9517_REG_LVDS_CMOS_DIVIDER_3_1   (AD9517_T1B | 0x19F)
 
#define AD9517_REG_LVDS_CMOS_DIVIDER_3_2   (AD9517_T1B | 0x1A0)
 
#define AD9517_REG_LVDS_CMOS_DIVIDER_3_3   (AD9517_T1B | 0x1A1)
 
#define AD9517_REG_LVDS_CMOS_DIVIDER_3_4   (AD9517_T1B | 0x1A2)
 
#define AD9517_REG_VCO_DIVIDER   (AD9517_T1B | 0x1E0)
 
#define AD9517_REG_INPUT_CLKS   (AD9517_T1B | 0x1E1)
 
#define AD9517_REG_POWER_DOWN_SYNC   (AD9517_T1B | 0x230)
 
#define AD9517_REG_UPDATE_ALL_REGS   (AD9517_T1B | 0x232)
 
#define AD9517_SDO_ACTIVE   ((1 << 7) | (1 << 0))
 
#define AD9517_LSB_FIRST   ((1 << 6) | (1 << 1))
 
#define AD9517_SOFT_RESET   ((1 << 5) | (1 << 2))
 
#define AD9517_LONG_INSTRUCTION   ((1 << 4) | (1 << 3))
 
#define AD9517_REG_BANK_SELECTION   (1 << 0)
 
#define AD9517_PFD_POLARITY   (1 << 7)
 
#define AD9517_CP_CURRENT(x)
 
#define AD9517_CP_MODE(x)
 
#define AD9517_PLL_POWER_DOWN(x)
 
#define AD9517_R_COUNTER(x)
 
#define AD9517_A_COUNTER(x)
 
#define AD9517_B_COUNTER(x)
 
#define AD9517_CP_VCP_DIV2   (1 << 7)
 
#define AD9517_RESET_R_COUNTER   (1 << 6)
 
#define AD9517_RESET_A_B_COUNTERS   (1 << 5)
 
#define AD9517_RESET_ALL_COUNTERS   (1 << 4)
 
#define AD9517_B_COUNTER_BYPASS   (1 << 3)
 
#define AD9517_PRESCALER_P(x)
 
#define AD9517_STATUS_PIN_CTRL(x)
 
#define AD9517_ANTIBACKLASH_PULSE_WIDTH(x)
 
#define AD9517_LOCK_DETECT_COUNTER(x)
 
#define AD9517_DIGITAL_LOCK_DETECT_WINDOW   (1 << 4)
 
#define AD9517_DIS_DIGITAL_LOCK_DETECT   (1 << 3)
 
#define AD9517_VCO_CAL_DIVIDER(x)
 
#define AD9517_VCO_CAL_NOW   (1 << 0)
 
#define AD9517_SYNC_PIN_RESET(x)
 
#define AD9517_R_PATH_DELAY(x)
 
#define AD9517_N_PATH_DELAY(x)
 
#define AD9517_REF_FREQ_MONITOR_THRESHOLD   (1 << 6)
 
#define AD9517_LD_PIN_CTRL(x)
 
#define AD9517_VCO_FREQ_MONITOR   (1 << 7)
 
#define AD9517_REF2_FREQ_MONITOR   (1 << 6)
 
#define AD9517_REF1_FREQ_MONITOR   (1 << 5)
 
#define AD9517_REFMON_PIN_CTRL(x)
 
#define AD9517_DIS_SWITCHOVER_DEGLITCH   (1 << 7)
 
#define AD9517_SELECT_REF2   (1 << 6)
 
#define AD9517_USE_REF_SEL_PIN   (1 << 5)
 
#define AD9517_REF2_POWER_ON   (1 << 2)
 
#define AD9517_REF1_POWER_ON   (1 << 1)
 
#define AD9517_DIFF_REF   (1 << 0)
 
#define AD9517_PLL_STATUS_REG_DIS   (1 << 4)
 
#define AD9517_LD_PIN_COMPARATOR_EN   (1 << 3)
 
#define AD9517_HOLDOVER_EN   ((1 << 2) | (1 << 0))
 
#define AD9517_EXT_HOLDOVER_CTRL   (1 << 1)
 
#define AD9517_VCO_CAL_FINISHED   (1 << 6)
 
#define AD9517_HOLDOVER_ACTIVE   (1 << 5)
 
#define AD9517_REF2_SELECTED   (1 << 4)
 
#define AD9517_VCO_FREQ_GREATER   (1 << 3)
 
#define AD9517_REF2_FREQ_GREATER   (1 << 2)
 
#define AD9517_REF1_FREQ_GREATER   (1 << 1)
 
#define AD9517_DIGITAL_LOCK_DETECT   (1 << 0)
 
#define AD9517_OUT_DELAY_BYPASS   (1 << 0)
 
#define AD9517_OUT_RAMP_CAPACITORS(x)
 
#define AD9517_OUT_RAMP_CURRENT(x)
 
#define AD9517_OUT_DELAY_FRACTION(x)
 
#define AD9517_OUT_LVPECL_INVERT   (1 << 4)
 
#define AD9517_OUT_LVPECL_DIFF_VOLTAGE(x)
 
#define AD9517_OUT_LVPECL_POWER_DOWN(x)
 
#define AD9517_OUT_LVDS_CMOS_INVERT(x)
 
#define AD9517_OUT_CMOS_B   (1 << 4)
 
#define AD9517_OUT_LVDS_CMOS   (1 << 3)
 
#define AD9517_OUT_LVDS_OUTPUT_CURRENT(x)
 
#define AD9517_OUT_LVDS_CMOS_POWER_DOWN   (1 << 0)
 
#define AD9517_DIVIDER_LOW_CYCLES(x)
 
#define AD9517_DIVIDER_HIGH_CYCLES(x)
 
#define AD9517_DIVIDER_BYPASS   (1 << 7)
 
#define AD9517_LVPECL_DIVIDER_NOSYNC   (1 << 6)
 
#define AD9517_LVPECL_DIVIDER_FORCE_HIGH   (1 << 5)
 
#define AD9517_DIVIDER_START_HIGH   (1 << 4)
 
#define AD9517_DIVIDER_PHASE_OFFSET(x)
 
#define AD9517_DIVIDER_DIRECT_TO_OUTPUT   (1 << 1)
 
#define AD9517_DIVIDER_DCCOFF   (1 << 0)
 
#define AD9517_LOW_CYCLES_DIVIDER_1(x)
 
#define AD9517_HIGH_CYCLES_DIVIDER_1(x)
 
#define AD9517_PHASE_OFFSET_DIVIDER_2(x)
 
#define AD9517_PHASE_OFFSET_DIVIDER_1(x)
 
#define AD9517_LOW_CYCLES_DIVIDER_2(x)
 
#define AD9517_HIGH_CYCLES_DIVIDER_2(x)
 
#define AD9517_BYPASS_DIVIDER_2   (1 << 5)
 
#define AD9517_BYPASS_DIVIDER_1   (1 << 4)
 
#define AD9517_LVDS_CMOS_DIVIDER_NOSYNC   (1 << 3)
 
#define AD9517_LVDS_CMOS_DIVIDER_FORCE_HIGH   (1 << 2)
 
#define AD9517_START_HIGH_DIVIDER_2   (1 << 1)
 
#define AD9517_START_HIGH_DIVIDER_1   (1 << 0)
 
#define AD9517_DIVIDER_DCCOFF   (1 << 0)
 
#define AD9517_VCO_DIVIDER(x)
 
#define AD9517_POWER_DOWN_CLK_INPUT_SECTION   (1 << 4)
 
#define AD9517_POWER_DOWN_VCO_CLK_INTERFACE   (1 << 3)
 
#define AD9517_POWER_DOWN_VCO_CLK   (1 << 2)
 
#define AD9517_SEL_VCO_CLK   (1 << 1)
 
#define AD9517_BYPASS_VCO_DIVIDER   (1 << 0)
 
#define AD9517_POWER_DOWN_SYNC   (1 << 2)
 
#define AD9517_POWER_DOWN_DIST_REF   (1 << 1)
 
#define AD9517_SOFT_SYNC   (1 << 0)
 
#define AD9517_UPDATE_ALL_REGS   (1 << 0)
 
#define AD9517_1_MIN_VCO_FREQ   2300000000
 
#define AD9517_1_MAX_VCO_FREQ   2650000000
 
#define AD9517_2_MIN_VCO_FREQ   2050000000
 
#define AD9517_2_MAX_VCO_FREQ   2330000000
 
#define AD9517_3_MIN_VCO_FREQ   1750000000
 
#define AD9517_3_MAX_VCO_FREQ   2250000000
 
#define AD9517_4_MIN_VCO_FREQ   1450000000
 
#define AD9517_4_MAX_VCO_FREQ   1800000000
 
#define AD9517_MAX_PFD_FREQ   100000000
 
#define AD9517_MAX_PRESCLAER_OUT_FREQ   300000000
 

Enumerations

enum  ad9517_type {
  AD9517_1 = 0x51 ,
  AD9517_2 = 0x91 ,
  AD9517_3 = 0x53 ,
  AD9517_4 = 0xd3
}
 
enum  out_diff_voltage_options {
  LVPECL_400mV ,
  LVPECL_600mV ,
  LVPECL_780mV ,
  LVPECL_960mV
}
 
enum  logic_level_options {
  LVDS ,
  CMOS
}
 
enum  out_lvds_current_options {
  LVDS_1_75mA ,
  LVDS_3_5mA ,
  LVDS_5_25mA ,
  LVDS_7mA
}
 

Functions

int32_t ad9517_setup (struct ad9517_dev **device, struct ad9517_init_param init_param)
 Initializes the AD9517.
 
int32_t ad9517_remove (struct ad9517_dev *dev)
 Free the resources allocated by ad9517_setup().
 
int32_t ad9517_write (struct ad9517_dev *dev, uint32_t reg_addr, uint16_t reg_val)
 Writes data into a register.
 
int32_t ad9517_read (struct ad9517_dev *dev, uint32_t reg_addr, uint32_t *reg_value)
 Reads data from a register.
 
int32_t ad9517_update (struct ad9517_dev *dev)
 Transfers the contents of the buffer registers into the active registers.
 
int64_t ad9517_vco_frequency (struct ad9517_dev *dev, int64_t frequency)
 Sets the VCO frequency.
 
int64_t ad9517_frequency (struct ad9517_dev *dev, int32_t channel, int64_t frequency)
 Sets the frequency on the specified channel.
 
int32_t ad9517_phase (struct ad9517_dev *dev, int32_t channel, int32_t phase)
 Sets the phase on the specified channel.
 
int32_t ad9517_power_mode (struct ad9517_dev *dev, int32_t channel, int32_t mode)
 Sets the power mode of the specified channel.
 

Detailed Description

Header file of AD9517 Driver.

Author
DBogdan (drago.nosp@m.s.bo.nosp@m.gdan@.nosp@m.anal.nosp@m.og.co.nosp@m.m)

Copyright 2012(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Macro Definition Documentation

◆ AD9517_1_MAX_VCO_FREQ

#define AD9517_1_MAX_VCO_FREQ   2650000000

◆ AD9517_1_MIN_VCO_FREQ

#define AD9517_1_MIN_VCO_FREQ   2300000000

◆ AD9517_2_MAX_VCO_FREQ

#define AD9517_2_MAX_VCO_FREQ   2330000000

◆ AD9517_2_MIN_VCO_FREQ

#define AD9517_2_MIN_VCO_FREQ   2050000000

◆ AD9517_3_MAX_VCO_FREQ

#define AD9517_3_MAX_VCO_FREQ   2250000000

◆ AD9517_3_MIN_VCO_FREQ

#define AD9517_3_MIN_VCO_FREQ   1750000000

◆ AD9517_4_MAX_VCO_FREQ

#define AD9517_4_MAX_VCO_FREQ   1800000000

◆ AD9517_4_MIN_VCO_FREQ

#define AD9517_4_MIN_VCO_FREQ   1450000000

◆ AD9517_A_COUNTER

#define AD9517_A_COUNTER ( x)
Value:
((x & 0x3F) << 0)

◆ AD9517_ADDR

#define AD9517_ADDR ( x)
Value:
(x & 0x3FF)

◆ AD9517_ANTIBACKLASH_PULSE_WIDTH

#define AD9517_ANTIBACKLASH_PULSE_WIDTH ( x)
Value:
((x & 0x3) << 0)

◆ AD9517_B_COUNTER

#define AD9517_B_COUNTER ( x)
Value:
((x & 0x1FFF) << 0)

◆ AD9517_B_COUNTER_BYPASS

#define AD9517_B_COUNTER_BYPASS   (1 << 3)

◆ AD9517_BYPASS_DIVIDER_1

#define AD9517_BYPASS_DIVIDER_1   (1 << 4)

◆ AD9517_BYPASS_DIVIDER_2

#define AD9517_BYPASS_DIVIDER_2   (1 << 5)

◆ AD9517_BYPASS_VCO_DIVIDER

#define AD9517_BYPASS_VCO_DIVIDER   (1 << 0)

◆ AD9517_CNT

#define AD9517_CNT ( x)
Value:
((x - 1) << 13)

◆ AD9517_CP_CURRENT

#define AD9517_CP_CURRENT ( x)
Value:
((x & 0x7) << 4)

◆ AD9517_CP_MODE

#define AD9517_CP_MODE ( x)
Value:
((x & 0x3) << 2)

◆ AD9517_CP_VCP_DIV2

#define AD9517_CP_VCP_DIV2   (1 << 7)

◆ AD9517_DIFF_REF

#define AD9517_DIFF_REF   (1 << 0)

◆ AD9517_DIGITAL_LOCK_DETECT

#define AD9517_DIGITAL_LOCK_DETECT   (1 << 0)

◆ AD9517_DIGITAL_LOCK_DETECT_WINDOW

#define AD9517_DIGITAL_LOCK_DETECT_WINDOW   (1 << 4)

◆ AD9517_DIS_DIGITAL_LOCK_DETECT

#define AD9517_DIS_DIGITAL_LOCK_DETECT   (1 << 3)

◆ AD9517_DIS_SWITCHOVER_DEGLITCH

#define AD9517_DIS_SWITCHOVER_DEGLITCH   (1 << 7)

◆ AD9517_DIVIDER_BYPASS

#define AD9517_DIVIDER_BYPASS   (1 << 7)

◆ AD9517_DIVIDER_DCCOFF [1/2]

#define AD9517_DIVIDER_DCCOFF   (1 << 0)

◆ AD9517_DIVIDER_DCCOFF [2/2]

#define AD9517_DIVIDER_DCCOFF   (1 << 0)

◆ AD9517_DIVIDER_DIRECT_TO_OUTPUT

#define AD9517_DIVIDER_DIRECT_TO_OUTPUT   (1 << 1)

◆ AD9517_DIVIDER_HIGH_CYCLES

#define AD9517_DIVIDER_HIGH_CYCLES ( x)
Value:
((x & 0xF) << 0)

◆ AD9517_DIVIDER_LOW_CYCLES

#define AD9517_DIVIDER_LOW_CYCLES ( x)
Value:
((x & 0xF) << 4)

◆ AD9517_DIVIDER_PHASE_OFFSET

#define AD9517_DIVIDER_PHASE_OFFSET ( x)
Value:
((x & 0xF) << 0)

◆ AD9517_DIVIDER_START_HIGH

#define AD9517_DIVIDER_START_HIGH   (1 << 4)

◆ AD9517_EXT_HOLDOVER_CTRL

#define AD9517_EXT_HOLDOVER_CTRL   (1 << 1)

◆ AD9517_HIGH_CYCLES_DIVIDER_1

#define AD9517_HIGH_CYCLES_DIVIDER_1 ( x)
Value:
((x & 0xF) << 0)

◆ AD9517_HIGH_CYCLES_DIVIDER_2

#define AD9517_HIGH_CYCLES_DIVIDER_2 ( x)
Value:
((x & 0xF) << 0)

◆ AD9517_HOLDOVER_ACTIVE

#define AD9517_HOLDOVER_ACTIVE   (1 << 5)

◆ AD9517_HOLDOVER_EN

#define AD9517_HOLDOVER_EN   ((1 << 2) | (1 << 0))

◆ AD9517_LD_PIN_COMPARATOR_EN

#define AD9517_LD_PIN_COMPARATOR_EN   (1 << 3)

◆ AD9517_LD_PIN_CTRL

#define AD9517_LD_PIN_CTRL ( x)
Value:
((x & 0x3F) << 0)

◆ AD9517_LOCK_DETECT_COUNTER

#define AD9517_LOCK_DETECT_COUNTER ( x)
Value:
((x & 0x3) << 5)

◆ AD9517_LONG_INSTRUCTION

#define AD9517_LONG_INSTRUCTION   ((1 << 4) | (1 << 3))

◆ AD9517_LOW_CYCLES_DIVIDER_1

#define AD9517_LOW_CYCLES_DIVIDER_1 ( x)
Value:
((x & 0xF) << 4)

◆ AD9517_LOW_CYCLES_DIVIDER_2

#define AD9517_LOW_CYCLES_DIVIDER_2 ( x)
Value:
((x & 0xF) << 4)

◆ AD9517_LSB_FIRST

#define AD9517_LSB_FIRST   ((1 << 6) | (1 << 1))

◆ AD9517_LVDS_CMOS_DIVIDER_FORCE_HIGH

#define AD9517_LVDS_CMOS_DIVIDER_FORCE_HIGH   (1 << 2)

◆ AD9517_LVDS_CMOS_DIVIDER_NOSYNC

#define AD9517_LVDS_CMOS_DIVIDER_NOSYNC   (1 << 3)

◆ AD9517_LVPECL_DIVIDER_FORCE_HIGH

#define AD9517_LVPECL_DIVIDER_FORCE_HIGH   (1 << 5)

◆ AD9517_LVPECL_DIVIDER_NOSYNC

#define AD9517_LVPECL_DIVIDER_NOSYNC   (1 << 6)

◆ AD9517_MAX_PFD_FREQ

#define AD9517_MAX_PFD_FREQ   100000000

◆ AD9517_MAX_PRESCLAER_OUT_FREQ

#define AD9517_MAX_PRESCLAER_OUT_FREQ   300000000

◆ AD9517_N_PATH_DELAY

#define AD9517_N_PATH_DELAY ( x)
Value:
((x & 0x7) << 0)

◆ AD9517_OUT_CMOS_B

#define AD9517_OUT_CMOS_B   (1 << 4)

◆ AD9517_OUT_DELAY_BYPASS

#define AD9517_OUT_DELAY_BYPASS   (1 << 0)

◆ AD9517_OUT_DELAY_FRACTION

#define AD9517_OUT_DELAY_FRACTION ( x)
Value:
((x & 0x3F) << 0)

◆ AD9517_OUT_LVDS_CMOS

#define AD9517_OUT_LVDS_CMOS   (1 << 3)

◆ AD9517_OUT_LVDS_CMOS_INVERT

#define AD9517_OUT_LVDS_CMOS_INVERT ( x)
Value:
((x & 0x7) << 5)

◆ AD9517_OUT_LVDS_CMOS_POWER_DOWN

#define AD9517_OUT_LVDS_CMOS_POWER_DOWN   (1 << 0)

◆ AD9517_OUT_LVDS_OUTPUT_CURRENT

#define AD9517_OUT_LVDS_OUTPUT_CURRENT ( x)
Value:
((x & 0x3) << 1)

◆ AD9517_OUT_LVPECL_DIFF_VOLTAGE

#define AD9517_OUT_LVPECL_DIFF_VOLTAGE ( x)
Value:
((x & 0x3) << 2)

◆ AD9517_OUT_LVPECL_INVERT

#define AD9517_OUT_LVPECL_INVERT   (1 << 4)

◆ AD9517_OUT_LVPECL_POWER_DOWN

#define AD9517_OUT_LVPECL_POWER_DOWN ( x)
Value:
((x & 0x3) << 0)

◆ AD9517_OUT_RAMP_CAPACITORS

#define AD9517_OUT_RAMP_CAPACITORS ( x)
Value:
((x & 0x7) << 3)

◆ AD9517_OUT_RAMP_CURRENT

#define AD9517_OUT_RAMP_CURRENT ( x)
Value:
((x & 0x7) << 0)

◆ AD9517_PFD_POLARITY

#define AD9517_PFD_POLARITY   (1 << 7)

◆ AD9517_PHASE_OFFSET_DIVIDER_1

#define AD9517_PHASE_OFFSET_DIVIDER_1 ( x)
Value:
((x & 0xF) << 0)

◆ AD9517_PHASE_OFFSET_DIVIDER_2

#define AD9517_PHASE_OFFSET_DIVIDER_2 ( x)
Value:
((x & 0xF) << 4)

◆ AD9517_PLL_POWER_DOWN

#define AD9517_PLL_POWER_DOWN ( x)
Value:
((x & 0x3) << 0)

◆ AD9517_PLL_STATUS_REG_DIS

#define AD9517_PLL_STATUS_REG_DIS   (1 << 4)

◆ AD9517_POWER_DOWN_CLK_INPUT_SECTION

#define AD9517_POWER_DOWN_CLK_INPUT_SECTION   (1 << 4)

◆ AD9517_POWER_DOWN_DIST_REF

#define AD9517_POWER_DOWN_DIST_REF   (1 << 1)

◆ AD9517_POWER_DOWN_SYNC

#define AD9517_POWER_DOWN_SYNC   (1 << 2)

◆ AD9517_POWER_DOWN_VCO_CLK

#define AD9517_POWER_DOWN_VCO_CLK   (1 << 2)

◆ AD9517_POWER_DOWN_VCO_CLK_INTERFACE

#define AD9517_POWER_DOWN_VCO_CLK_INTERFACE   (1 << 3)

◆ AD9517_PRESCALER_P

#define AD9517_PRESCALER_P ( x)
Value:
((x & 0x7) << 0)

◆ AD9517_R_COUNTER

#define AD9517_R_COUNTER ( x)
Value:
((x & 0x3FFF) << 0)

◆ AD9517_R_PATH_DELAY

#define AD9517_R_PATH_DELAY ( x)
Value:
((x & 0x7) << 3)

◆ AD9517_READ

#define AD9517_READ   (1 << 15)

◆ AD9517_REF1_FREQ_GREATER

#define AD9517_REF1_FREQ_GREATER   (1 << 1)

◆ AD9517_REF1_FREQ_MONITOR

#define AD9517_REF1_FREQ_MONITOR   (1 << 5)

◆ AD9517_REF1_POWER_ON

#define AD9517_REF1_POWER_ON   (1 << 1)

◆ AD9517_REF2_FREQ_GREATER

#define AD9517_REF2_FREQ_GREATER   (1 << 2)

◆ AD9517_REF2_FREQ_MONITOR

#define AD9517_REF2_FREQ_MONITOR   (1 << 6)

◆ AD9517_REF2_POWER_ON

#define AD9517_REF2_POWER_ON   (1 << 2)

◆ AD9517_REF2_SELECTED

#define AD9517_REF2_SELECTED   (1 << 4)

◆ AD9517_REF_FREQ_MONITOR_THRESHOLD

#define AD9517_REF_FREQ_MONITOR_THRESHOLD   (1 << 6)

◆ AD9517_REFMON_PIN_CTRL

#define AD9517_REFMON_PIN_CTRL ( x)
Value:
((x & 0x1F) << 0)

◆ AD9517_REG_A_COUNTER

#define AD9517_REG_A_COUNTER   (AD9517_T1B | 0x013)

◆ AD9517_REG_B_COUNTER

#define AD9517_REG_B_COUNTER   (AD9517_T2B | 0x015)

◆ AD9517_REG_BANK_SELECTION

#define AD9517_REG_BANK_SELECTION   (1 << 0)

◆ AD9517_REG_DIVIDER_0_0

#define AD9517_REG_DIVIDER_0_0   (AD9517_T1B | 0x190)

◆ AD9517_REG_DIVIDER_0_1

#define AD9517_REG_DIVIDER_0_1   (AD9517_T1B | 0x191)

◆ AD9517_REG_DIVIDER_0_2

#define AD9517_REG_DIVIDER_0_2   (AD9517_T1B | 0x192)

◆ AD9517_REG_DIVIDER_1_0

#define AD9517_REG_DIVIDER_1_0   (AD9517_T1B | 0x196)

◆ AD9517_REG_DIVIDER_1_1

#define AD9517_REG_DIVIDER_1_1   (AD9517_T1B | 0x197)

◆ AD9517_REG_DIVIDER_1_2

#define AD9517_REG_DIVIDER_1_2   (AD9517_T1B | 0x198)

◆ AD9517_REG_INPUT_CLKS

#define AD9517_REG_INPUT_CLKS   (AD9517_T1B | 0x1E1)

◆ AD9517_REG_LVDS_CMOS_DIVIDER_2_0

#define AD9517_REG_LVDS_CMOS_DIVIDER_2_0   (AD9517_T1B | 0x199)

◆ AD9517_REG_LVDS_CMOS_DIVIDER_2_1

#define AD9517_REG_LVDS_CMOS_DIVIDER_2_1   (AD9517_T1B | 0x19A)

◆ AD9517_REG_LVDS_CMOS_DIVIDER_2_2

#define AD9517_REG_LVDS_CMOS_DIVIDER_2_2   (AD9517_T1B | 0x19B)

◆ AD9517_REG_LVDS_CMOS_DIVIDER_2_3

#define AD9517_REG_LVDS_CMOS_DIVIDER_2_3   (AD9517_T1B | 0x19C)

◆ AD9517_REG_LVDS_CMOS_DIVIDER_2_4

#define AD9517_REG_LVDS_CMOS_DIVIDER_2_4   (AD9517_T1B | 0x19D)

◆ AD9517_REG_LVDS_CMOS_DIVIDER_3_0

#define AD9517_REG_LVDS_CMOS_DIVIDER_3_0   (AD9517_T1B | 0x19E)

◆ AD9517_REG_LVDS_CMOS_DIVIDER_3_1

#define AD9517_REG_LVDS_CMOS_DIVIDER_3_1   (AD9517_T1B | 0x19F)

◆ AD9517_REG_LVDS_CMOS_DIVIDER_3_2

#define AD9517_REG_LVDS_CMOS_DIVIDER_3_2   (AD9517_T1B | 0x1A0)

◆ AD9517_REG_LVDS_CMOS_DIVIDER_3_3

#define AD9517_REG_LVDS_CMOS_DIVIDER_3_3   (AD9517_T1B | 0x1A1)

◆ AD9517_REG_LVDS_CMOS_DIVIDER_3_4

#define AD9517_REG_LVDS_CMOS_DIVIDER_3_4   (AD9517_T1B | 0x1A2)

◆ AD9517_REG_LVDS_CMOS_OUT4

#define AD9517_REG_LVDS_CMOS_OUT4   (AD9517_T1B | 0x140)

◆ AD9517_REG_LVDS_CMOS_OUT5

#define AD9517_REG_LVDS_CMOS_OUT5   (AD9517_T1B | 0x141)

◆ AD9517_REG_LVDS_CMOS_OUT6

#define AD9517_REG_LVDS_CMOS_OUT6   (AD9517_T1B | 0x142)

◆ AD9517_REG_LVDS_CMOS_OUT7

#define AD9517_REG_LVDS_CMOS_OUT7   (AD9517_T1B | 0x143)

◆ AD9517_REG_LVPECL_OUT0

#define AD9517_REG_LVPECL_OUT0   (AD9517_T1B | 0x0F0)

◆ AD9517_REG_LVPECL_OUT1

#define AD9517_REG_LVPECL_OUT1   (AD9517_T1B | 0x0F1)

◆ AD9517_REG_LVPECL_OUT2

#define AD9517_REG_LVPECL_OUT2   (AD9517_T1B | 0x0F4)

◆ AD9517_REG_LVPECL_OUT3

#define AD9517_REG_LVPECL_OUT3   (AD9517_T1B | 0x0F5)

◆ AD9517_REG_OUT4_DELAY_BYPASS

#define AD9517_REG_OUT4_DELAY_BYPASS   (AD9517_T1B | 0x0A0)

◆ AD9517_REG_OUT4_DELAY_FRACTION

#define AD9517_REG_OUT4_DELAY_FRACTION   (AD9517_T1B | 0x0A2)

◆ AD9517_REG_OUT4_DELAY_FULL_SCALE

#define AD9517_REG_OUT4_DELAY_FULL_SCALE   (AD9517_T1B | 0x0A1)

◆ AD9517_REG_OUT5_DELAY_BYPASS

#define AD9517_REG_OUT5_DELAY_BYPASS   (AD9517_T1B | 0x0A3)

◆ AD9517_REG_OUT5_DELAY_FRACTION

#define AD9517_REG_OUT5_DELAY_FRACTION   (AD9517_T1B | 0x0A5)

◆ AD9517_REG_OUT5_DELAY_FULL_SCALE

#define AD9517_REG_OUT5_DELAY_FULL_SCALE   (AD9517_T1B | 0x0A4)

◆ AD9517_REG_OUT6_DELAY_BYPASS

#define AD9517_REG_OUT6_DELAY_BYPASS   (AD9517_T1B | 0x0A6)

◆ AD9517_REG_OUT6_DELAY_FRACTION

#define AD9517_REG_OUT6_DELAY_FRACTION   (AD9517_T1B | 0x0A8)

◆ AD9517_REG_OUT6_DELAY_FULL_SCALE

#define AD9517_REG_OUT6_DELAY_FULL_SCALE   (AD9517_T1B | 0x0A7)

◆ AD9517_REG_OUT7_DELAY_BYPASS

#define AD9517_REG_OUT7_DELAY_BYPASS   (AD9517_T1B | 0x0A9)

◆ AD9517_REG_OUT7_DELAY_FRACTION

#define AD9517_REG_OUT7_DELAY_FRACTION   (AD9517_T1B | 0x0AB)

◆ AD9517_REG_OUT7_DELAY_FULL_SCALE

#define AD9517_REG_OUT7_DELAY_FULL_SCALE   (AD9517_T1B | 0x0AA)

◆ AD9517_REG_PART_ID

#define AD9517_REG_PART_ID   (AD9517_T1B | 0x003)

◆ AD9517_REG_PFD_CHARGE_PUMP

#define AD9517_REG_PFD_CHARGE_PUMP   (AD9517_T1B | 0x010)

◆ AD9517_REG_PLL_CTRL_1

#define AD9517_REG_PLL_CTRL_1   (AD9517_T1B | 0x016)

◆ AD9517_REG_PLL_CTRL_2

#define AD9517_REG_PLL_CTRL_2   (AD9517_T1B | 0x017)

◆ AD9517_REG_PLL_CTRL_3

#define AD9517_REG_PLL_CTRL_3   (AD9517_T1B | 0x018)

◆ AD9517_REG_PLL_CTRL_4

#define AD9517_REG_PLL_CTRL_4   (AD9517_T1B | 0x019)

◆ AD9517_REG_PLL_CTRL_5

#define AD9517_REG_PLL_CTRL_5   (AD9517_T1B | 0x01A)

◆ AD9517_REG_PLL_CTRL_6

#define AD9517_REG_PLL_CTRL_6   (AD9517_T1B | 0x01B)

◆ AD9517_REG_PLL_CTRL_7

#define AD9517_REG_PLL_CTRL_7   (AD9517_T1B | 0x01C)

◆ AD9517_REG_PLL_CTRL_8

#define AD9517_REG_PLL_CTRL_8   (AD9517_T1B | 0x01D)

◆ AD9517_REG_PLL_READBACK

#define AD9517_REG_PLL_READBACK   (AD9517_T1B | 0x01F)

◆ AD9517_REG_POWER_DOWN_SYNC

#define AD9517_REG_POWER_DOWN_SYNC   (AD9517_T1B | 0x230)

◆ AD9517_REG_R_COUNTER

#define AD9517_REG_R_COUNTER   (AD9517_T2B | 0x012)

◆ AD9517_REG_READBACK_CTRL

#define AD9517_REG_READBACK_CTRL   (AD9517_T1B | 0x004)

◆ AD9517_REG_SERIAL_PORT_CONFIG

#define AD9517_REG_SERIAL_PORT_CONFIG   (AD9517_T1B | 0x000)

◆ AD9517_REG_UPDATE_ALL_REGS

#define AD9517_REG_UPDATE_ALL_REGS   (AD9517_T1B | 0x232)

◆ AD9517_REG_VCO_DIVIDER

#define AD9517_REG_VCO_DIVIDER   (AD9517_T1B | 0x1E0)

◆ AD9517_RESET_A_B_COUNTERS

#define AD9517_RESET_A_B_COUNTERS   (1 << 5)

◆ AD9517_RESET_ALL_COUNTERS

#define AD9517_RESET_ALL_COUNTERS   (1 << 4)

◆ AD9517_RESET_R_COUNTER

#define AD9517_RESET_R_COUNTER   (1 << 6)

◆ AD9517_SDO_ACTIVE

#define AD9517_SDO_ACTIVE   ((1 << 7) | (1 << 0))

◆ AD9517_SEL_VCO_CLK

#define AD9517_SEL_VCO_CLK   (1 << 1)

◆ AD9517_SELECT_REF2

#define AD9517_SELECT_REF2   (1 << 6)

◆ AD9517_SOFT_RESET

#define AD9517_SOFT_RESET   ((1 << 5) | (1 << 2))

◆ AD9517_SOFT_SYNC

#define AD9517_SOFT_SYNC   (1 << 0)

◆ AD9517_START_HIGH_DIVIDER_1

#define AD9517_START_HIGH_DIVIDER_1   (1 << 0)

◆ AD9517_START_HIGH_DIVIDER_2

#define AD9517_START_HIGH_DIVIDER_2   (1 << 1)

◆ AD9517_STATUS_PIN_CTRL

#define AD9517_STATUS_PIN_CTRL ( x)
Value:
((x & 0x3F) << 2)

◆ AD9517_SYNC_PIN_RESET

#define AD9517_SYNC_PIN_RESET ( x)
Value:
((x & 0x3) << 6)

◆ AD9517_T1B

#define AD9517_T1B   (1 << 16)

◆ AD9517_T2B

#define AD9517_T2B   (2 << 16)

◆ AD9517_T3B

#define AD9517_T3B   (3 << 16)

◆ AD9517_TRANSF_LEN

#define AD9517_TRANSF_LEN ( x)
Value:
((uint32_t)x >> 16)

◆ AD9517_UPDATE_ALL_REGS

#define AD9517_UPDATE_ALL_REGS   (1 << 0)

◆ AD9517_USE_REF_SEL_PIN

#define AD9517_USE_REF_SEL_PIN   (1 << 5)

◆ AD9517_VCO_CAL_DIVIDER

#define AD9517_VCO_CAL_DIVIDER ( x)
Value:
((x & 0x3) << 1)

◆ AD9517_VCO_CAL_FINISHED

#define AD9517_VCO_CAL_FINISHED   (1 << 6)

◆ AD9517_VCO_CAL_NOW

#define AD9517_VCO_CAL_NOW   (1 << 0)

◆ AD9517_VCO_DIVIDER

#define AD9517_VCO_DIVIDER ( x)
Value:
((x & 0x7) << 0)

◆ AD9517_VCO_FREQ_GREATER

#define AD9517_VCO_FREQ_GREATER   (1 << 3)

◆ AD9517_VCO_FREQ_MONITOR

#define AD9517_VCO_FREQ_MONITOR   (1 << 7)

◆ AD9517_WRITE

#define AD9517_WRITE   (0 << 15)

Enumeration Type Documentation

◆ ad9517_type

Enumerator
AD9517_1 
AD9517_2 
AD9517_3 
AD9517_4 

◆ logic_level_options

Enumerator
LVDS 
CMOS 

◆ out_diff_voltage_options

Enumerator
LVPECL_400mV 
LVPECL_600mV 
LVPECL_780mV 
LVPECL_960mV 

◆ out_lvds_current_options

Enumerator
LVDS_1_75mA 
LVDS_3_5mA 
LVDS_5_25mA 
LVDS_7mA 

Function Documentation

◆ ad9517_frequency()

int64_t ad9517_frequency ( struct ad9517_dev * dev,
int32_t channel,
int64_t frequency )

Sets the frequency on the specified channel.

Sets the frequency on the specified channel.

Parameters
dev- The device structure.
channel- The channel.
frequency- The desired frequency value.
Returns
set_freq - The actual frequency value that was set.

◆ ad9517_phase()

int32_t ad9517_phase ( struct ad9517_dev * dev,
int32_t channel,
int32_t phase )

Sets the phase on the specified channel.

Sets the phase on the specified channel.

Parameters
dev- The device structure.
channel- The channel.
phase- The desired phase value.
Returns
Returns the phase or negative error code.

◆ ad9517_power_mode()

int32_t ad9517_power_mode ( struct ad9517_dev * dev,
int32_t channel,
int32_t mode )

Sets the power mode of the specified channel.

Sets the power mode of the specified channel.

Parameters
dev- The device structure.
channel- The channel.
mode- Power mode.
Returns
Returns the mode or negative error code.

◆ ad9517_read()

int32_t ad9517_read ( struct ad9517_dev * dev,
uint32_t reg_addr,
uint32_t * reg_value )

Reads data from a register.

Reads data from a register.

Parameters
dev- The device structure.
reg_addr- The address of the register to be read.
reg_value- Pointer to the value to be read from the register.
Returns
Returns the read data or negative error code.

◆ ad9517_remove()

int32_t ad9517_remove ( struct ad9517_dev * dev)

Free the resources allocated by ad9517_setup().

Free the resources allocated by ad9517_setup().

Parameters
dev- The device structure.
Returns
0 in case of success, negative error code otherwise.

◆ ad9517_setup()

int32_t ad9517_setup ( struct ad9517_dev ** device,
struct ad9517_init_param init_param )

Initializes the AD9517.

Initializes the AD9517.

Parameters
device- The device structure.
init_param- The structure that contains the device initial parameters.
Returns
Returns 0 in case of success or negative error code.

◆ ad9517_update()

int32_t ad9517_update ( struct ad9517_dev * dev)

Transfers the contents of the buffer registers into the active registers.

Transfers the contents of the buffer registers into the active registers.

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

◆ ad9517_vco_frequency()

int64_t ad9517_vco_frequency ( struct ad9517_dev * dev,
int64_t frequency )

Sets the VCO frequency.

Sets the VCO frequency.

Parameters
dev- The device structure.
frequency- The desired frequency value.
Returns
vco_freq - The actual frequency value that was set.

◆ ad9517_write()

int32_t ad9517_write ( struct ad9517_dev * dev,
uint32_t reg_addr,
uint16_t reg_val )

Writes data into a register.

Writes data into a register.

Parameters
dev- The device structure.
reg_addr- The address of the register to be written.
reg_val- The value to be written into the register.
Returns
Returns 0 in case of success or negative error code.