no-OS
|
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) |
Enumerates ADC Input Buffer Currents
enum ad9208_adc_ch_t |
Enumerates ADC Full Scale Range Modes
enum ad9208_pdn_mode_t |
int ad9208_adc_get_channel_select | ( | ad9208_handle_t * | h, |
uint8_t * | ch | ||
) |
Get AD9208 ADC Channel Select.
Returns the ADC Channels currently Selected
h | Pointer to the AD9208 device reference handle. |
*ch | A 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 |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
status | A 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. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
mode | Desired Powerdown mode |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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
h | Pointer to the AD9208 device reference handle. |
ch | Bit 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 |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
phase_adj | Number 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 |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
ip_data_frmt | Input data format Real or Complex |
op_data_frmt | Output data format Real or Complex |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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
h | Pointer to the AD9208 device reference handle. |
en | Desired enable setting for the DC Offset Calibration 0 - Disable DC Offset Calibration 1 - Disable DC Offset Calibration |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
dcm | Set ADC Decimation Ratio Range 1-48 TODO: Verify All this modes are really Valid |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
ddc_ch | DDC Channel on which to set Decimation Filters. Valid Range 0 to 3 |
dcm | DDC Channel Decimation. Valid Range 1 - 48 |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
ddc_ch | DDC Channel on which to set the Gain Stage. Range 0 to 3 |
gain_db | Desired gain setting. 0dB or 6dB |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
ddc_ch | DDC Channel on which to set Decimation Filters Valid Range 0-3 |
i_data_src | ADC data source for DDC I data channel. AD9208_ADC_CH_A - ADC Channel A AD9208_ADC_CH_B - ADC Channel B |
q_data_src | ADC data source for DDC Q data channel. AD9208_ADC_CH_A - ADC Channel A AD9208_ADC_CH_B - ADC Channel B |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
ddc_ch | DDC Channel on which to set NCO Frequency Translation. Range 0 to 3 |
carrier_freq_hz | Desired Channel Carrier Frequency in Hz |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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
h | Pointer to the AD9208 device reference handle. |
ddc_ch | DDDC Channel on which to set NCO Frequency Translation. Range 0 to 3 |
ftw | Desired 48-bit FTW value for the NCO on the Target DDC Channel |
mod_a | Desired 48-bit MAW value for the NCO on the Target DDC Channel |
mod_b | Desired 48-bit MBW value for the NCO on the Target DDC Channel |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
ddc_ch | DDC Channel on which to enable the NCO. Range 0-3. |
mode | Desired NCO mode for target DDC Channel. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
ddc_ch | DDC Channel on which to enable the NCO, Range 0-3 |
po | Desired 48-bit NCO Phase offset |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
API_ERROR_INIT_SEQ_FAIL | Init sequence failed |
API_ERROR_SPI_SDO | Invalid SPI configuration |
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.
h | Pointer to the AD9208 device reference handle. |
fc_ch | Number of Carrier Frequencies. Valid Values 0 - Full Bandwidth 1 - One Channel 2 - Two Channel 4 - Four Channel |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
upper_dbfs | A 13 bit value representing the Upper magnitude threshold level in DBFS. |
lower_dbfs | A 13 bit value representing the lower magnitude threshold level in DBFS. |
dwell_time | A 13 bit value representing the Upper magnitude threshold level in DBFS. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
buff_curr_n | N-Input buffer current. Valid values defined by ad9208_adc_buff_curr_t enumeration |
buff_curr_p | P-Input buffer current. Valid values defined by ad9208_adc_buff_curr_t enumeration |
vcm_buff | VCM buffer current. Valid values defined by ad9208_adc_buff_curr_t enumeration |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
analog_input_mode | ADC Analog Input mode. Enumerated by signal_coupling_t COUPLING_AC - AC Coupled Mode COUPLING_DC- DC Coupled Mode |
ext_vref | External 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_range | Full Scale Voltage settings. Valid options are defined by ad9208_adc_scale_range_t |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_adc_set_input_scale | ( | ad9208_handle_t * | h, |
ad9208_adc_scale_range_t | full_scale_range | ||
) |
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.
h | Pointer to the AD9208 device reference handle. |
en | Enable Synchronized update 0- Synchronized Update Mode Disabled. Instantaneous update 1- Synchronized Update Mode Enabled. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
en | Enable the Temp Sensor Diodes. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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
h | Pointer to the AD9208 device reference handle. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_HW_CLOSE | HW Close Function Failed |
int ad9208_get_adc_clk_freq | ( | ad9208_handle_t * | h, |
uint64_t * | adc_clk_freq_hz | ||
) |
Get AD9208 ADC Sampling Clock (Fs) value.
h | Pointer to the AD9208 device reference handle. |
*adc_clk_freq_hz | Pointer to the a uint64_t variable to store the ADC Clk Frequency |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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
h | Pointer to the AD9208 device reference handle. |
chip_id | Pointer to a variable of type ad9208_chip_id_t to which the product data read-back from chip shall be stored. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_get_decimation | ( | ad9208_handle_t * | h, |
uint8_t * | dcm | ||
) |
int ad9208_get_revision | ( | ad9208_handle_t * | h, |
uint8_t * | rev_major, | ||
uint8_t * | rev_minor, | ||
uint8_t * | rev_rc | ||
) |
Get API Revision Data.
h | Pointer to the AD9208 device reference handle. |
rev_major | Pointer to variable to store the Major Revision Number |
rev_minor | Pointer to variable to store the Minor Revision Number |
rev_rc | Pointer to variable to store the RC Revision Number |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_HW_OPEN | HW Open Function Failed |
int ad9208_jesd_enable_link | ( | ad9208_handle_t * | h, |
uint8_t | en | ||
) |
Enable JESD Link.
Enable SERDES Link to start JESD tranmission
h | Pointer to the AD9208 device reference handle. |
en | Enable control for the JESD Link |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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
h | Pointer to the AD9208 device reference handle. |
en | Enable control for JESD Scrambler. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
jesd_param | Pointer to a variable that will be set will the current values of the JESD interface parameters. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
phy_log_map | Pointer 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. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
*pll_status | Pointer 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 |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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
h | Pointer to the AD9208 device reference handle. |
jesd_param | The 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_kbps | Pointer to uint64_t to return the determined Lane Rate. Set to NULL if not required. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
physical_lane | uint8_t value indicating the Physical Lanes to be routed to the serdes logical indicated by the logical_lane parameter. Valid Range 0 -7 |
logical_lane | uint8_t value indicating the corresponding logical lane for the physical lane listed in parameter physical_lane. Valid Range 0 -7 |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_subclass_set | ( | ad9208_handle_t * | h, |
uint8_t | subclass | ||
) |
Set JESD SYNCHRONIZATION Mode.
h | Pointer to the AD9208 device reference handle. |
subclass | Desired Jesd Subclass Mode. Valid Range 0 to 1 0 - Sub Class 0 1 - Sub Class 1 |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
sysref_edge_sel | Set the transition on which SYSREF is valid. Valid values are: 0 LOW to HIGH transition 1 HIGH to LOW transition |
clk_edge_sel | Set the Sysref Capture clock Edge. Valid values are: 0 Rising clock Edge 1 Falling Clock Edge |
neg_window_skew | Skew sample clock by which captured sysref is ignored. Skew set in clock cycles. Valid range 0-3 |
pos_window_skew | Skew sample clock by which captured sysref is ignored. Skew set in clock cycles. Valid range 0-3 |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_syref_lmfc_offset_set | ( | ad9208_handle_t * | h, |
uint8_t | offset | ||
) |
Set JESD LMFC Offset.
h | Pointer to the AD9208 device reference handle. |
offset | Adjust 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. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
h | Pointer to the AD9208 device reference handle. |
offset | Adjust 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. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_syref_mode_set | ( | ad9208_handle_t * | h, |
jesd_sysref_mode_t | mode, | ||
uint8_t | sysref_count | ||
) |
Set JESD SYNCHRONIZATION Mode.
h | Pointer to the AD9208 device reference handle. |
mode | Sysref Synchronization Mode. SYREF_NONE - NO SYSREF, Subclass 1 only SYSREF_ONESHOT - single sysref signal mode SYSREF_CONT - Continuous sysref signal mode |
sysref_count | Number of initial sysref sgnals to ignore in sysref n-shot mode 0-15 Valid only for N-Shot Mode. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
*hold_status | Pointer to a uint8_t variable to which the Sysref +/- Hold Status will be set |
*setup_status | Pointer to a uint8_t varaiable to whch the Sysref +/- Setup Status will be set |
*phase_status | Point to a uint8_t variable to which the Sysref Divider Phase during Sysref Capture will be set. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
timestamp_en | Enable 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_bit | Desired control bit for Sysref time_stamp control. |
delay | Delay of sysref timestamp in smaple clock cycles |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_register_read | ( | ad9208_handle_t * | h, |
const uint16_t | address, | ||
uint8_t * | data | ||
) |
Perform SPI register read access to AD9208 Device.
h | Pointer to the AD9208 device reference handle. |
address | AD9208 Device SPI address from which the value of data parameter shall be read, |
data | Pointer to an 8-bit variable to which the value of the SPI register at the address defined by address parameter shall be stored. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
int ad9208_register_write | ( | ad9208_handle_t * | h, |
const uint16_t | address, | ||
const uint8_t | data | ||
) |
Perform SPI register write access to AD9208 Device.
h | Pointer to the AD9208 device reference handle. |
address | AD9208 Device SPI address to which the value of data parameter shall be written |
data | 8-bit value to be written to SPI register defined by the address parameter. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
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.
h | Pointer to the AD9208 device reference handle. |
hw_reset | A 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. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
API_ERROR_RESET_PIN_CTRL | HW Reset Pin Function Failed |
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.
h | Pointer to the AD9208 device reference handle. |
clk_freq_hz | ADC CLK applied to AD9208 |
div | The desired CLK input divider setting. Valid values are 1,2 and 4. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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)
h | Pointer to the AD9208 device reference handle. |
en | Desired Enable setting for the targeted DCS 0= Disabled 1= Enabled. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
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.
h | Pointer to the AD9208 device reference handle. |
pin_enable | Powerdown pin enable/disable. 1 - Powerdown pin controls powerdown status 0 - Powerdown pin disable. Does not effect powerdown Status. |
pin_mode | Powerdown 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 |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |