no-OS
ad9208_api.h
Go to the documentation of this file.
1 
16 #ifndef __AD9208API_H__
17 #define __AD9208API_H__
18 
19 #include "api_def.h"
20 #include "no_os_util.h"
21 
23 typedef enum {
27 
29 typedef enum {
35 
37 typedef enum {
45 
47 typedef enum {
55 
57 typedef enum {
63 
65 typedef enum {
70 
72 typedef enum {
76 
78 typedef struct {
79  void *user_data;
86  uint64_t adc_clk_freq_hz;
88 
110 
128 
151 int ad9208_reset(ad9208_handle_t *h, uint8_t hw_reset);
152 
180  uint8_t pin_enable, ad9208_pdn_mode_t pin_mode);
181 
203  uint64_t clk_freq_hz, uint8_t div);
204 
224 
238 int ad9208_get_adc_clk_freq(ad9208_handle_t *h, uint64_t *adc_clk_freq_hz);
239 
262 
285 
308 
332 int ad9208_adc_set_clk_phase(ad9208_handle_t *h, uint8_t phase_adj);
333 
365  signal_coupling_t analog_input_mode,
366  uint8_t ext_vref,
367  ad9208_adc_scale_range_t full_scale_range);
368 
394  ad9208_adc_buff_curr_t buff_curr_n,
395  ad9208_adc_buff_curr_t buff_curr_p,
396  ad9208_adc_buff_curr_t vcm_buff);
397 
416 
437 int ad9208_adc_set_fc_ch_mode(ad9208_handle_t *h, uint8_t fc_ch);
438 
459 int ad9208_adc_set_dcm_mode(ad9208_handle_t *h, uint8_t dcm);
460 
476  ad9208_adc_data_frmt_t ip_data_frmt,
477  ad9208_adc_data_frmt_t op_data_frmt);
478 
501 
522  uint8_t ddc_ch, ad9208_adc_ch_t i_data_src,
523  ad9208_adc_ch_t q_data_src);
524 
543 int ad9208_adc_set_ddc_dcm(ad9208_handle_t *h, uint8_t ddc_ch, uint8_t dcm);
544 
565  uint8_t ddc_ch, ad9208_adc_nco_mode_t mode);
566 
587 int ad9208_adc_set_ddc_nco_ftw(ad9208_handle_t *h, uint8_t ddc_ch,
588  uint64_t ftw, uint64_t mod_a, uint64_t mod_b);
589 
608 int ad9208_adc_set_ddc_nco(ad9208_handle_t *h, uint8_t ddc_ch,
609  const int64_t carrier_freq_hz);
610 
627 int ad9208_adc_set_ddc_nco_phase(ad9208_handle_t *h, uint8_t ddc_ch,
628  uint64_t po);
629 
649  uint8_t ddc_ch, uint8_t gain_db);
689  jesd_param_t jesd_param,
690  uint64_t *lane_rate_kbps);
691 
710 
732  uint8_t logical_lane, uint8_t physical_lane);
733 
751 int ad9208_jesd_get_lane_xbar(ad9208_handle_t *h, uint8_t *phy_log_map);
752 
768 
784 int ad9208_jesd_enable_link(ad9208_handle_t *h, uint8_t en);
785 
806 int ad9208_jesd_get_pll_status(ad9208_handle_t *h, uint8_t *pll_status);
807 
822 int ad9208_jesd_subclass_set(ad9208_handle_t *h, uint8_t subclass);
823 
841  jesd_sysref_mode_t mode, uint8_t sysref_count);
842 
864  uint8_t sysref_edge_sel, uint8_t clk_edge_sel,
865  uint8_t neg_window_skew,
866  uint8_t pos_window_skew);
867 
884  uint8_t *hold_status, uint8_t *setup_status,
885  uint8_t *phase_status);
886 
905  uint8_t timestamp_en, uint8_t control_bit,
906  uint8_t delay);
922 int ad9208_jesd_syref_lmfc_offset_set(ad9208_handle_t *h, uint8_t offset);
923 
948 int ad9208_adc_get_overange_status(ad9208_handle_t *h, uint8_t *status);
949 
974  uint16_t upper_dbfs, uint16_t lower_dbfs,
975  uint16_t dwell_time);
1016 
1032  const uint16_t address, const uint8_t data);
1033 
1051  const uint16_t address, uint8_t *data);
1063 int ad9208_get_revision(ad9208_handle_t *h, uint8_t *rev_major,
1064  uint8_t *rev_minor, uint8_t *rev_rc);
1065 
1067  ad9208_adc_scale_range_t full_scale_range);
1068 
1069 int ad9208_get_decimation(ad9208_handle_t *h, uint8_t *dcm);
1070 
1071 #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:161
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:45
AD9208_ADC_BUFF_CURR_800_UA
@ AD9208_ADC_BUFF_CURR_800_UA
Definition: ad9208_api.h:52
AD9208_FULL_SCALE_CFG_REG
#define AD9208_FULL_SCALE_CFG_REG
Definition: ad9208_reg.h:263
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:895
AD9208_DATA_FRMT_REAL
@ AD9208_DATA_FRMT_REAL
Definition: ad9208_api.h:24
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:452
AD9208_ADC_BUFF_CURR_500_UA
@ AD9208_ADC_BUFF_CURR_500_UA
Definition: ad9208_api.h:49
AD9208_EXT_VCM_BUFF
#define AD9208_EXT_VCM_BUFF
Definition: ad9208_reg.h:253
AD9208_PDN_MODE
#define AD9208_PDN_MODE(x)
Definition: ad9208_reg.h:38
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:647
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:262
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:398
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:55
AD9208_EXT_VREF_MODE
#define AD9208_EXT_VREF_MODE
Definition: ad9208_reg.h:250
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:177
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:895
AD9208_IP_CLK_DCS2_REG
#define AD9208_IP_CLK_DCS2_REG
Definition: ad9208_reg.h:71
ad9208_deinit
int ad9208_deinit(ad9208_handle_t *h)
De-initialize the AD9208 Device.
Definition: ad9208_api.c:73
AD9208_ADC_SCALE_1P13_VPP
@ AD9208_ADC_SCALE_1P13_VPP
Definition: ad9208_api.h:39
AD9208_DC_COUPLE_EN
#define AD9208_DC_COUPLE_EN(x)
Definition: ad9208_reg.h:261
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:519
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:333
AD9208_NCO_SOFT_RESET
#define AD9208_NCO_SOFT_RESET
Definition: ad9208_reg.h:125
AD9208_CHIP_PIN_CTRL0_REG
#define AD9208_CHIP_PIN_CTRL0_REG
Definition: ad9208_reg.h:58
AD9208_DDCX_MBW5_REG
#define AD9208_DDCX_MBW5_REG
Definition: ad9208_reg.h:169
AD9208_PROD_ID_LSB_REG
#define AD9208_PROD_ID_LSB_REG
Definition: ad9208_reg.h:41
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:779
AD9208_CHIP_GRADE_REG
#define AD9208_CHIP_GRADE_REG
Definition: ad9208_reg.h:43
AD9208_DDCX_MAW5_REG
#define AD9208_DDCX_MAW5_REG
Definition: ad9208_reg.h:162
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:452
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:555
ad9208_handle_t
Definition: ad9208_api.h:78
COUPLING_DC
@ COUPLING_DC
Definition: api_def.h:202
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:262
ad9208_handle_t::user_data
void * user_data
Definition: ad9208_api.h:79
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:334
AD9208_CHIP_TYPE_REG
#define AD9208_CHIP_TYPE_REG
Definition: ad9208_reg.h:40
ad9208_handle_t::reset_pin_ctrl
reset_pin_ctrl_t reset_pin_ctrl
Definition: ad9208_api.h:81
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:87
AD9208_DDC_SYNC_CTRL_REG
#define AD9208_DDC_SYNC_CTRL_REG
Definition: ad9208_reg.h:123
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:40
AD9208_IP_CLK_MIN_HZ
#define AD9208_IP_CLK_MIN_HZ
Definition: ad9208_api.c:18
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:98
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:45
NO_OS_S16_MAX
#define NO_OS_S16_MAX
Definition: no_os_util.h:113
ad9208_handle_t::adc_clk_freq_hz
uint64_t adc_clk_freq_hz
Definition: ad9208_api.h:86
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:333
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:572
AD9208_DDCX_MAW0_REG
#define AD9208_DDCX_MAW0_REG
Definition: ad9208_reg.h:157
ad9208_deinit
int ad9208_deinit(ad9208_handle_t *h)
De-initialize the AD9208 Device.
Definition: ad9208_api.c:73
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:87
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:497
AD9208_DDCX_PO0_REG
#define AD9208_DDCX_PO0_REG
Definition: ad9208_reg.h:149
AD9208_DDCX_REG_OFFSET
#define AD9208_DDCX_REG_OFFSET
Definition: ad9208_reg.h:129
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:142
ad9208_get_decimation
int ad9208_get_decimation(ad9208_handle_t *h, uint8_t *dcm)
Definition: ad9208_adc_api.c:81
adi_dec_filt_data::dec_real
uint8_t dec_real
Definition: ad9208_adc_api.c:27
AD9208_ADC_SCALE_1P81_VPP
@ AD9208_ADC_SCALE_1P81_VPP
Definition: ad9208_api.h:42
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:281
AD9208_ANALOG_CFG_REG
#define AD9208_ANALOG_CFG_REG
Definition: ad9208_reg.h:260
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:417
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
AD9208_ADC_SCALE_1P93_VPP
@ AD9208_ADC_SCALE_1P93_VPP
Definition: ad9208_api.h:43
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:238
AD9208_CHIP_PIN_CTRL1_REG
#define AD9208_CHIP_PIN_CTRL1_REG
Definition: ad9208_reg.h:60
AD9208_ADC_SCALE_2P04_VPP
@ AD9208_ADC_SCALE_2P04_VPP
Definition: ad9208_api.h:38
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:219
AD9208_CENTRAL_DIODE_20X_EN
#define AD9208_CENTRAL_DIODE_20X_EN
Definition: ad9208_reg.h:258
chip_decimation_ratio_cfg::dcm
uint8_t dcm
Definition: ad9208_adc_api.c:56
AD9208_BUFF_CFG_N_REG
#define AD9208_BUFF_CFG_N_REG
Definition: ad9208_reg.h:91
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:598
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:162
AD9208_ADC_SCALE_1P25_VPP
@ AD9208_ADC_SCALE_1P25_VPP
Definition: ad9208_api.h:40
ad9208_get_decimation
int ad9208_get_decimation(ad9208_handle_t *h, uint8_t *dcm)
Definition: ad9208_adc_api.c:81
ADI_POW2_48
#define ADI_POW2_48
Definition: api_def.h:19
AD9208_IP_CLK_PHASE_ADJ_REG
#define AD9208_IP_CLK_PHASE_ADJ_REG
Definition: ad9208_reg.h:66
signal_coupling_t
signal_coupling_t
Definition: api_def.h:200
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:80
ad9208_is_sync_spi_update_enabled
int ad9208_is_sync_spi_update_enabled(ad9208_handle_t *h, uint8_t *enabled)
Definition: ad9208_reg.c:96
AD9208_DDCX_PO1_REG
#define AD9208_DDCX_PO1_REG
Definition: ad9208_reg.h:150
AD9208_ADC_CH_B
@ AD9208_ADC_CH_B
Definition: ad9208_api.h:32
AD9208_DDCX_PO4_REG
#define AD9208_DDCX_PO4_REG
Definition: ad9208_reg.h:153
jesd_param_t
Definition: api_def.h:230
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:435
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:623
AD9208_DDCX_FTW4_REG
#define AD9208_DDCX_FTW4_REG
Definition: ad9208_reg.h:146
ad9208_reset
int ad9208_reset(ad9208_handle_t *h, uint8_t hw_reset)
Reset the AD9208.
Definition: ad9208_api.c:121
AD9208_DDCX_MBW3_REG
#define AD9208_DDCX_MBW3_REG
Definition: ad9208_reg.h:167
AD9208_ADC_NCO_INVLD
@ AD9208_ADC_NCO_INVLD
Definition: ad9208_api.h:61
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:85
AD9208_DDCX_FRAC_REG_OFFSET
#define AD9208_DDCX_FRAC_REG_OFFSET
Definition: ad9208_reg.h:156
AD9208_ADC_DCM_MAX
#define AD9208_ADC_DCM_MAX
Definition: ad9208_adc_api.c:22
AD9208_STANDBY
@ AD9208_STANDBY
Definition: ad9208_api.h:67
jesd_sysref_mode_t
jesd_sysref_mode_t
Definition: api_def.h:221
AD9208_DDCX_DCM_FILT_SEL_0
#define AD9208_DDCX_DCM_FILT_SEL_0(x)
Definition: ad9208_reg.h:135
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:281
ad9208_handle_t::hw_open
hw_open_t hw_open
Definition: ad9208_api.h:84
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:867
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:307
adi_dec_filt_data::sel_reg_val
uint8_t sel_reg_val
Definition: ad9208_adc_api.c:29
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:779
N
#define N(x)
Definition: ad9144.h:1269
AD9208_ADC_BUFF_CURR_600_UA
@ AD9208_ADC_BUFF_CURR_600_UA
Definition: ad9208_api.h:50
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:867
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:354
AD9208_BUFF_CTRL_P
#define AD9208_BUFF_CTRL_P(x)
Definition: ad9208_reg.h:90
AD9208_ADC_CH_ALL
@ AD9208_ADC_CH_ALL
Definition: ad9208_api.h:33
ad9208_reset
int ad9208_reset(ad9208_handle_t *h, uint8_t hw_reset)
Reset the AD9208.
Definition: ad9208_api.c:121
NO_OS_DIV_U64
#define NO_OS_DIV_U64(x, y)
Definition: no_os_util.h:115
AD9208_PLL_LOSSLOCK
@ AD9208_PLL_LOSSLOCK
Definition: ad9208_api.h:74
AD9208_ADC_BUFF_CURR_700_UA
@ AD9208_ADC_BUFF_CURR_700_UA
Definition: ad9208_api.h:51
AD9208_ADC_DCM_MIN
#define AD9208_ADC_DCM_MIN
Definition: ad9208_adc_api.c:21
ad9208_adc_ch_t
ad9208_adc_ch_t
Definition: ad9208_api.h:29
AD9208_CHIP_PDN_MODE
#define AD9208_CHIP_PDN_MODE(x)
Definition: ad9208_reg.h:61
AD9208_ADC_CH_A
@ AD9208_ADC_CH_A
Definition: ad9208_api.h:31
ALL
#define ALL
Definition: api_def.h:26
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:519
AD9208_DDCX_MAW4_REG
#define AD9208_DDCX_MAW4_REG
Definition: ad9208_reg.h:161
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:238
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:426
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:21
AD9208_DDCX_GAIN_SEL
#define AD9208_DDCX_GAIN_SEL
Definition: ad9208_reg.h:132
AD9208_DDCX_I_IP_CHB_SEL
#define AD9208_DDCX_I_IP_CHB_SEL
Definition: ad9208_reg.h:140
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:497
AD9208_IP_CLK_MAX_HZ
#define AD9208_IP_CLK_MAX_HZ
Definition: ad9208_api.c:19
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:62
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:511
AD9208_DDCX_FTW1_REG
#define AD9208_DDCX_FTW1_REG
Definition: ad9208_reg.h:143
AD9208_NOF_FC_MAX
#define AD9208_NOF_FC_MAX
Definition: ad9208_adc_api.c:19
AD9208_POWERUP
@ AD9208_POWERUP
Definition: ad9208_api.h:66
AD9208_DATA_FRMT_COMPLEX
@ AD9208_DATA_FRMT_COMPLEX
Definition: ad9208_api.h:25
AD9208_ADC_CLK_MAX_HZ
#define AD9208_ADC_CLK_MAX_HZ
Definition: ad9208_api.c:21
adi_dec_filt_data
Definition: ad9208_adc_api.c:25
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:555
api_errors.h
API error codes header file.
AD9208_PROD_ID_MSB_REG
#define AD9208_PROD_ID_MSB_REG
Definition: ad9208_reg.h:42
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:741
NCO_RESET_PERIOD_US
#define NCO_RESET_PERIOD_US
Definition: ad9208_adc_api.c:23
AD9208_ADC_NCO_VIF
@ AD9208_ADC_NCO_VIF
Definition: ad9208_api.h:58
AD9208_ADC_BUFF_CURR_1000_UA
@ AD9208_ADC_BUFF_CURR_1000_UA
Definition: ad9208_api.h:53
ad9208_adc_buff_curr_t
ad9208_adc_buff_curr_t
Definition: ad9208_api.h:47
chip_decimation_ratio_cfg::dcm_cfg
uint8_t dcm_cfg
Definition: ad9208_adc_api.c:57
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:354
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:598
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:47
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:262
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:623
AD9208_POWERDOWN
@ AD9208_POWERDOWN
Definition: ad9208_api.h:68
COUPLING_UNKNOWN
@ COUPLING_UNKNOWN
Definition: api_def.h:203
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:177
reset_pin_ctrl_t
int(* reset_pin_ctrl_t)(void *user_data, uint8_t enable)
RESETB PIN CONTROL FUNCTION.
Definition: api_def.h:152
AD9208_TEMP_DIODE_CTRL_REG
#define AD9208_TEMP_DIODE_CTRL_REG
Definition: ad9208_reg.h:256
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:398
ADI_GET_BYTE
#define ADI_GET_BYTE(w, p)
Definition: api_def.h:25
AD9208_DDCX_FTW2_REG
#define AD9208_DDCX_FTW2_REG
Definition: ad9208_reg.h:144
AD9208_DDCX_COMPLEX_TO_REAL
#define AD9208_DDCX_COMPLEX_TO_REAL
Definition: ad9208_reg.h:134
AD9208_DEV_CFG_REG
#define AD9208_DEV_CFG_REG
Definition: ad9208_reg.h:37
AD9208_ADC_CLK_MIN_HZ
#define AD9208_ADC_CLK_MIN_HZ
Definition: ad9208_api.c:20
AD9208_IP_CLK_CFG_REG
#define AD9208_IP_CLK_CFG_REG
Definition: ad9208_reg.h:64
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:648
ad9208_jesd_serdes_pll_flg_t
ad9208_jesd_serdes_pll_flg_t
Definition: ad9208_api.h:72
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:911
AD9208_IP_CLK_DIV
#define AD9208_IP_CLK_DIV(x)
Definition: ad9208_reg.h:65
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:40
AD9208_ADC_DCM_REG
#define AD9208_ADC_DCM_REG
Definition: ad9208_reg.h:101
AD9208_IP_CLK_DCS1_REG
#define AD9208_IP_CLK_DCS1_REG
Definition: ad9208_reg.h:70
ad9208_reg.h
AD9208 SPI Register Definition Header File.
AD9208_CHIP_PDN_PIN_DISABLE
#define AD9208_CHIP_PDN_PIN_DISABLE
Definition: ad9208_reg.h:59
AD9208_ADC_BUFF_CURR_400_UA
@ AD9208_ADC_BUFF_CURR_400_UA
Definition: ad9208_api.h:48
ad9208_adc_nco_mode_t
ad9208_adc_nco_mode_t
Definition: ad9208_api.h:57
AD9208_EXT_VCM_BUFF_CURR
#define AD9208_EXT_VCM_BUFF_CURR(x)
Definition: ad9208_reg.h:254
AD9208_DDCX_MAW3_REG
#define AD9208_DDCX_MAW3_REG
Definition: ad9208_reg.h:160
ad9208_handle_t::delay_us
delay_us_t delay_us
Definition: ad9208_api.h:83
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:426
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:307
AD9208_VREF_CTRL_REG
#define AD9208_VREF_CTRL_REG
Definition: ad9208_reg.h:249
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:648
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:196
AD9208_DC_OFFSET_CAL_CTRL
#define AD9208_DC_OFFSET_CAL_CTRL
Definition: ad9208_reg.h:246
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:456
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:310
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:296
AD9208_DC_OFFSET_CAL_EN
#define AD9208_DC_OFFSET_CAL_EN
Definition: ad9208_reg.h:247
AD9208_ADC_MODE_REG
#define AD9208_ADC_MODE_REG
Definition: ad9208_reg.h:97
AD9208_DDC_UPDATE_MODE
#define AD9208_DDC_UPDATE_MODE
Definition: ad9208_reg.h:124
AD9208_IF_CFG_A_REG
#define AD9208_IF_CFG_A_REG
Definition: ad9208_reg.h:35
AD9208_BUFF_CFG_P_REG
#define AD9208_BUFF_CFG_P_REG
Definition: ad9208_reg.h:89
gcd
uint32_t gcd(uint32_t x, uint32_t y)
Computes the greatest common divider of two numbers.
Definition: adf4156.c:208
COUPLING_AC
@ COUPLING_AC
Definition: api_def.h:201
NULL
#define NULL
Definition: wrapper.h:64
AD9208_IP_CLK_PHASE_ADJ
#define AD9208_IP_CLK_PHASE_ADJ(x)
Definition: ad9208_reg.h:67
AD9208_BUFF_CTRL_N
#define AD9208_BUFF_CTRL_N(x)
Definition: ad9208_reg.h:92
AD9208_ADC_NCO_ZIF
@ AD9208_ADC_NCO_ZIF
Definition: ad9208_api.h:59
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:161
AD9208_ADC_SCALE_1P7_VPP
@ AD9208_ADC_SCALE_1P7_VPP
Definition: ad9208_api.h:41
adi_chip_id_t
Definition: api_def.h:163
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:196
AD9208_DDCX_FTW3_REG
#define AD9208_DDCX_FTW3_REG
Definition: ad9208_reg.h:145
ADI_MAXUINT48
#define ADI_MAXUINT48
Definition: api_def.h:20
AD9208_PLL_LOCK_STAT
@ AD9208_PLL_LOCK_STAT
Definition: ad9208_api.h:73
AD9208_DDCX_Q_IP_CHB_SEL
#define AD9208_DDCX_Q_IP_CHB_SEL
Definition: ad9208_reg.h:139
AD9208_ADC_NCO_TEST
@ AD9208_ADC_NCO_TEST
Definition: ad9208_api.h:60
AD9208_CH_INDEX_REG
#define AD9208_CH_INDEX_REG
Definition: ad9208_reg.h:44
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:741
DIV_U64_REM
#define DIV_U64_REM(x, y, r)
Definition: api_def.h:28
adi_dec_filt_data::dec_complex
uint8_t dec_complex
Definition: ad9208_adc_api.c:26
AD9208_DDCX_MAW2_REG
#define AD9208_DDCX_MAW2_REG
Definition: ad9208_reg.h:159
AD9208_DDCX_DCM_FILT_SEL_1
#define AD9208_DDCX_DCM_FILT_SEL_1(x)
Definition: ad9208_reg.h:138
AD9208_DDCX_MBW1_REG
#define AD9208_DDCX_MBW1_REG
Definition: ad9208_reg.h:165
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:137
AD9208_ADC_CH_NONE
@ AD9208_ADC_CH_NONE
Definition: ad9208_api.h:30
AD9208_ADC_MODE
#define AD9208_ADC_MODE(x)
Definition: ad9208_reg.h:98
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:219
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:911
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:80
HW_RESET_PERIOD_US
#define HW_RESET_PERIOD_US
Definition: ad9208_api.c:22
AD9208_DDCX_FTW5_REG
#define AD9208_DDCX_FTW5_REG
Definition: ad9208_reg.h:147
no_os_util.h
Header file of utility functions.
AD9208_DDCX_MAW1_REG
#define AD9208_DDCX_MAW1_REG
Definition: ad9208_reg.h:158
AD9208_DDCX_MBW0_REG
#define AD9208_DDCX_MBW0_REG
Definition: ad9208_reg.h:164
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:377
AD9208_EXT_VCM_CTRL_REG
#define AD9208_EXT_VCM_CTRL_REG
Definition: ad9208_reg.h:252
AD9208_DDCX_CTRL0_REG
#define AD9208_DDCX_CTRL0_REG
Definition: ad9208_reg.h:130
AD9208_ADC_DCM_RATE
#define AD9208_ADC_DCM_RATE(x)
Definition: ad9208_reg.h:102
AD9208_TRM_VREF
#define AD9208_TRM_VREF(x)
Definition: ad9208_reg.h:264
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:388
AD9208_DDCX_MIXER_SEL
#define AD9208_DDCX_MIXER_SEL
Definition: ad9208_reg.h:131
AD9208_DDCX_PO3_REG
#define AD9208_DDCX_PO3_REG
Definition: ad9208_reg.h:152
ad9208_adc_data_frmt_t
ad9208_adc_data_frmt_t
Definition: ad9208_api.h:23
AD9208_ADC_Q_IGNORE
#define AD9208_ADC_Q_IGNORE
Definition: ad9208_reg.h:99
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:546
ad9208_adc_scale_range_t
ad9208_adc_scale_range_t
Definition: ad9208_api.h:37
adi_dec_filt_data::ctrl_reg_val
uint8_t ctrl_reg_val
Definition: ad9208_adc_api.c:28
AD9208_DDCX_PO2_REG
#define AD9208_DDCX_PO2_REG
Definition: ad9208_reg.h:151
AD9208_DDCX_MBW2_REG
#define AD9208_DDCX_MBW2_REG
Definition: ad9208_reg.h:166
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:377
AD9208_DDCX_MBW4_REG
#define AD9208_DDCX_MBW4_REG
Definition: ad9208_reg.h:168
ad9208_pdn_mode_t
ad9208_pdn_mode_t
Definition: ad9208_api.h:65
ad9208_register_chip_transfer
int ad9208_register_chip_transfer(ad9208_handle_t *h)
Definition: ad9208_reg.c:112
ad9208_jesd_enable_link
int ad9208_jesd_enable_link(ad9208_handle_t *h, uint8_t en)
Enable JESD Link.
Definition: ad9208_jesd_api.c:131
AD9208_IF_CFG_B_REG
#define AD9208_IF_CFG_B_REG
Definition: ad9208_reg.h:36
AD9208_DDCX_PO5_REG
#define AD9208_DDCX_PO5_REG
Definition: ad9208_reg.h:154
U64MSB
#define U64MSB
Definition: ad9208_adc_api.c:53
chip_id
chip_id
Definition: ad9172.h:51
AD9208_DDCX_NCO_IF_MODE
#define AD9208_DDCX_NCO_IF_MODE(x)
Definition: ad9208_reg.h:133
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:20
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:296