no-OS
Classes | Enumerations | Functions
ad9208_api.h File Reference
#include "api_def.h"
#include "no_os_util.h"
Include dependency graph for ad9208_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ad9208_handle_t
 

Enumerations

enum  ad9208_adc_data_frmt_t {
  AD9208_DATA_FRMT_REAL = 0x0,
  AD9208_DATA_FRMT_COMPLEX
}
 
enum  ad9208_adc_ch_t {
  AD9208_ADC_CH_NONE = 0x0,
  AD9208_ADC_CH_A,
  AD9208_ADC_CH_B,
  AD9208_ADC_CH_ALL
}
 
enum  ad9208_adc_scale_range_t {
  AD9208_ADC_SCALE_2P04_VPP = 0,
  AD9208_ADC_SCALE_1P13_VPP,
  AD9208_ADC_SCALE_1P25_VPP,
  AD9208_ADC_SCALE_1P7_VPP,
  AD9208_ADC_SCALE_1P81_VPP,
  AD9208_ADC_SCALE_1P93_VPP
}
 
enum  ad9208_adc_buff_curr_t {
  AD9208_ADC_BUFF_CURR_400_UA = 0x4,
  AD9208_ADC_BUFF_CURR_500_UA = 0x9,
  AD9208_ADC_BUFF_CURR_600_UA = 0x1E,
  AD9208_ADC_BUFF_CURR_700_UA = 0x23,
  AD9208_ADC_BUFF_CURR_800_UA = 0x28,
  AD9208_ADC_BUFF_CURR_1000_UA = 0x32
}
 
enum  ad9208_adc_nco_mode_t {
  AD9208_ADC_NCO_VIF = 0,
  AD9208_ADC_NCO_ZIF = 1,
  AD9208_ADC_NCO_TEST = 3,
  AD9208_ADC_NCO_INVLD = 4
}
 
enum  ad9208_pdn_mode_t {
  AD9208_POWERUP = 0x0,
  AD9208_STANDBY = 0x2,
  AD9208_POWERDOWN = 0x3
}
 
enum  ad9208_jesd_serdes_pll_flg_t {
  AD9208_PLL_LOCK_STAT = 0x8,
  AD9208_PLL_LOSSLOCK = 0x4
}
 

Functions

int ad9208_init (ad9208_handle_t *h)
 Initialize AD9208 Device This API must be called first before any other API calls. It performs internal API initialization of the memory and API states. If AD9208 handle member hw_open is not NULL it shall call the function to which it points. This feature may be used to get and initialize the hardware resources required by the API and the AD9208 devices. For example GPIO, SPI etc. More...
 
int ad9208_deinit (ad9208_handle_t *h)
 De-initialize the AD9208 Device. More...
 
int ad9208_reset (ad9208_handle_t *h, uint8_t hw_reset)
 Reset the AD9208. More...
 
int ad9208_set_pdn_pin_mode (ad9208_handle_t *h, uint8_t pin_enable, ad9208_pdn_mode_t pin_mode)
 Sets the operation of the Power Down pin the AD9208. More...
 
int ad9208_set_input_clk_cfg (ad9208_handle_t *h, uint64_t clk_freq_hz, uint8_t div)
 Set AD9208 Input Sample Clock Configuration. More...
 
int ad9208_set_input_clk_duty_cycle_stabilizer (ad9208_handle_t *h, uint8_t en)
 Set AD9208 Input Sample Clock Duty Cycle Enablers. More...
 
int ad9208_get_adc_clk_freq (ad9208_handle_t *h, uint64_t *adc_clk_freq_hz)
 Get AD9208 ADC Sampling Clock (Fs) value. More...
 
int ad9208_adc_set_channel_select (ad9208_handle_t *h, uint8_t ch)
 Set AD9208 ADC Channel Select. More...
 
int ad9208_adc_get_channel_select (ad9208_handle_t *h, uint8_t *ch)
 Get AD9208 ADC Channel Select. More...
 
int ad9208_adc_set_ch_pdn_mode (ad9208_handle_t *h, ad9208_pdn_mode_t mode)
 Set ADC Channel Power Down Mode. More...
 
int ad9208_adc_set_clk_phase (ad9208_handle_t *h, uint8_t phase_adj)
 Set AD9208 ADC Clock Phase Adjust. More...
 
int ad9208_adc_set_input_cfg (ad9208_handle_t *h, signal_coupling_t analog_input_mode, uint8_t ext_vref, ad9208_adc_scale_range_t full_scale_range)
 Set AD9208 ADC Input Configuration. More...
 
int ad9208_adc_set_input_buffer_cfg (ad9208_handle_t *h, ad9208_adc_buff_curr_t buff_curr_n, ad9208_adc_buff_curr_t buff_curr_p, ad9208_adc_buff_curr_t vcm_buff)
 Set AD9208 Input Buffer Configuration. More...
 
int ad9208_adc_set_dc_offset_filt_en (ad9208_handle_t *h, uint8_t en)
 Enable AD9208 ADC DC Offset Calibaration. More...
 
int ad9208_adc_set_fc_ch_mode (ad9208_handle_t *h, uint8_t fc_ch)
 Set AD9208 ADC Operational Mode-Number of Channels. More...
 
int ad9208_adc_set_dcm_mode (ad9208_handle_t *h, uint8_t dcm)
 Set AD9208 ADC Operational Mode-decimation rate. More...
 
int ad9208_adc_set_data_format (ad9208_handle_t *h, ad9208_adc_data_frmt_t ip_data_frmt, ad9208_adc_data_frmt_t op_data_frmt)
 Set AD9208 ADC Data Format. More...
 
int ad9208_adc_set_sync_update_mode_enable (ad9208_handle_t *h, uint8_t en)
 Set AD9208 ADC Synchronized Update mode Mode. More...
 
int ad9208_adc_set_ddc_ip_mux (ad9208_handle_t *h, uint8_t ddc_ch, ad9208_adc_ch_t i_data_src, ad9208_adc_ch_t q_data_src)
 Select ADC Source for each DDC Channel. More...
 
int ad9208_adc_set_ddc_dcm (ad9208_handle_t *h, uint8_t ddc_ch, uint8_t dcm)
 Set AD9208 Decimation Filters. More...
 
int ad9208_adc_set_ddc_nco_mode (ad9208_handle_t *h, uint8_t ddc_ch, ad9208_adc_nco_mode_t mode)
 API to set DDC Frequency Translation Mode. More...
 
int ad9208_adc_set_ddc_nco_ftw (ad9208_handle_t *h, uint8_t ddc_ch, uint64_t ftw, uint64_t mod_a, uint64_t mod_b)
 API to directly set the NCO Parameters. More...
 
int ad9208_adc_set_ddc_nco (ad9208_handle_t *h, uint8_t ddc_ch, const int64_t carrier_freq_hz)
 Set AD9208 NCO based on the Channel Carrier Frequency. More...
 
int ad9208_adc_set_ddc_nco_phase (ad9208_handle_t *h, uint8_t ddc_ch, uint64_t po)
 Set AD9208 NCO Phase Offset. More...
 
int ad9208_adc_set_ddc_gain (ad9208_handle_t *h, uint8_t ddc_ch, uint8_t gain_db)
 Set AD9208 DDC Gain Stage. More...
 
int ad9208_adc_set_ddc_nco_reset (ad9208_handle_t *h)
 API to trigger a DDC Soft Reset. More...
 
int ad9208_jesd_set_if_config (ad9208_handle_t *h, jesd_param_t jesd_param, uint64_t *lane_rate_kbps)
 Configure the JESD Interface for AD9208. More...
 
int ad9208_jesd_get_cfg_param (ad9208_handle_t *h, jesd_param_t *jesd_param)
 Read back all current JESD parameter settings. More...
 
int ad9208_jesd_set_lane_xbar (ad9208_handle_t *h, uint8_t logical_lane, uint8_t physical_lane)
 Configure the Lane Cross Bar in the JESD datalink layer. More...
 
int ad9208_jesd_get_lane_xbar (ad9208_handle_t *h, uint8_t *phy_log_map)
 Get current Lane Cross Bar configuration for the JESD datalink layer. More...
 
int ad9208_jesd_enable_scrambler (ad9208_handle_t *h, uint8_t en)
 Enable the scrambler for the JESD Link. More...
 
int ad9208_jesd_enable_link (ad9208_handle_t *h, uint8_t en)
 Enable JESD Link. More...
 
int ad9208_jesd_get_pll_status (ad9208_handle_t *h, uint8_t *pll_status)
 Get SERDES PLL Status Flags. More...
 
int ad9208_jesd_subclass_set (ad9208_handle_t *h, uint8_t subclass)
 Set JESD SYNCHRONIZATION Mode. More...
 
int ad9208_jesd_syref_mode_set (ad9208_handle_t *h, jesd_sysref_mode_t mode, uint8_t sysref_count)
 Set JESD SYNCHRONIZATION Mode. More...
 
int ad9208_jesd_syref_config_set (ad9208_handle_t *h, uint8_t sysref_edge_sel, uint8_t clk_edge_sel, uint8_t neg_window_skew, uint8_t pos_window_skew)
 Set SYSREF Signal Capture settings. More...
 
int ad9208_jesd_syref_status_get (ad9208_handle_t *h, uint8_t *hold_status, uint8_t *setup_status, uint8_t *phase_status)
 Get SYSREF status for sysref monitoring. More...
 
int ad9208_jesd_sysref_timestamp_set (ad9208_handle_t *h, uint8_t timestamp_en, uint8_t control_bit, uint8_t delay)
 Set JESD SYNCHRONIZATION Time Stamp Mode. More...
 
int ad9208_jesd_syref_lmfc_offset_set (ad9208_handle_t *h, uint8_t offset)
 Set JESD LMFC Offset. More...
 
int ad9208_adc_get_overange_status (ad9208_handle_t *h, uint8_t *status)
 Get ADC Over range Status. More...
 
int ad9208_adc_set_fd_thresholds (ad9208_handle_t *h, uint16_t upper_dbfs, uint16_t lower_dbfs, uint16_t dwell_time)
 Configure The Fast Detect Overange Signal Thresholds. More...
 
int ad9208_adc_temp_sensor_set_enable (ad9208_handle_t *h, uint8_t en)
 Enable Temp Sensor. More...
 
int ad9208_get_chip_id (ad9208_handle_t *h, adi_chip_id_t *chip_id)
 Get Chip Identification Data. More...
 
int ad9208_register_write (ad9208_handle_t *h, const uint16_t address, const uint8_t data)
 Perform SPI register write access to AD9208 Device. More...
 
int ad9208_register_read (ad9208_handle_t *h, const uint16_t address, uint8_t *data)
 Perform SPI register read access to AD9208 Device. More...
 
int ad9208_get_revision (ad9208_handle_t *h, uint8_t *rev_major, uint8_t *rev_minor, uint8_t *rev_rc)
 Get API Revision Data. More...
 
int ad9208_adc_set_input_scale (ad9208_handle_t *h, ad9208_adc_scale_range_t full_scale_range)
 
int ad9208_get_decimation (ad9208_handle_t *h, uint8_t *dcm)
 

Enumeration Type Documentation

◆ ad9208_adc_buff_curr_t

Enumerates ADC Input Buffer Currents

Enumerator
AD9208_ADC_BUFF_CURR_400_UA 

Buffer Current set to 400 uA

AD9208_ADC_BUFF_CURR_500_UA 

Buffer Current set to 500 uA

AD9208_ADC_BUFF_CURR_600_UA 

Buffer Current set to 600 uA

AD9208_ADC_BUFF_CURR_700_UA 

Buffer Current set to 700 uA

AD9208_ADC_BUFF_CURR_800_UA 

Buffer Current set to 800 uA

AD9208_ADC_BUFF_CURR_1000_UA 

Buffer Current set to 1000 uA

◆ ad9208_adc_ch_t

Enumerates ADC Channels

Enumerator
AD9208_ADC_CH_NONE 

No ADC Channel

AD9208_ADC_CH_A 

ADC Channel A

AD9208_ADC_CH_B 

ADC Channel B

AD9208_ADC_CH_ALL 

ALL ADC Channels

◆ ad9208_adc_data_frmt_t

Enumerates Data Format Type Complex/Real

Enumerator
AD9208_DATA_FRMT_REAL 

Real Data

AD9208_DATA_FRMT_COMPLEX 

Complex Data

◆ ad9208_adc_nco_mode_t

Enumerates ADC NCO Modes

Enumerator
AD9208_ADC_NCO_VIF 

Variable IF Mode

AD9208_ADC_NCO_ZIF 

Zero IF Mode

AD9208_ADC_NCO_TEST 

Test Mode

AD9208_ADC_NCO_INVLD 

Invalid NCO Mode

◆ ad9208_adc_scale_range_t

Enumerates ADC Full Scale Range Modes

Enumerator
AD9208_ADC_SCALE_2P04_VPP 

2.04 Vpp Differential

AD9208_ADC_SCALE_1P13_VPP 

1.13 Vpp Differential

AD9208_ADC_SCALE_1P25_VPP 

1.25 Vpp Differential

AD9208_ADC_SCALE_1P7_VPP 

1.70 Vpp Differential

AD9208_ADC_SCALE_1P81_VPP 

1.81 Vpp Differential

AD9208_ADC_SCALE_1P93_VPP 

1.93 Vpp Differential

◆ ad9208_jesd_serdes_pll_flg_t

Enumerates SERDES PLL Status Flags

Enumerator
AD9208_PLL_LOCK_STAT 

Serdes PLL lock Status Flag

AD9208_PLL_LOSSLOCK 

Serdes PLL Lost Lock Status Flag

◆ ad9208_pdn_mode_t

Enumerates AD9208 Powerdown Modes

Enumerator
AD9208_POWERUP 

Normal Operational Powerup

AD9208_STANDBY 

Standby Mode Powerup

AD9208_POWERDOWN 

Full Powerdown Mode

Function Documentation

◆ ad9208_adc_get_channel_select()

int ad9208_adc_get_channel_select ( ad9208_handle_t h,
uint8_t *  ch 
)

Get AD9208 ADC Channel Select.

Returns the ADC Channels currently Selected

Parameters
hPointer to the AD9208 device reference handle.
*chA pointer to a Bit wise representation of ADC Channels that are currently active ADC channels are enumerated by ad9208_adc_ch_t For example: *ch = AD9208_ADC_CH_NONE ....No Channel selected *ch = AD9208_ADC_CH_A | AD9208_ADC_CH_B ... Channel A and Channel B Select
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_get_overange_status()

int ad9208_adc_get_overange_status ( ad9208_handle_t h,
uint8_t *  status 
)

Get ADC Over range Status.

Returns overrange detection at input to the ADC. Clears the overange detection status signal.

Parameters
hPointer to the AD9208 device reference handle.
statusA bit wise representation of the overrange status of each virtual converter. A bit value of 1 represents overange detection. A bit value of 0 indicates no overange detected. For example Status[0] - Overrange Status for Virtual Converter 0 0 - ADC Input in Range 1 - ADC Input overrange Detected. Status[1] - Overrange Status for Virtual Converter 1 0 - ADC Input in Range 1 - ADC Input overrange Detected.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_ch_pdn_mode()

int ad9208_adc_set_ch_pdn_mode ( ad9208_handle_t h,
ad9208_pdn_mode_t  mode 
)

Set ADC Channel Power Down Mode.

Sets the Powerdown mode of the AD9208 Channels. The AD9208 has 3 powerdown settings PowerUp/Normal Operation, StandBy Mode, Powerdown Mode This API may be used to set the desired powerdown mode via software. Note 1: The AD9208 also features a Hardware CTRL PIN that may be configured as a global Power down Pin. Note 2: This API should be used in conjunction with ad9208_adc_set_channel_select To set the target channel.

Parameters
hPointer to the AD9208 device reference handle.
modeDesired Powerdown mode
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_channel_select()

int ad9208_adc_set_channel_select ( ad9208_handle_t h,
uint8_t  ch 
)

Set AD9208 ADC Channel Select.

Selects the ADC Channels to be active for configuration. Once an ADC Channel is selected to be active subsequent API calls related to ADC Channel configuration shall be applied to that API

Parameters
hPointer to the AD9208 device reference handle.
chBit wise representation of ADC Channels to be made active ADC channels are enumerated by ad9208_adc_ch_t For example ch = AD9208_ADC_CH_NONE ....No Channel selected ch = AD9208_ADC_CH_A | AD9208_ADC_CH_B ... Channel A and Channel B Select
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_clk_phase()

int ad9208_adc_set_clk_phase ( ad9208_handle_t h,
uint8_t  phase_adj 
)

Set AD9208 ADC Clock Phase Adjust.

Note Phase can be applied independantly to each ADC. Use ad9208_adc_select_ch prior to selecting ADC Note 1: This API should be used in conjunction with ad9208_adc_set_channel_select To set the target channel.

Parameters
hPointer to the AD9208 device reference handle.
phase_adjNumber of 1/2 cycle delays to apply. Range 0-15 0 = No Delay 1 = 1/2 Input clock Cycle delay (Invert Clock) 2 = 1 input clock cycle delay .... 15 = 7.5 Input clock Cyle delay
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_data_format()

int ad9208_adc_set_data_format ( ad9208_handle_t h,
ad9208_adc_data_frmt_t  ip_data_frmt,
ad9208_adc_data_frmt_t  op_data_frmt 
)

Set AD9208 ADC Data Format.

Parameters
hPointer to the AD9208 device reference handle.
ip_data_frmtInput data format Real or Complex
op_data_frmtOutput data format Real or Complex
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_dc_offset_filt_en()

int ad9208_adc_set_dc_offset_filt_en ( ad9208_handle_t h,
uint8_t  en 
)

Enable AD9208 ADC DC Offset Calibaration.

The AD9208 contains a digital filter to remove the dc offset from the output of the ADC. This API enables or disables this optional digital Filter

Parameters
hPointer to the AD9208 device reference handle.
enDesired enable setting for the DC Offset Calibration 0 - Disable DC Offset Calibration 1 - Disable DC Offset Calibration
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_dcm_mode()

int ad9208_adc_set_dcm_mode ( ad9208_handle_t h,
uint8_t  dcm 
)

Set AD9208 ADC Operational Mode-decimation rate.

The AD9208 contains a configurable ADC signal path to support a wide range of applications. This API configures the ADC decimation mode based desired requred ADC sampling rate (Fs) and the desired output sample rate (Fout). Fs/Fout

NOTE: The ADC DCM rate shall be set to the lowest Channel DCM value.

Parameters
hPointer to the AD9208 device reference handle.
dcmSet ADC Decimation Ratio Range 1-48 TODO: Verify All this modes are really Valid
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_ddc_dcm()

int ad9208_adc_set_ddc_dcm ( ad9208_handle_t h,
uint8_t  ddc_ch,
uint8_t  dcm 
)

Set AD9208 Decimation Filters.

Each DDC Channel supports a range of Decimation filters This API enables the appropriate Decimation filters per Channel based on the desired decimation.

Parameters
hPointer to the AD9208 device reference handle.
ddc_chDDC Channel on which to set Decimation Filters. Valid Range 0 to 3
dcmDDC Channel Decimation. Valid Range 1 - 48
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_ddc_gain()

int ad9208_adc_set_ddc_gain ( ad9208_handle_t h,
uint8_t  ddc_ch,
uint8_t  gain_db 
)

Set AD9208 DDC Gain Stage.

Each DDC Channel contains an independently controlled gain stage. For the AD9208 a 0dB or 6dB gain can be applied. This API sets the gain for a particular DDC.

Parameters
hPointer to the AD9208 device reference handle.
ddc_chDDC Channel on which to set the Gain Stage. Range 0 to 3
gain_dbDesired gain setting. 0dB or 6dB
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_ddc_ip_mux()

int ad9208_adc_set_ddc_ip_mux ( ad9208_handle_t h,
uint8_t  ddc_ch,
ad9208_adc_ch_t  i_data_src,
ad9208_adc_ch_t  q_data_src 
)

Select ADC Source for each DDC Channel.

Parameters
hPointer to the AD9208 device reference handle.
ddc_chDDC Channel on which to set Decimation Filters Valid Range 0-3
i_data_srcADC data source for DDC I data channel. AD9208_ADC_CH_A - ADC Channel A AD9208_ADC_CH_B - ADC Channel B
q_data_srcADC data source for DDC Q data channel. AD9208_ADC_CH_A - ADC Channel A AD9208_ADC_CH_B - ADC Channel B
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_ddc_nco()

int ad9208_adc_set_ddc_nco ( ad9208_handle_t h,
uint8_t  ddc_ch,
const int64_t  carrier_freq_hz 
)

Set AD9208 NCO based on the Channel Carrier Frequency.

Each DDC Channel support an NCO for frequency translation This API configures NCO based on the Channel Carrier Frequency and the adc_clk_freq_hz.

Parameters
hPointer to the AD9208 device reference handle.
ddc_chDDC Channel on which to set NCO Frequency Translation. Range 0 to 3
carrier_freq_hzDesired Channel Carrier Frequency in Hz
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_ddc_nco_ftw()

int ad9208_adc_set_ddc_nco_ftw ( ad9208_handle_t h,
uint8_t  ddc_ch,
uint64_t  ftw,
uint64_t  mod_a,
uint64_t  mod_b 
)

API to directly set the NCO Parameters.

Each DDC Channel supports an NCO for frequency translation This API configures NCO parameters for the desired frequency Translation. Alternatively the NCO may be configured based on the carrier Frequency. Refer to ad9208_adc_set_ddc_nco

Parameters
hPointer to the AD9208 device reference handle.
ddc_chDDDC Channel on which to set NCO Frequency Translation. Range 0 to 3
ftwDesired 48-bit FTW value for the NCO on the Target DDC Channel
mod_aDesired 48-bit MAW value for the NCO on the Target DDC Channel
mod_bDesired 48-bit MBW value for the NCO on the Target DDC Channel
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter
Here is the caller graph for this function:

◆ ad9208_adc_set_ddc_nco_mode()

int ad9208_adc_set_ddc_nco_mode ( ad9208_handle_t h,
uint8_t  ddc_ch,
ad9208_adc_nco_mode_t  mode 
)

API to set DDC Frequency Translation Mode.

Each DDC Channel supports an NCO for frequency translation. This API enables or disables the NCO to achieve Variable IF mode( NCO enabled) or Zero IF Mode (NCO disabled). Alternatively there a test mode may be enabled where the NCO directly injects a ramp into the signal path.

Parameters
hPointer to the AD9208 device reference handle.
ddc_chDDC Channel on which to enable the NCO. Range 0-3.
modeDesired NCO mode for target DDC Channel.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_ddc_nco_phase()

int ad9208_adc_set_ddc_nco_phase ( ad9208_handle_t h,
uint8_t  ddc_ch,
uint64_t  po 
)

Set AD9208 NCO Phase Offset.

Each DDC Channel support an NCO for frequency translation This API configures NCO parameters for the desired frequency Translation.

Parameters
hPointer to the AD9208 device reference handle.
ddc_chDDC Channel on which to enable the NCO, Range 0-3
poDesired 48-bit NCO Phase offset
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_ddc_nco_reset()

int ad9208_adc_set_ddc_nco_reset ( ad9208_handle_t h)

API to trigger a DDC Soft Reset.

Following an update NCOs may be synchronized via DDC software Reset This may be required as alternative to SYSREF signal Synchronization. All NCO will be synchronized.

Parameters
hPointer to the AD9208 device reference handle.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_INVALID_PARAMInvalid Parameter
API_ERROR_INIT_SEQ_FAILInit sequence failed
API_ERROR_SPI_SDOInvalid SPI configuration

◆ ad9208_adc_set_fc_ch_mode()

int ad9208_adc_set_fc_ch_mode ( ad9208_handle_t h,
uint8_t  fc_ch 
)

Set AD9208 ADC Operational Mode-Number of Channels.

The AD9208 contains a configurable ADC signal path to support a wide range of applications. This API configures the ADC operational mode based on the Carrier Frequency (Fc) Channels on input signal.

Parameters
hPointer to the AD9208 device reference handle.
fc_chNumber of Carrier Frequencies. Valid Values 0 - Full Bandwidth 1 - One Channel 2 - Two Channel 4 - Four Channel
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_fd_thresholds()

int ad9208_adc_set_fd_thresholds ( ad9208_handle_t h,
uint16_t  upper_dbfs,
uint16_t  lower_dbfs,
uint16_t  dwell_time 
)

Configure The Fast Detect Overange Signal Thresholds.

Configure the parameters, the upper and lower threshold levels and the dwell time, that govern the triggering of the fast overange detection signal.

Parameters
hPointer to the AD9208 device reference handle.
upper_dbfsA 13 bit value representing the Upper magnitude threshold level in DBFS.
lower_dbfsA 13 bit value representing the lower magnitude threshold level in DBFS.
dwell_timeA 13 bit value representing the Upper magnitude threshold level in DBFS.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_input_buffer_cfg()

int ad9208_adc_set_input_buffer_cfg ( ad9208_handle_t h,
ad9208_adc_buff_curr_t  buff_curr_n,
ad9208_adc_buff_curr_t  buff_curr_p,
ad9208_adc_buff_curr_t  vcm_buff 
)

Set AD9208 Input Buffer Configuration.

The AD9208 analog inputs are internally biased to the comon mode voltage. For DC coupled applications the internal common mode buffer may be disabled. And its recommended to export the internal common mode voltage to the input buffer via the Vref pin. The buffer currents may be adjusted to optimize of SFDR over various input frequencies and bandwidth.

Parameters
hPointer to the AD9208 device reference handle.
buff_curr_nN-Input buffer current. Valid values defined by ad9208_adc_buff_curr_t enumeration
buff_curr_pP-Input buffer current. Valid values defined by ad9208_adc_buff_curr_t enumeration
vcm_buffVCM buffer current. Valid values defined by ad9208_adc_buff_curr_t enumeration
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_input_cfg()

int ad9208_adc_set_input_cfg ( ad9208_handle_t h,
signal_coupling_t  analog_input_mode,
uint8_t  ext_vref,
ad9208_adc_scale_range_t  full_scale_range 
)

Set AD9208 ADC Input Configuration.

The AD9208 analog inputs are internally biased to the comon mode voltage. For AC coupled applications an external Vref may be used. For DC coupled applications the internal common mode buffer may be disabled. And its recommended to export the internal common mode voltage reference to the input buffer via the Vref pin. Refer to the Datasheet for more details. Finally the internal voltage reference may be adjusted to modify the full-scale voltage. Refer to the Datasheet for full details.

Parameters
hPointer to the AD9208 device reference handle.
analog_input_modeADC Analog Input mode. Enumerated by signal_coupling_t COUPLING_AC - AC Coupled Mode COUPLING_DC- DC Coupled Mode
ext_vrefExternal Voltage Reference mode of AC Coupled Applications. This parameter shall be ignored in DC Coupled Applications 0 - AC Coupled Mode 1- DC Coupled Mode
full_scale_rangeFull Scale Voltage settings. Valid options are defined by ad9208_adc_scale_range_t
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_set_input_scale()

int ad9208_adc_set_input_scale ( ad9208_handle_t h,
ad9208_adc_scale_range_t  full_scale_range 
)

◆ ad9208_adc_set_sync_update_mode_enable()

int ad9208_adc_set_sync_update_mode_enable ( ad9208_handle_t h,
uint8_t  en 
)

Set AD9208 ADC Synchronized Update mode Mode.

DDC NCO Parameters and Programable Filter Registers may be updated either instantaneously or in a synchronized update. In Synchronized Mode update may be trigger by a SPI bit trigger or alternatively a GPIO pin may be configured to trigger synchronized update. This api enables or disables the synchronized update mode. This affects updates to FTW, POW, MAW & MBW and programmable filter configuration.

Parameters
hPointer to the AD9208 device reference handle.
enEnable Synchronized update 0- Synchronized Update Mode Disabled. Instantaneous update 1- Synchronized Update Mode Enabled.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_adc_temp_sensor_set_enable()

int ad9208_adc_temp_sensor_set_enable ( ad9208_handle_t h,
uint8_t  en 
)

Enable Temp Sensor.

AD9208 Contains diode-based temperature sensors. And the diode output voltages may be output to the VREF Pin.

Note 1: the VREF pin may be used for the ADC reference voltage DC coupled applications and External VREF for the ADC in AC coupled modes. If VREF pin is used for the ADC Analog Input, VREF cannot be used for Temperature Sensor. Refer to the Datasheet and the ad9208_adc_set_input_cfg API

Note 2: This API should be used in conjunction with ad9208_adc_set_channel_select To set the target channel.

Parameters
hPointer to the AD9208 device reference handle.
enEnable the Temp Sensor Diodes.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_deinit()

int ad9208_deinit ( ad9208_handle_t h)

De-initialize the AD9208 Device.

This API must be called last. No other API should be called after this call. It performs internal API de-initialization of the memory and API states. If AD9208 handle member hw_close, is not NULL it shall call the function to which it points. This feature may be used to de-initialize and release any hardware resources required by the API and the AD9208 Device. For example GPIO, SPI etc

Parameters
hPointer to the AD9208 device reference handle.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_HW_CLOSEHW Close Function Failed

◆ ad9208_get_adc_clk_freq()

int ad9208_get_adc_clk_freq ( ad9208_handle_t h,
uint64_t *  adc_clk_freq_hz 
)

Get AD9208 ADC Sampling Clock (Fs) value.

Parameters
hPointer to the AD9208 device reference handle.
*adc_clk_freq_hzPointer to the a uint64_t variable to store the ADC Clk Frequency
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_get_chip_id()

int ad9208_get_chip_id ( ad9208_handle_t h,
adi_chip_id_t chip_id 
)

Get Chip Identification Data.

read-back Product type, identification and revision data

Parameters
hPointer to the AD9208 device reference handle.
chip_idPointer to a variable of type ad9208_chip_id_t to which the product data read-back from chip shall be stored.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_get_decimation()

int ad9208_get_decimation ( ad9208_handle_t h,
uint8_t *  dcm 
)

◆ ad9208_get_revision()

int ad9208_get_revision ( ad9208_handle_t h,
uint8_t *  rev_major,
uint8_t *  rev_minor,
uint8_t *  rev_rc 
)

Get API Revision Data.

Parameters
hPointer to the AD9208 device reference handle.
rev_majorPointer to variable to store the Major Revision Number
rev_minorPointer to variable to store the Minor Revision Number
rev_rcPointer to variable to store the RC Revision Number
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_init()

int ad9208_init ( ad9208_handle_t h)

Initialize AD9208 Device This API must be called first before any other API calls. It performs internal API initialization of the memory and API states. If AD9208 handle member hw_open is not NULL it shall call the function to which it points. This feature may be used to get and initialize the hardware resources required by the API and the AD9208 devices. For example GPIO, SPI etc.

Its is recommended to call the Reset API after this API to ensure all spi registers are reset to ADI recommended defaults.

Parameters
hPointer to the AD9208 device reference handle.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_HW_OPENHW Open Function Failed

◆ ad9208_jesd_enable_link()

int ad9208_jesd_enable_link ( ad9208_handle_t h,
uint8_t  en 
)

Enable JESD Link.

Enable SERDES Link to start JESD tranmission

Parameters
hPointer to the AD9208 device reference handle.
enEnable control for the JESD Link
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_jesd_enable_scrambler()

int ad9208_jesd_enable_scrambler ( ad9208_handle_t h,
uint8_t  en 
)

Enable the scrambler for the JESD Link.

Enable or Disable the scrambler for the JESD Link

Parameters
hPointer to the AD9208 device reference handle.
enEnable control for JESD Scrambler.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_jesd_get_cfg_param()

int ad9208_jesd_get_cfg_param ( ad9208_handle_t h,
jesd_param_t jesd_param 
)

Read back all current JESD parameter settings.

Read-back all the currently configured JESD Interface parameters.

Parameters
hPointer to the AD9208 device reference handle.
jesd_paramPointer to a variable that will be set will the current values of the JESD interface parameters.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_jesd_get_lane_xbar()

int ad9208_jesd_get_lane_xbar ( ad9208_handle_t h,
uint8_t *  phy_log_map 
)

Get current Lane Cross Bar configuration for the JESD datalink layer.

Return the physical to logical lane mapping set by the configured by the current Lane Cross Bar configuration.

Parameters
hPointer to the AD9208 device reference handle.
phy_log_mapPointer a 8 deep uint8_t array.Each element of the array represents the physical lane 0 - 7 and the value represents the logical lane assigned to that physical lane.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_jesd_get_pll_status()

int ad9208_jesd_get_pll_status ( ad9208_handle_t h,
uint8_t *  pll_status 
)

Get SERDES PLL Status Flags.

Read Serdes PLL status and return the status via the pll_status parameter.

Parameters
hPointer to the AD9208 device reference handle.
*pll_statusPointer to the variable that will be set with the PLL status. Lock Status bits are enumerated by ad9208_jesd_serdes_pll_flg_t; bit[7] => PLL Lock Status bit[3] => PLL Lost Lock Status
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_jesd_set_if_config()

int ad9208_jesd_set_if_config ( ad9208_handle_t h,
jesd_param_t  jesd_param,
uint64_t *  lane_rate_kbps 
)

Configure the JESD Interface for AD9208.

Configure JESD interface parameters

Parameters
hPointer to the AD9208 device reference handle.
jesd_paramThe desired JESD link parameters for which to configure the JESD Interface to AD9208. jesd_param_t structure defines the parameter their ranges supported by the AD9208.
*lane_rate_kbpsPointer to uint64_t to return the determined Lane Rate. Set to NULL if not required.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_jesd_set_lane_xbar()

int ad9208_jesd_set_lane_xbar ( ad9208_handle_t h,
uint8_t  logical_lane,
uint8_t  physical_lane 
)

Configure the Lane Cross Bar in the JESD datalink layer.

Configure AD9208 Lane Cross Bar to route the physical JESD lanes to the desired logical lanes.

Parameters
hPointer to the AD9208 device reference handle.
physical_laneuint8_t value indicating the Physical Lanes to be routed to the serdes logical indicated by the logical_lane parameter. Valid Range 0 -7
logical_laneuint8_t value indicating the corresponding logical lane for the physical lane listed in parameter physical_lane. Valid Range 0 -7
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_jesd_subclass_set()

int ad9208_jesd_subclass_set ( ad9208_handle_t h,
uint8_t  subclass 
)

Set JESD SYNCHRONIZATION Mode.

Parameters
hPointer to the AD9208 device reference handle.
subclassDesired Jesd Subclass Mode. Valid Range 0 to 1 0 - Sub Class 0 1 - Sub Class 1
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_jesd_syref_config_set()

int ad9208_jesd_syref_config_set ( ad9208_handle_t h,
uint8_t  sysref_edge_sel,
uint8_t  clk_edge_sel,
uint8_t  neg_window_skew,
uint8_t  pos_window_skew 
)

Set SYSREF Signal Capture settings.

Parameters
hPointer to the AD9208 device reference handle.
sysref_edge_selSet the transition on which SYSREF is valid. Valid values are: 0 LOW to HIGH transition 1 HIGH to LOW transition
clk_edge_selSet the Sysref Capture clock Edge. Valid values are: 0 Rising clock Edge 1 Falling Clock Edge
neg_window_skewSkew sample clock by which captured sysref is ignored. Skew set in clock cycles. Valid range 0-3
pos_window_skewSkew sample clock by which captured sysref is ignored. Skew set in clock cycles. Valid range 0-3
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_jesd_syref_lmfc_offset_set()

int ad9208_jesd_syref_lmfc_offset_set ( ad9208_handle_t h,
uint8_t  offset 
)

Set JESD LMFC Offset.

Parameters
hPointer to the AD9208 device reference handle.
offsetAdjust the LMFC phase offset in frame clock cycles. For F = 1, only 4-frame shifts are valid For F = 2, Only 2-frame shifts are valid In all other cases for F, 1 frame shift are valid.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter
Parameters
hPointer to the AD9208 device reference handle.
offsetAdjust the LMFC phase offset in frame clock cycles. For F = 1, only 4-frame shifts are valid For F = 2, Only 2-frame shifts are valid In all other cases for F, 1 frame shift are valid Refer to the AD9208 Datasheet for more details.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_jesd_syref_mode_set()

int ad9208_jesd_syref_mode_set ( ad9208_handle_t h,
jesd_sysref_mode_t  mode,
uint8_t  sysref_count 
)

Set JESD SYNCHRONIZATION Mode.

Parameters
hPointer to the AD9208 device reference handle.
modeSysref Synchronization Mode. SYREF_NONE - NO SYSREF, Subclass 1 only SYSREF_ONESHOT - single sysref signal mode SYSREF_CONT - Continuous sysref signal mode
sysref_countNumber of initial sysref sgnals to ignore in sysref n-shot mode 0-15 Valid only for N-Shot Mode.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_jesd_syref_status_get()

int ad9208_jesd_syref_status_get ( ad9208_handle_t h,
uint8_t *  hold_status,
uint8_t *  setup_status,
uint8_t *  phase_status 
)

Get SYSREF status for sysref monitoring.

Parameters
hPointer to the AD9208 device reference handle.
*hold_statusPointer to a uint8_t variable to which the Sysref +/- Hold Status will be set
*setup_statusPointer to a uint8_t varaiable to whch the Sysref +/- Setup Status will be set
*phase_statusPoint to a uint8_t variable to which the Sysref Divider Phase during Sysref Capture will be set.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_jesd_sysref_timestamp_set()

int ad9208_jesd_sysref_timestamp_set ( ad9208_handle_t h,
uint8_t  timestamp_en,
uint8_t  control_bit,
uint8_t  delay 
)

Set JESD SYNCHRONIZATION Time Stamp Mode.

Parameters
hPointer to the AD9208 device reference handle.
timestamp_enEnable Timestamp Mode, Sysref signal will trigger a timestamp sample. 0 - Timestamp Mode Enable, Sysref will trigger a timestamp smaple. 1 - Timestamp Mode Disable, Sysref will reset internal Synchronization.
control_bitDesired control bit for Sysref time_stamp control.
delayDelay of sysref timestamp in smaple clock cycles
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_register_read()

int ad9208_register_read ( ad9208_handle_t h,
const uint16_t  address,
uint8_t *  data 
)

Perform SPI register read access to AD9208 Device.

Parameters
hPointer to the AD9208 device reference handle.
addressAD9208 Device SPI address from which the value of data parameter shall be read,
dataPointer to an 8-bit variable to which the value of the SPI register at the address defined by address parameter shall be stored.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
Here is the caller graph for this function:

◆ ad9208_register_write()

int ad9208_register_write ( ad9208_handle_t h,
const uint16_t  address,
const uint8_t  data 
)

Perform SPI register write access to AD9208 Device.

Parameters
hPointer to the AD9208 device reference handle.
addressAD9208 Device SPI address to which the value of data parameter shall be written
data8-bit value to be written to SPI register defined by the address parameter.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle.
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
Here is the caller graph for this function:

◆ ad9208_reset()

int ad9208_reset ( ad9208_handle_t h,
uint8_t  hw_reset 
)

Reset the AD9208.

Issues a hard reset or soft reset of the device. Performs a full reset of AD9208 via the hardware pin (hard) or via the spi register (soft). Resetting all SPI registers to default and triggering the required initialization sequence.

Parameters
hPointer to the AD9208 device reference handle.
hw_resetA parameter to indicate if the reset issues is to be via the hardware pin or SPI register. A value of 1 indicates a hardware reset is required. A value of 0 indicates a software reset is required.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter
API_ERROR_RESET_PIN_CTRLHW Reset Pin Function Failed

◆ ad9208_set_input_clk_cfg()

int ad9208_set_input_clk_cfg ( ad9208_handle_t h,
uint64_t  clk_freq_hz,
uint8_t  div 
)

Set AD9208 Input Sample Clock Configuration.

Value of the ADC Clock shall be Input Sample Clock/Clock Divider setting. Valid range of Input Clock is 2.5 GHz to 6 GHz The ADC sample clock shall be derived from the input clock and the configured divider setting. Fs = clk_freq_hz/div. Valid range of ADC Clock is 2.5 GHz to 3.5 GHz.

Parameters
hPointer to the AD9208 device reference handle.
clk_freq_hzADC CLK applied to AD9208
divThe desired CLK input divider setting. Valid values are 1,2 and 4.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_set_input_clk_duty_cycle_stabilizer()

int ad9208_set_input_clk_duty_cycle_stabilizer ( ad9208_handle_t h,
uint8_t  en 
)

Set AD9208 Input Sample Clock Duty Cycle Enablers.

When its not possible to provide a higher frequency clock, it is recommended to turn on the Dyty Cycle Stabilizers (DCS)

Parameters
hPointer to the AD9208 device reference handle.
enDesired Enable setting for the targeted DCS 0= Disabled 1= Enabled.
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter

◆ ad9208_set_pdn_pin_mode()

int ad9208_set_pdn_pin_mode ( ad9208_handle_t h,
uint8_t  pin_enable,
ad9208_pdn_mode_t  pin_mode 
)

Sets the operation of the Power Down pin the AD9208.

Sets the Operation of the External power down pin of the AD9208. This pin can configured so that it control entering and exiting powerdown or Standby modes based on the signal applied to the pin. It may also be configured to be disabled so that it does not effect the powerdown mode.

Parameters
hPointer to the AD9208 device reference handle.
pin_enablePowerdown pin enable/disable. 1 - Powerdown pin controls powerdown status 0 - Powerdown pin disable. Does not effect powerdown Status.
pin_modePowerdown mode that Powerdown pin status, if enabled, shall control. Valid options are AD9208_STANDBY -Pin status will control AD9208 Standby Status AD9208_POWERDOWN -Pin status will control AD9208 Powerdown Status
Return values
API_ERROR_OKAPI Completed Successfully
API_ERROR_INVALID_HANDLE_PTRInvalid reference handle
API_ERROR_INVALID_XFER_PTRSPI Access Failed
API_ERROR_SPI_XFERSPI XFER Function Failed
API_ERROR_INVALID_PARAMInvalid Parameter