no-OS
ad9208_api.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0
17 #ifndef __AD9208API_H__
18 #define __AD9208API_H__
19 
20 #include "api_def.h"
21 #include "no_os_util.h"
22 
24 typedef enum {
28 
30 typedef enum {
36 
38 typedef enum {
46 
48 typedef enum {
56 
58 typedef enum {
64 
66 typedef enum {
71 
73 typedef enum {
77 
79 typedef struct {
80  void *user_data;
87  uint64_t adc_clk_freq_hz;
89 
111 
129 
152 int ad9208_reset(ad9208_handle_t *h, uint8_t hw_reset);
153 
181  uint8_t pin_enable, ad9208_pdn_mode_t pin_mode);
182 
204  uint64_t clk_freq_hz, uint8_t div);
205 
225 
239 int ad9208_get_adc_clk_freq(ad9208_handle_t *h, uint64_t *adc_clk_freq_hz);
240 
263 
286 
309 
333 int ad9208_adc_set_clk_phase(ad9208_handle_t *h, uint8_t phase_adj);
334 
366  signal_coupling_t analog_input_mode,
367  uint8_t ext_vref,
368  ad9208_adc_scale_range_t full_scale_range);
369 
395  ad9208_adc_buff_curr_t buff_curr_n,
396  ad9208_adc_buff_curr_t buff_curr_p,
397  ad9208_adc_buff_curr_t vcm_buff);
398 
417 
438 int ad9208_adc_set_fc_ch_mode(ad9208_handle_t *h, uint8_t fc_ch);
439 
460 int ad9208_adc_set_dcm_mode(ad9208_handle_t *h, uint8_t dcm);
461 
477  ad9208_adc_data_frmt_t ip_data_frmt,
478  ad9208_adc_data_frmt_t op_data_frmt);
479 
502 
523  uint8_t ddc_ch, ad9208_adc_ch_t i_data_src,
524  ad9208_adc_ch_t q_data_src);
525 
544 int ad9208_adc_set_ddc_dcm(ad9208_handle_t *h, uint8_t ddc_ch, uint8_t dcm);
545 
566  uint8_t ddc_ch, ad9208_adc_nco_mode_t mode);
567 
588 int ad9208_adc_set_ddc_nco_ftw(ad9208_handle_t *h, uint8_t ddc_ch,
589  uint64_t ftw, uint64_t mod_a, uint64_t mod_b);
590 
609 int ad9208_adc_set_ddc_nco(ad9208_handle_t *h, uint8_t ddc_ch,
610  const int64_t carrier_freq_hz);
611 
628 int ad9208_adc_set_ddc_nco_phase(ad9208_handle_t *h, uint8_t ddc_ch,
629  uint64_t po);
630 
650  uint8_t ddc_ch, uint8_t gain_db);
690  jesd_param_t jesd_param,
691  uint64_t *lane_rate_kbps);
692 
711 
733  uint8_t logical_lane, uint8_t physical_lane);
734 
752 int ad9208_jesd_get_lane_xbar(ad9208_handle_t *h, uint8_t *phy_log_map);
753 
769 
785 int ad9208_jesd_enable_link(ad9208_handle_t *h, uint8_t en);
786 
807 int ad9208_jesd_get_pll_status(ad9208_handle_t *h, uint8_t *pll_status);
808 
823 int ad9208_jesd_subclass_set(ad9208_handle_t *h, uint8_t subclass);
824 
842  jesd_sysref_mode_t mode, uint8_t sysref_count);
843 
865  uint8_t sysref_edge_sel, uint8_t clk_edge_sel,
866  uint8_t neg_window_skew,
867  uint8_t pos_window_skew);
868 
885  uint8_t *hold_status, uint8_t *setup_status,
886  uint8_t *phase_status);
887 
906  uint8_t timestamp_en, uint8_t control_bit,
907  uint8_t delay);
923 int ad9208_jesd_syref_lmfc_offset_set(ad9208_handle_t *h, uint8_t offset);
924 
949 int ad9208_adc_get_overange_status(ad9208_handle_t *h, uint8_t *status);
950 
975  uint16_t upper_dbfs, uint16_t lower_dbfs,
976  uint16_t dwell_time);
1017 
1033  const uint16_t address, const uint8_t data);
1034 
1052  const uint16_t address, uint8_t *data);
1064 int ad9208_get_revision(ad9208_handle_t *h, uint8_t *rev_major,
1065  uint8_t *rev_minor, uint8_t *rev_rc);
1066 
1068  ad9208_adc_scale_range_t full_scale_range);
1069 
1070 int ad9208_get_decimation(ad9208_handle_t *h, uint8_t *dcm);
1071 
1072 #endif /* !__AD9208API_H__ */
ad9208_adc_set_channel_select
int ad9208_adc_set_channel_select(ad9208_handle_t *h, uint8_t ch)
Set AD9208 ADC Channel Select.
Definition: ad9208_api.c:162
ad9208_init
int ad9208_init(ad9208_handle_t *h)
Initialize AD9208 Device This API must be called first before any other API calls....
Definition: ad9208_api.c:46
AD9208_ADC_BUFF_CURR_800_UA
@ AD9208_ADC_BUFF_CURR_800_UA
Definition: ad9208_api.h:53
AD9208_FULL_SCALE_CFG_REG
#define AD9208_FULL_SCALE_CFG_REG
Definition: ad9208_reg.h:264
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.
Definition: ad9208_adc_api.c:896
AD9208_DATA_FRMT_REAL
@ AD9208_DATA_FRMT_REAL
Definition: ad9208_api.h:25
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.
Definition: ad9208_adc_api.c:453
AD9208_ADC_BUFF_CURR_500_UA
@ AD9208_ADC_BUFF_CURR_500_UA
Definition: ad9208_api.h:50
AD9208_EXT_VCM_BUFF
#define AD9208_EXT_VCM_BUFF
Definition: ad9208_reg.h:254
AD9208_PDN_MODE
#define AD9208_PDN_MODE(x)
Definition: ad9208_reg.h:39
ad9208_jesd_syref_lmfc_offset_set
int ad9208_jesd_syref_lmfc_offset_set(ad9208_handle_t *h, uint8_t offset)
Set JESD LMFC Offset.
Definition: ad9208_jesd_api.c:648
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.
Definition: ad9208_api.c:263
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.
Definition: ad9208_adc_api.c:399
API_ERROR_INVALID_HANDLE_PTR
#define API_ERROR_INVALID_HANDLE_PTR
Definition: api_errors.h:29
chip_decimation_ratio_cfg
Definition: ad9208_adc_api.c:56
AD9208_EXT_VREF_MODE
#define AD9208_EXT_VREF_MODE
Definition: ad9208_reg.h:251
ad9208_adc_get_channel_select
int ad9208_adc_get_channel_select(ad9208_handle_t *h, uint8_t *ch)
Get AD9208 ADC Channel Select.
Definition: ad9208_api.c:178
API_ERROR_INVALID_XFER_PTR
#define API_ERROR_INVALID_XFER_PTR
Definition: api_errors.h:31
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.
Definition: ad9208_adc_api.c:896
AD9208_IP_CLK_DCS2_REG
#define AD9208_IP_CLK_DCS2_REG
Definition: ad9208_reg.h:72
ad9208_deinit
int ad9208_deinit(ad9208_handle_t *h)
De-initialize the AD9208 Device.
Definition: ad9208_api.c:74
AD9208_ADC_SCALE_1P13_VPP
@ AD9208_ADC_SCALE_1P13_VPP
Definition: ad9208_api.h:40
AD9208_DC_COUPLE_EN
#define AD9208_DC_COUPLE_EN(x)
Definition: ad9208_reg.h:262
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.
Definition: ad9208_adc_api.c:520
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.
Definition: ad9208_adc_api.c:334
AD9208_NCO_SOFT_RESET
#define AD9208_NCO_SOFT_RESET
Definition: ad9208_reg.h:126
AD9208_CHIP_PIN_CTRL0_REG
#define AD9208_CHIP_PIN_CTRL0_REG
Definition: ad9208_reg.h:59
AD9208_DDCX_MBW5_REG
#define AD9208_DDCX_MBW5_REG
Definition: ad9208_reg.h:170
AD9208_PROD_ID_LSB_REG
#define AD9208_PROD_ID_LSB_REG
Definition: ad9208_reg.h:42
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.
Definition: ad9208_adc_api.c:780
AD9208_CHIP_GRADE_REG
#define AD9208_CHIP_GRADE_REG
Definition: ad9208_reg.h:44
AD9208_DDCX_MAW5_REG
#define AD9208_DDCX_MAW5_REG
Definition: ad9208_reg.h:163
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.
Definition: ad9208_adc_api.c:453
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.
Definition: ad9208_adc_api.c:556
ad9208_handle_t
Definition: ad9208_api.h:79
COUPLING_DC
@ COUPLING_DC
Definition: api_def.h:203
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.
Definition: ad9208_jesd_api.c:263
ad9208_handle_t::user_data
void * user_data
Definition: ad9208_api.h:80
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.
Definition: ad9208_jesd_api.c:335
AD9208_CHIP_TYPE_REG
#define AD9208_CHIP_TYPE_REG
Definition: ad9208_reg.h:41
ad9208_handle_t::reset_pin_ctrl
reset_pin_ctrl_t reset_pin_ctrl
Definition: ad9208_api.h:82
ad9208_get_chip_id
int ad9208_get_chip_id(ad9208_handle_t *h, adi_chip_id_t *chip_id)
Get Chip Identification Data.
Definition: ad9208_api.c:88
AD9208_DDC_SYNC_CTRL_REG
#define AD9208_DDC_SYNC_CTRL_REG
Definition: ad9208_reg.h:124
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.
Definition: ad9208_reg.c:41
AD9208_IP_CLK_MIN_HZ
#define AD9208_IP_CLK_MIN_HZ
Definition: ad9208_api.c:19
API_ERROR_INVALID_DELAYUS_PTR
#define API_ERROR_INVALID_DELAYUS_PTR
Definition: api_errors.h:33
hw_close_t
int(* hw_close_t)(void *user_data)
Closes any platform hardware resources for the AD9164 Device.
Definition: api_def.h:99
ad9208_init
int ad9208_init(ad9208_handle_t *h)
Initialize AD9208 Device This API must be called first before any other API calls....
Definition: ad9208_api.c:46
NO_OS_S16_MAX
#define NO_OS_S16_MAX
Definition: no_os_util.h:111
ad9208_handle_t::adc_clk_freq_hz
uint64_t adc_clk_freq_hz
Definition: ad9208_api.h:87
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.
Definition: ad9208_adc_api.c:334
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.
Definition: ad9208_jesd_api.c:573
AD9208_DDCX_MAW0_REG
#define AD9208_DDCX_MAW0_REG
Definition: ad9208_reg.h:158
ad9208_deinit
int ad9208_deinit(ad9208_handle_t *h)
De-initialize the AD9208 Device.
Definition: ad9208_api.c:74
ad9208_get_chip_id
int ad9208_get_chip_id(ad9208_handle_t *h, adi_chip_id_t *chip_id)
Get Chip Identification Data.
Definition: ad9208_api.c:88
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.
Definition: ad9208_adc_api.c:498
AD9208_DDCX_PO0_REG
#define AD9208_DDCX_PO0_REG
Definition: ad9208_reg.h:150
AD9208_DDCX_REG_OFFSET
#define AD9208_DDCX_REG_OFFSET
Definition: ad9208_reg.h:130
API_ERROR_US_DELAY
#define API_ERROR_US_DELAY
Definition: api_errors.h:51
AD9208_DDCX_FTW0_REG
#define AD9208_DDCX_FTW0_REG
Definition: ad9208_reg.h:143
ad9208_get_decimation
int ad9208_get_decimation(ad9208_handle_t *h, uint8_t *dcm)
Definition: ad9208_adc_api.c:82
adi_dec_filt_data::dec_real
uint8_t dec_real
Definition: ad9208_adc_api.c:28
AD9208_ADC_SCALE_1P81_VPP
@ AD9208_ADC_SCALE_1P81_VPP
Definition: ad9208_api.h:43
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.
Definition: ad9208_adc_api.c:282
AD9208_ANALOG_CFG_REG
#define AD9208_ANALOG_CFG_REG
Definition: ad9208_reg.h:261
ad9208_jesd_get_pll_status
int ad9208_jesd_get_pll_status(ad9208_handle_t *h, uint8_t *pll_status)
Get SERDES PLL Status Flags.
Definition: ad9208_jesd_api.c:418
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:53
AD9208_ADC_SCALE_1P93_VPP
@ AD9208_ADC_SCALE_1P93_VPP
Definition: ad9208_api.h:44
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.
Definition: ad9208_api.c:239
AD9208_CHIP_PIN_CTRL1_REG
#define AD9208_CHIP_PIN_CTRL1_REG
Definition: ad9208_reg.h:61
AD9208_ADC_SCALE_2P04_VPP
@ AD9208_ADC_SCALE_2P04_VPP
Definition: ad9208_api.h:39
ad9208_adc_set_input_scale
int ad9208_adc_set_input_scale(ad9208_handle_t *h, ad9208_adc_scale_range_t full_scale_range)
Definition: ad9208_adc_api.c:220
AD9208_CENTRAL_DIODE_20X_EN
#define AD9208_CENTRAL_DIODE_20X_EN
Definition: ad9208_reg.h:259
chip_decimation_ratio_cfg::dcm
uint8_t dcm
Definition: ad9208_adc_api.c:57
AD9208_BUFF_CFG_N_REG
#define AD9208_BUFF_CFG_N_REG
Definition: ad9208_reg.h:92
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.
Definition: ad9208_adc_api.c:599
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.
Definition: ad9208_jesd_api.c:163
AD9208_ADC_SCALE_1P25_VPP
@ AD9208_ADC_SCALE_1P25_VPP
Definition: ad9208_api.h:41
ad9208_get_decimation
int ad9208_get_decimation(ad9208_handle_t *h, uint8_t *dcm)
Definition: ad9208_adc_api.c:82
ADI_POW2_48
#define ADI_POW2_48
Definition: api_def.h:20
AD9208_IP_CLK_PHASE_ADJ_REG
#define AD9208_IP_CLK_PHASE_ADJ_REG
Definition: ad9208_reg.h:67
signal_coupling_t
signal_coupling_t
Definition: api_def.h:201
adi_dec_filt_data
struct adi_dec_filt_data adi_dec_filt_data
ad9208_handle_t::dev_xfer
spi_xfer_t dev_xfer
Definition: ad9208_api.h:81
ad9208_is_sync_spi_update_enabled
int ad9208_is_sync_spi_update_enabled(ad9208_handle_t *h, uint8_t *enabled)
Definition: ad9208_reg.c:97
AD9208_DDCX_PO1_REG
#define AD9208_DDCX_PO1_REG
Definition: ad9208_reg.h:151
AD9208_ADC_CH_B
@ AD9208_ADC_CH_B
Definition: ad9208_api.h:33
AD9208_DDCX_PO4_REG
#define AD9208_DDCX_PO4_REG
Definition: ad9208_reg.h:154
jesd_param_t
Definition: api_def.h:231
ad9208_jesd_subclass_set
int ad9208_jesd_subclass_set(ad9208_handle_t *h, uint8_t subclass)
Set JESD SYNCHRONIZATION Mode.
Definition: ad9208_jesd_api.c:436
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.
Definition: ad9208_adc_api.c:624
AD9208_DDCX_FTW4_REG
#define AD9208_DDCX_FTW4_REG
Definition: ad9208_reg.h:147
ad9208_reset
int ad9208_reset(ad9208_handle_t *h, uint8_t hw_reset)
Reset the AD9208.
Definition: ad9208_api.c:122
AD9208_DDCX_MBW3_REG
#define AD9208_DDCX_MBW3_REG
Definition: ad9208_reg.h:168
AD9208_ADC_NCO_INVLD
@ AD9208_ADC_NCO_INVLD
Definition: ad9208_api.h:62
API_ERROR_HW_OPEN
#define API_ERROR_HW_OPEN
Definition: api_errors.h:59
ad9208_adc_select_ch
int ad9208_adc_select_ch(ad9208_handle_t *h, uint8_t ch)
ad9208_handle_t::hw_close
hw_close_t hw_close
Definition: ad9208_api.h:86
AD9208_DDCX_FRAC_REG_OFFSET
#define AD9208_DDCX_FRAC_REG_OFFSET
Definition: ad9208_reg.h:157
AD9208_ADC_DCM_MAX
#define AD9208_ADC_DCM_MAX
Definition: ad9208_adc_api.c:23
AD9208_STANDBY
@ AD9208_STANDBY
Definition: ad9208_api.h:68
jesd_sysref_mode_t
jesd_sysref_mode_t
Definition: api_def.h:222
AD9208_DDCX_DCM_FILT_SEL_0
#define AD9208_DDCX_DCM_FILT_SEL_0(x)
Definition: ad9208_reg.h:136
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.
Definition: ad9208_adc_api.c:282
ad9208_handle_t::hw_open
hw_open_t hw_open
Definition: ad9208_api.h:85
ad9208_adc_set_ddc_nco_reset
int ad9208_adc_set_ddc_nco_reset(ad9208_handle_t *h)
API to trigger a DDC Soft Reset.
Definition: ad9208_adc_api.c:868
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.
Definition: ad9208_api.c:308
adi_dec_filt_data::sel_reg_val
uint8_t sel_reg_val
Definition: ad9208_adc_api.c:30
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.
Definition: ad9208_adc_api.c:780
N
#define N(x)
Definition: ad9144.h:1277
AD9208_ADC_BUFF_CURR_600_UA
@ AD9208_ADC_BUFF_CURR_600_UA
Definition: ad9208_api.h:51
ad9208_adc_set_ddc_nco_reset
int ad9208_adc_set_ddc_nco_reset(ad9208_handle_t *h)
API to trigger a DDC Soft Reset.
Definition: ad9208_adc_api.c:868
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.
Definition: ad9208_api.c:355
AD9208_BUFF_CTRL_P
#define AD9208_BUFF_CTRL_P(x)
Definition: ad9208_reg.h:91
AD9208_ADC_CH_ALL
@ AD9208_ADC_CH_ALL
Definition: ad9208_api.h:34
ad9208_reset
int ad9208_reset(ad9208_handle_t *h, uint8_t hw_reset)
Reset the AD9208.
Definition: ad9208_api.c:122
NO_OS_DIV_U64
#define NO_OS_DIV_U64(x, y)
Definition: no_os_util.h:113
AD9208_PLL_LOSSLOCK
@ AD9208_PLL_LOSSLOCK
Definition: ad9208_api.h:75
AD9208_ADC_BUFF_CURR_700_UA
@ AD9208_ADC_BUFF_CURR_700_UA
Definition: ad9208_api.h:52
AD9208_ADC_DCM_MIN
#define AD9208_ADC_DCM_MIN
Definition: ad9208_adc_api.c:22
ad9208_adc_ch_t
ad9208_adc_ch_t
Definition: ad9208_api.h:30
AD9208_CHIP_PDN_MODE
#define AD9208_CHIP_PDN_MODE(x)
Definition: ad9208_reg.h:62
AD9208_ADC_CH_A
@ AD9208_ADC_CH_A
Definition: ad9208_api.h:32
ALL
#define ALL
Definition: api_def.h:27
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.
Definition: ad9208_adc_api.c:520
AD9208_DDCX_MAW4_REG
#define AD9208_DDCX_MAW4_REG
Definition: ad9208_reg.h:162
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.
Definition: ad9208_api.c:239
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.
Definition: ad9208_adc_api.c:427
ad9208_adc_get_overange_status
int ad9208_adc_get_overange_status(ad9208_handle_t *h, uint8_t *status)
Get ADC Over range Status.
Definition: ad9208_signal_monitor_api.c:22
AD9208_DDCX_GAIN_SEL
#define AD9208_DDCX_GAIN_SEL
Definition: ad9208_reg.h:133
AD9208_DDCX_I_IP_CHB_SEL
#define AD9208_DDCX_I_IP_CHB_SEL
Definition: ad9208_reg.h:141
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.
Definition: ad9208_adc_api.c:498
AD9208_IP_CLK_MAX_HZ
#define AD9208_IP_CLK_MAX_HZ
Definition: ad9208_api.c:20
delay_us_t
int(* delay_us_t)(void *user_data, unsigned int us)
Delay for specified number of microseconds. Platform Dependant.
Definition: api_def.h:63
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.
Definition: ad9208_jesd_api.c:512
AD9208_DDCX_FTW1_REG
#define AD9208_DDCX_FTW1_REG
Definition: ad9208_reg.h:144
AD9208_NOF_FC_MAX
#define AD9208_NOF_FC_MAX
Definition: ad9208_adc_api.c:20
AD9208_POWERUP
@ AD9208_POWERUP
Definition: ad9208_api.h:67
AD9208_DATA_FRMT_COMPLEX
@ AD9208_DATA_FRMT_COMPLEX
Definition: ad9208_api.h:26
AD9208_ADC_CLK_MAX_HZ
#define AD9208_ADC_CLK_MAX_HZ
Definition: ad9208_api.c:22
adi_dec_filt_data
Definition: ad9208_adc_api.c:26
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.
Definition: ad9208_adc_api.c:556
api_errors.h
API error codes header file.
AD9208_PROD_ID_MSB_REG
#define AD9208_PROD_ID_MSB_REG
Definition: ad9208_reg.h:43
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.
Definition: ad9208_adc_api.c:742
NCO_RESET_PERIOD_US
#define NCO_RESET_PERIOD_US
Definition: ad9208_adc_api.c:24
AD9208_ADC_NCO_VIF
@ AD9208_ADC_NCO_VIF
Definition: ad9208_api.h:59
AD9208_ADC_BUFF_CURR_1000_UA
@ AD9208_ADC_BUFF_CURR_1000_UA
Definition: ad9208_api.h:54
ad9208_adc_buff_curr_t
ad9208_adc_buff_curr_t
Definition: ad9208_api.h:48
chip_decimation_ratio_cfg::dcm_cfg
uint8_t dcm_cfg
Definition: ad9208_adc_api.c:58
API_ERROR_HW_CLOSE
#define API_ERROR_HW_CLOSE
Definition: api_errors.h:61
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.
Definition: ad9208_api.c:355
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.
Definition: ad9208_adc_api.c:599
spi_xfer_t
int(* spi_xfer_t)(void *user_data, uint8_t *indata, uint8_t *outdata, int size_bytes)
Platform dependent SPI access functions.
Definition: api_def.h:48
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.
Definition: ad9208_api.c:263
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.
Definition: ad9208_adc_api.c:624
AD9208_POWERDOWN
@ AD9208_POWERDOWN
Definition: ad9208_api.h:69
COUPLING_UNKNOWN
@ COUPLING_UNKNOWN
Definition: api_def.h:204
ad9208_adc_get_channel_select
int ad9208_adc_get_channel_select(ad9208_handle_t *h, uint8_t *ch)
Get AD9208 ADC Channel Select.
Definition: ad9208_api.c:178
reset_pin_ctrl_t
int(* reset_pin_ctrl_t)(void *user_data, uint8_t enable)
RESETB PIN CONTROL FUNCTION.
Definition: api_def.h:153
AD9208_TEMP_DIODE_CTRL_REG
#define AD9208_TEMP_DIODE_CTRL_REG
Definition: ad9208_reg.h:257
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.
Definition: ad9208_adc_api.c:399
ADI_GET_BYTE
#define ADI_GET_BYTE(w, p)
Definition: api_def.h:26
AD9208_DDCX_FTW2_REG
#define AD9208_DDCX_FTW2_REG
Definition: ad9208_reg.h:145
AD9208_DDCX_COMPLEX_TO_REAL
#define AD9208_DDCX_COMPLEX_TO_REAL
Definition: ad9208_reg.h:135
AD9208_DEV_CFG_REG
#define AD9208_DEV_CFG_REG
Definition: ad9208_reg.h:38
AD9208_ADC_CLK_MIN_HZ
#define AD9208_ADC_CLK_MIN_HZ
Definition: ad9208_api.c:21
AD9208_IP_CLK_CFG_REG
#define AD9208_IP_CLK_CFG_REG
Definition: ad9208_reg.h:65
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.
Definition: ad9208_adc_api.c:649
ad9208_jesd_serdes_pll_flg_t
ad9208_jesd_serdes_pll_flg_t
Definition: ad9208_api.h:73
ad9208_adc_temp_sensor_set_enable
int ad9208_adc_temp_sensor_set_enable(ad9208_handle_t *h, uint8_t en)
Enable Temp Sensor.
Definition: ad9208_adc_api.c:912
AD9208_IP_CLK_DIV
#define AD9208_IP_CLK_DIV(x)
Definition: ad9208_reg.h:66
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.
Definition: ad9208_signal_monitor_api.c:41
AD9208_ADC_DCM_REG
#define AD9208_ADC_DCM_REG
Definition: ad9208_reg.h:102
AD9208_IP_CLK_DCS1_REG
#define AD9208_IP_CLK_DCS1_REG
Definition: ad9208_reg.h:71
ad9208_reg.h
AD9208 SPI Register Definition Header File.
AD9208_CHIP_PDN_PIN_DISABLE
#define AD9208_CHIP_PDN_PIN_DISABLE
Definition: ad9208_reg.h:60
AD9208_ADC_BUFF_CURR_400_UA
@ AD9208_ADC_BUFF_CURR_400_UA
Definition: ad9208_api.h:49
ad9208_adc_nco_mode_t
ad9208_adc_nco_mode_t
Definition: ad9208_api.h:58
AD9208_EXT_VCM_BUFF_CURR
#define AD9208_EXT_VCM_BUFF_CURR(x)
Definition: ad9208_reg.h:255
AD9208_DDCX_MAW3_REG
#define AD9208_DDCX_MAW3_REG
Definition: ad9208_reg.h:161
ad9208_handle_t::delay_us
delay_us_t delay_us
Definition: ad9208_api.h:84
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.
Definition: ad9208_adc_api.c:427
ad9208_api.h
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.
Definition: ad9208_api.c:308
AD9208_VREF_CTRL_REG
#define AD9208_VREF_CTRL_REG
Definition: ad9208_reg.h:250
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.
Definition: ad9208_adc_api.c:649
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.
Definition: ad9208_api.c:197
AD9208_DC_OFFSET_CAL_CTRL
#define AD9208_DC_OFFSET_CAL_CTRL
Definition: ad9208_reg.h:247
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.
Definition: ad9208_jesd_api.c:457
ad9208_jesd_enable_scrambler
int ad9208_jesd_enable_scrambler(ad9208_handle_t *h, uint8_t en)
Enable the scrambler for the JESD Link.
Definition: ad9208_jesd_api.c:311
API_ERROR_INVALID_PARAM
#define API_ERROR_INVALID_PARAM
Definition: api_errors.h:35
api_def.h
API definitions header file.
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.
Definition: ad9208_api.c:297
AD9208_DC_OFFSET_CAL_EN
#define AD9208_DC_OFFSET_CAL_EN
Definition: ad9208_reg.h:248
AD9208_ADC_MODE_REG
#define AD9208_ADC_MODE_REG
Definition: ad9208_reg.h:98
AD9208_DDC_UPDATE_MODE
#define AD9208_DDC_UPDATE_MODE
Definition: ad9208_reg.h:125
AD9208_IF_CFG_A_REG
#define AD9208_IF_CFG_A_REG
Definition: ad9208_reg.h:36
AD9208_BUFF_CFG_P_REG
#define AD9208_BUFF_CFG_P_REG
Definition: ad9208_reg.h:90
gcd
uint32_t gcd(uint32_t x, uint32_t y)
Computes the greatest common divider of two numbers.
Definition: adf4156.c:214
COUPLING_AC
@ COUPLING_AC
Definition: api_def.h:202
NULL
#define NULL
Definition: wrapper.h:64
AD9208_IP_CLK_PHASE_ADJ
#define AD9208_IP_CLK_PHASE_ADJ(x)
Definition: ad9208_reg.h:68
AD9208_BUFF_CTRL_N
#define AD9208_BUFF_CTRL_N(x)
Definition: ad9208_reg.h:93
AD9208_ADC_NCO_ZIF
@ AD9208_ADC_NCO_ZIF
Definition: ad9208_api.h:60
ad9208_adc_set_channel_select
int ad9208_adc_set_channel_select(ad9208_handle_t *h, uint8_t ch)
Set AD9208 ADC Channel Select.
Definition: ad9208_api.c:162
AD9208_ADC_SCALE_1P7_VPP
@ AD9208_ADC_SCALE_1P7_VPP
Definition: ad9208_api.h:42
adi_chip_id_t
Definition: api_def.h:164
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.
Definition: ad9208_api.c:197
AD9208_DDCX_FTW3_REG
#define AD9208_DDCX_FTW3_REG
Definition: ad9208_reg.h:146
ADI_MAXUINT48
#define ADI_MAXUINT48
Definition: api_def.h:21
AD9208_PLL_LOCK_STAT
@ AD9208_PLL_LOCK_STAT
Definition: ad9208_api.h:74
AD9208_DDCX_Q_IP_CHB_SEL
#define AD9208_DDCX_Q_IP_CHB_SEL
Definition: ad9208_reg.h:140
AD9208_ADC_NCO_TEST
@ AD9208_ADC_NCO_TEST
Definition: ad9208_api.h:61
AD9208_CH_INDEX_REG
#define AD9208_CH_INDEX_REG
Definition: ad9208_reg.h:45
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.
Definition: ad9208_adc_api.c:742
DIV_U64_REM
#define DIV_U64_REM(x, y, r)
Definition: api_def.h:29
adi_dec_filt_data::dec_complex
uint8_t dec_complex
Definition: ad9208_adc_api.c:27
AD9208_DDCX_MAW2_REG
#define AD9208_DDCX_MAW2_REG
Definition: ad9208_reg.h:160
AD9208_DDCX_DCM_FILT_SEL_1
#define AD9208_DDCX_DCM_FILT_SEL_1(x)
Definition: ad9208_reg.h:139
AD9208_DDCX_MBW1_REG
#define AD9208_DDCX_MBW1_REG
Definition: ad9208_reg.h:166
API_ERROR_OK
#define API_ERROR_OK
Definition: api_errors.h:25
AD9208_DDCX_DATA_SEL_REG
#define AD9208_DDCX_DATA_SEL_REG
Definition: ad9208_reg.h:138
AD9208_ADC_CH_NONE
@ AD9208_ADC_CH_NONE
Definition: ad9208_api.h:31
AD9208_ADC_MODE
#define AD9208_ADC_MODE(x)
Definition: ad9208_reg.h:99
ad9208_adc_set_input_scale
int ad9208_adc_set_input_scale(ad9208_handle_t *h, ad9208_adc_scale_range_t full_scale_range)
Definition: ad9208_adc_api.c:220
ad9208_adc_temp_sensor_set_enable
int ad9208_adc_temp_sensor_set_enable(ad9208_handle_t *h, uint8_t en)
Enable Temp Sensor.
Definition: ad9208_adc_api.c:912
API_ERROR_RESET_PIN_CTRL
#define API_ERROR_RESET_PIN_CTRL
Definition: api_errors.h:55
hw_open_t
int(* hw_open_t)(void *user_data)
Platform hardware initialisation for the AD9164 Device.
Definition: api_def.h:81
HW_RESET_PERIOD_US
#define HW_RESET_PERIOD_US
Definition: ad9208_api.c:23
AD9208_DDCX_FTW5_REG
#define AD9208_DDCX_FTW5_REG
Definition: ad9208_reg.h:148
no_os_util.h
Implementation of utility functions.
AD9208_DDCX_MAW1_REG
#define AD9208_DDCX_MAW1_REG
Definition: ad9208_reg.h:159
AD9208_DDCX_MBW0_REG
#define AD9208_DDCX_MBW0_REG
Definition: ad9208_reg.h:165
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.
Definition: ad9208_adc_api.c:378
AD9208_EXT_VCM_CTRL_REG
#define AD9208_EXT_VCM_CTRL_REG
Definition: ad9208_reg.h:253
AD9208_DDCX_CTRL0_REG
#define AD9208_DDCX_CTRL0_REG
Definition: ad9208_reg.h:131
AD9208_ADC_DCM_RATE
#define AD9208_ADC_DCM_RATE(x)
Definition: ad9208_reg.h:103
AD9208_TRM_VREF
#define AD9208_TRM_VREF(x)
Definition: ad9208_reg.h:265
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.
Definition: ad9208_jesd_api.c:389
AD9208_DDCX_MIXER_SEL
#define AD9208_DDCX_MIXER_SEL
Definition: ad9208_reg.h:132
AD9208_DDCX_PO3_REG
#define AD9208_DDCX_PO3_REG
Definition: ad9208_reg.h:153
ad9208_adc_data_frmt_t
ad9208_adc_data_frmt_t
Definition: ad9208_api.h:24
AD9208_ADC_Q_IGNORE
#define AD9208_ADC_Q_IGNORE
Definition: ad9208_reg.h:100
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.
Definition: ad9208_jesd_api.c:547
ad9208_adc_scale_range_t
ad9208_adc_scale_range_t
Definition: ad9208_api.h:38
adi_dec_filt_data::ctrl_reg_val
uint8_t ctrl_reg_val
Definition: ad9208_adc_api.c:29
AD9208_DDCX_PO2_REG
#define AD9208_DDCX_PO2_REG
Definition: ad9208_reg.h:152
AD9208_DDCX_MBW2_REG
#define AD9208_DDCX_MBW2_REG
Definition: ad9208_reg.h:167
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.
Definition: ad9208_adc_api.c:378
AD9208_DDCX_MBW4_REG
#define AD9208_DDCX_MBW4_REG
Definition: ad9208_reg.h:169
ad9208_pdn_mode_t
ad9208_pdn_mode_t
Definition: ad9208_api.h:66
ad9208_register_chip_transfer
int ad9208_register_chip_transfer(ad9208_handle_t *h)
Definition: ad9208_reg.c:113
ad9208_jesd_enable_link
int ad9208_jesd_enable_link(ad9208_handle_t *h, uint8_t en)
Enable JESD Link.
Definition: ad9208_jesd_api.c:132
AD9208_IF_CFG_B_REG
#define AD9208_IF_CFG_B_REG
Definition: ad9208_reg.h:37
AD9208_DDCX_PO5_REG
#define AD9208_DDCX_PO5_REG
Definition: ad9208_reg.h:155
U64MSB
#define U64MSB
Definition: ad9208_adc_api.c:54
chip_id
chip_id
Definition: ad9172.h:57
AD9208_DDCX_NCO_IF_MODE
#define AD9208_DDCX_NCO_IF_MODE(x)
Definition: ad9208_reg.h:134
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.
Definition: ad9208_reg.c:21
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.
Definition: ad9208_api.c:297