Go to the documentation of this file.
51 #define AD9208_FULL_BANDWIDTH_MODE 0
52 #define AD9208_1_DDC_MODE 1
53 #define AD9208_2_DDC_MODE 2
54 #define AD9208_4_DDC_MODE 4
56 #define AD9208_SYSREF_NONE 0
57 #define AD9208_SYSREF_ONESHOT 1
58 #define AD9208_SYSREF_CONT 2
59 #define AD9208_SYSREF_MON 3
61 #define AD9208_NCO_MODE_VIF 0
62 #define AD9208_NCO_MODE_ZIF 1
63 #define AD9208_NCO_MODE_TEST 3
65 #define AD9208_BUFF_CURR_400_UA 0x4
66 #define AD9208_BUFF_CURR_500_UA 0x9
67 #define AD9208_BUFF_CURR_600_UA 0x1E
68 #define AD9208_BUFF_CURR_700_UA 0x23
69 #define AD9208_BUFF_CURR_800_UA 0x28
70 #define AD9208_BUFF_CURR_1000_UA 0x32
72 #define AD9208_CHIP_TYPE 0x03
73 #define AD9208_CHIP_ID 0xDF
169 #endif // __AD9208_H__
int ad9208_adc_set_channel_select(ad9208_handle_t *h, uint8_t ch)
Set AD9208 ADC Channel Select.
Definition: ad9208_api.c:161
@ AD9208_DATA_FRMT_REAL
Definition: ad9208_api.h:24
uint64_t sampling_frequency_hz
Definition: ad9208.h:96
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
uint32_t sysref_pos_window_skew
Definition: ad9208.h:153
bool sysref_edge_sel
Definition: ad9208.h:115
uint32_t sysref_mode
Definition: ad9208.h:154
uint32_t timeout
Definition: ad413x.c:49
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
int ad9208_jesd_syref_lmfc_offset_set(ad9208_handle_t *h, uint8_t offset)
Set JESD LMFC Offset.
Definition: ad9208_jesd_api.c:647
struct no_os_spi_desc * spi_desc
Definition: ad9208.h:88
#define no_os_min_t(type, x, y)
Definition: no_os_util.h:61
uint32_t powerdown_mode
Definition: ad9208.h:99
int32_t ad9208_remove(ad9208_dev *device)
Definition: ad9208.c:497
uint32_t buff_curr_n
Definition: ad9208.h:104
uint64_t po
Definition: ad9208.h:82
int32_t ad9208_initialize(ad9208_dev **device, ad9208_init_param *init_param)
Definition: ad9208.c:374
uint32_t sysref_neg_window_skew
Definition: ad9208.h:152
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:159
#define AD9208_CHIP_TYPE
Definition: ad9208.h:72
uint8_t fc_ch
Definition: ad9208.h:141
struct no_os_gpio_init_param gpio_powerdown
Definition: ad9208.h:130
bool sysref_clk_edge_sel
Definition: ad9208.h:151
Header file of SPI Interface.
uint32_t nco_mode
Definition: ad9208.h:80
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
uint32_t sysref_neg_window_skew
Definition: ad9208.h:117
Definition: ad9208_api.h:78
@ COUPLING_DC
Definition: api_def.h:202
void * user_data
Definition: ad9208_api.h:79
int ad9208_get_chip_id(ad9208_handle_t *h, adi_chip_id_t *chip_id)
Get Chip Identification Data.
Definition: ad9208_api.c:87
Header file of Delay functions.
int32_t ad9208_remove(ad9208_dev *device)
Definition: ad9208.c:497
struct ad9208_init_param ad9208_init_param
bool gain_db
Definition: ad9208.h:83
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
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
#define AD9208_FULL_BANDWIDTH_MODE
Definition: ad9208.h:51
int ad9208_deinit(ad9208_handle_t *h)
De-initialize the AD9208 Device.
Definition: ad9208_api.c:73
Definition: ad9361_util.h:69
uint32_t buff_curr_p
Definition: ad9208.h:105
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
bool ddc_input_format_real_en
Definition: ad9208.h:145
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
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
uint32_t buff_curr_n
Definition: ad9208.h:139
uint32_t sysref_count
Definition: ad9208.h:155
uint32_t input_div
Definition: ad9208.h:97
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
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:115
jesd_param_t * jesd_param
Definition: ad9208.h:157
uint32_t sysref_count
Definition: ad9208.h:120
spi_xfer_t dev_xfer
Definition: ad9208_api.h:80
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
uint32_t decimation
Definition: ad9208.h:79
uint32_t jesd_subclass
Definition: ad9208.h:123
uint32_t input_div
Definition: ad9208.h:132
#define AD9208_BUFF_CURR_600_UA
Definition: ad9208.h:67
uint32_t sysref_pos_window_skew
Definition: ad9208.h:118
Definition: api_def.h:230
bool analog_input_mode
Definition: ad9208.h:102
int ad9208_jesd_subclass_set(ad9208_handle_t *h, uint8_t subclass)
Set JESD SYNCHRONIZATION Mode.
Definition: ad9208_jesd_api.c:435
uint32_t ddc_cnt
Definition: ad9208.h:143
uint32_t test_mode_ch1
Definition: ad9208.h:147
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
uint8_t current_scale
Definition: ad9208.h:136
@ AD9208_ADC_CH_ALL
Definition: ad9208_api.h:33
bool analog_input_mode
Definition: ad9208.h:137
int ad9208_reset(ad9208_handle_t *h, uint8_t hw_reset)
Reset the AD9208.
Definition: ad9208_api.c:121
struct ad9208_ddc * ddc
Definition: ad9208.h:142
bool ddc_output_format_real_en
Definition: ad9208.h:144
bool ext_vref_en
Definition: ad9208.h:138
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
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:104
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
@ AD9208_DATA_FRMT_COMPLEX
Definition: ad9208_api.h:25
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
uint64_t carrier_freq_hz
Definition: ad9208.h:81
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
bool ddc_output_format_real_en
Definition: ad9208.h:109
bool powerdown_pin_en
Definition: ad9208.h:98
#define AD9208_JESD_PLL_LOCK_STAT
Definition: ad9208_reg.h:201
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
bool sysref_edge_sel
Definition: ad9208.h:150
uint32_t ddc_cnt
Definition: ad9208.h:108
bool ext_vref_en
Definition: ad9208.h:103
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
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
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
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:49
bool ddc_input_format_real_en
Definition: ad9208.h:110
struct no_os_spi_init_param * spi_init
Definition: ad9208.h:128
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
Header file of AD9208 Driver.
bool powerdown_pin_en
Definition: ad9208.h:133
int32_t ad9208_initialize(ad9208_dev **device, ad9208_init_param *init_param)
Definition: ad9208.c:374
AD9208 SPI Register Definition Header File.
delay_us_t delay_us
Definition: ad9208_api.h:83
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
uint32_t test_mode_ch0
Definition: ad9208.h:146
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
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
struct ad9208_dev ad9208_dev
struct ad9208_ddc ddc[4]
Definition: ad9208.h:107
ad9208_handle_t * adc_h
Definition: ad9208.h:95
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
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
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
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
#define AD9208_REG_TEST_MODE
Definition: ad9208_reg.h:171
uint32_t powerdown_mode
Definition: ad9208.h:134
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
@ COUPLING_AC
Definition: api_def.h:201
struct no_os_gpio_desc * gpio_powerdown
Definition: ad9208.h:90
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:197
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
Definition: api_def.h:163
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
bool sysref_clk_edge_sel
Definition: ad9208.h:116
uint32_t test_mode_ch1
Definition: ad9208.h:112
Header file of GPIO Interface.
#define AD9208_CHIP_ID
Definition: ad9208.h:73
uint64_t sampling_frequency_hz
Definition: ad9208.h:131
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
uint32_t sysref_mode
Definition: ad9208.h:119
struct no_os_spi_desc * spi
Definition: main.c:72
jesd_param_t * jesd_param
Definition: ad9208.h:122
uint32_t sysref_lmfc_offset
Definition: ad9208.h:149
uint32_t jesd_subclass
Definition: ad9208.h:158
struct ad9208_state * st
Definition: ad9208.h:91
enum no_os_spi_mode mode
Definition: no_os_spi.h:202
bool duty_cycle_stabilizer_en
Definition: ad9208.h:100
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:147
uint32_t sysref_lmfc_offset
Definition: ad9208.h:114
ad9208_adc_data_frmt_t
Definition: ad9208_api.h:23
uint8_t fc_ch
Definition: ad9208.h:106
bool duty_cycle_stabilizer_en
Definition: ad9208.h:135
Error macro definition for ARM Compiler.
uint32_t buff_curr_p
Definition: ad9208.h:140
int ad9208_jesd_enable_link(ad9208_handle_t *h, uint8_t en)
Enable JESD Link.
Definition: ad9208_jesd_api.c:131
uint8_t current_scale
Definition: ad9208.h:101
chip_id
Definition: ad9172.h:51
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
uint32_t test_mode_ch0
Definition: ad9208.h:111
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