Go to the documentation of this file.
45 #define AD9467_READ (1 << 15)
46 #define AD9467_WRITE (0 << 15)
47 #define AD9467_CNT(x) (((x) - 1) << 13)
48 #define AD9467_ADDR(x) ((x) & 0X1FFF)
51 #define AD9467_REG_CHIP_PORT_CFG 0x00
52 #define AD9467_REG_CHIP_ID 0x01
53 #define AD9467_REG_CHIP_GRADE 0x02
56 #define AD9467_REG_DEVICE_UPDATE 0xFF
59 #define AD9467_REG_MODES 0x08
60 #define AD9467_REG_TEST_IO 0x0D
61 #define AD9467_REG_ADC_INPUT 0x0F
62 #define AD9467_REG_OFFSET 0x10
63 #define AD9467_REG_OUT_MODE 0x14
64 #define AD9467_REG_OUT_ADJ 0x15
65 #define AD9467_REG_OUT_PHASE 0x16
66 #define AD9467_REG_OUT_DELAY 0x17
67 #define AD9467_REG_V_REF 0x18
68 #define AD9467_REG_ANALOG_INPUT 0x2C
69 #define AD9467_REG_BUFF_CURRENT_1 0x36
70 #define AD9467_REG_BUFF_CURRENT_2 0x107
73 #define AD9467_CHIP_PORT_CGF_LSB_FIRST (1 << 6)
74 #define AD9467_CHIP_PORT_CGF_SOFT_RST (1 << 5)
77 #define AD9467_CHIP_GRADE_BITS(x) (((x) & 0x3) << 4)
80 #define AD9467_DEVICE_UPDATE_SW (1 << 0)
83 #define AD9467_MODES_INT_PD_MODE(x) (((x) & 0x3) << 0)
86 #define AD9467_TEST_IO_RST_PN_LONG (1 << 5)
87 #define AD9467_TEST_IO_RST_PN_SHORT (1 << 4)
88 #define AD9467_TEST_IO_OUT_TEST(x) (((x) & 0xF) << 0)
91 #define AD9467_ADC_INPUT_XVREF (1 << 7)
92 #define AD9467_ADC_INPUT_ANALOG_DSCN (1 << 2)
95 #define AD9467_OUT_MODE_DOUT_DISBL (1 << 4)
96 #define AD9467_OUT_MODE_OUT_INV (1 << 2)
97 #define AD9467_OUT_MODE_DATA_FORMAT(x) (((x) & 0x3) << 0)
100 #define AD9467_OUT_ADJ_LVDS (1 << 3)
101 #define AD9467_OUT_ADJ_OUT_CURRENT(x) (((x) & 0x7) << 0)
104 #define AD9467_OUT_PHASE_DCO_INV (1 << 7)
107 #define AD9467_OUT_DELAY_DCO_DLY_EN (1 << 7)
108 #define AD9467_OUT_DELAY_OUT_DLY(x) (((x) & 0x1F) << 0)
111 #define AD9467_V_REF_IN_FS_RANGE(x) (((x) & 0xF) << 0)
114 #define AD9467_ANALOG_INPUT_COUPLING (1 << 2)
117 #define AD9467_BUFF_CURRENT_1(x) (((x) & 0x3F) << 2)
120 #define AD9467_BUFF_CURRENT_2(x) (((x) & 0x3F) << 2)
154 uint16_t register_address,
220 int32_t coupling_mode,
int32_t ad9467_reset_pn23(struct ad9467_dev *dev, int32_t rst, int32_t *ret_stat)
Sets (1) or clears (0) the reset long PN sequence bit(PN23).
Definition: ad9467.c:319
int32_t ad9467_remove(struct ad9467_dev *dev)
Free the resources allocated by ad9467_setup().
Definition: ad9467.c:88
int32_t ad9467_dco_output_clock_delay(struct ad9467_dev *dev, int32_t delay, int32_t *ret_stat)
Configures the clock delay setting.
Definition: ad9467.c:699
#define AD9467_TEST_IO_OUT_TEST(x)
Definition: ad9467.h:88
#define AD9467_OUT_MODE_OUT_INV
Definition: ad9467.h:96
int32_t ad9467_buffer_current_1(struct ad9467_dev *dev, int32_t percentage, int32_t *ret_stat)
Changes the input buffer current(1).
Definition: ad9467.c:850
int32_t ad9467_pwr_mode(struct ad9467_dev *dev, int32_t mode, int32_t *ret_mode)
Configures the power mode.
Definition: ad9467.c:197
#define AD9467_REG_OUT_MODE
Definition: ad9467.h:63
int32_t ad9467_test_mode(struct ad9467_dev *dev, int32_t mode, int32_t *ret_mode)
Sets the ADC's test mode.
Definition: ad9467.c:241
int32_t ad9467_write(struct ad9467_dev *dev, uint16_t reg_addr, uint8_t reg_val)
Writes data into a register.
Definition: ad9467.c:108
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
int32_t ad9467_pwr_mode(struct ad9467_dev *dev, int32_t mode, int32_t *ret_mode)
Configures the power mode.
Definition: ad9467.c:197
int32_t ad9467_analog_input_disconnect(struct ad9467_dev *dev, int32_t en, int32_t *ret_stat)
Disconnects (1) or connects (0) the analog input from or to the the ADC channel.
Definition: ad9467.c:397
Header file of SPI Interface.
#define AD9467_REG_TEST_IO
Definition: ad9467.h:60
int32_t ad9467_reset_pn9(struct ad9467_dev *dev, int32_t rst, int32_t *ret_stat)
Sets (1) or clears (0) the reset short PN sequence bit(PN9).
Definition: ad9467.c:280
#define AD9467_DEVICE_UPDATE_SW
Definition: ad9467.h:80
int32_t ad9467_remove(struct ad9467_dev *dev)
Free the resources allocated by ad9467_setup().
Definition: ad9467.c:88
int32_t ad9467_analog_input_disconnect(struct ad9467_dev *dev, int32_t en, int32_t *ret_stat)
Disconnects (1) or connects (0) the analog input from or to the the ADC channel.
Definition: ad9467.c:397
#define AD9467_ADC_INPUT_XVREF
Definition: ad9467.h:91
int32_t ad9467_coarse_lvds_adj(struct ad9467_dev *dev, int32_t lvds_adj, int32_t *ret_stat)
Determines LVDS output properties.
Definition: ad9467.c:581
enum no_os_spi_mode mode
Definition: no_os_spi.h:148
int32_t ad9467_coarse_lvds_adj(struct ad9467_dev *dev, int32_t lvds_adj, int32_t *ret_stat)
Determines LVDS output properties.
Definition: ad9467.c:581
Definition: ad9361_util.h:69
#define AD9467_REG_OUT_DELAY
Definition: ad9467.h:66
uint32_t ad9467_set_bits_to_reg(struct ad9467_dev *dev, uint16_t register_address, uint8_t bits_value, uint8_t mask)
Sets a bit or a group of bits inside a register without modifying the other bits.
Definition: ad9467.c:166
#define AD9467_OUT_ADJ_OUT_CURRENT(x)
Definition: ad9467.h:101
#define AD9467_OUT_DELAY_OUT_DLY(x)
Definition: ad9467.h:108
int32_t ad9467_buffer_current_1(struct ad9467_dev *dev, int32_t percentage, int32_t *ret_stat)
Changes the input buffer current(1).
Definition: ad9467.c:850
struct no_os_spi_desc * spi_desc
Definition: ad9467.h:127
int32_t ad9467_dco_clock_invert(struct ad9467_dev *dev, int32_t invert, int32_t *ret_stat)
Activates the normal (0) or inverted (1) DCO clock.
Definition: ad9467.c:662
int32_t ad9467_transfer(struct ad9467_dev *dev)
Initiates a transfer and waits for the operation to end.
Definition: ad9467.c:940
#define AD9467_REG_V_REF
Definition: ad9467.h:67
int32_t ad9467_transfer(struct ad9467_dev *dev)
Initiates a transfer and waits for the operation to end.
Definition: ad9467.c:940
#define AD9467_REG_OUT_ADJ
Definition: ad9467.h:64
int32_t ad9467_output_current_adj(struct ad9467_dev *dev, int32_t adj, int32_t *ret_stat)
Sets the output current adjustment.
Definition: ad9467.c:624
#define AD9467_REG_MODES
Definition: ad9467.h:59
#define AD9467_MODES_INT_PD_MODE(x)
Definition: ad9467.h:83
int32_t ad9467_external_ref(struct ad9467_dev *dev, int32_t en, int32_t *ret_stat)
Enables (1) or disables (0) the external voltage reference.
Definition: ad9467.c:358
#define AD9467_REG_OUT_PHASE
Definition: ad9467.h:65
#define AD9467_REG_OFFSET
Definition: ad9467.h:62
uint32_t ad9467_set_bits_to_reg(struct ad9467_dev *dev, uint16_t register_address, uint8_t bits_value, uint8_t mask)
Sets a bit or a group of bits inside a register without modifying the other bits.
Definition: ad9467.c:166
int32_t ad9467_external_ref(struct ad9467_dev *dev, int32_t en, int32_t *ret_stat)
Enables (1) or disables (0) the external voltage reference.
Definition: ad9467.c:358
#define AD9467_REG_DEVICE_UPDATE
Definition: ad9467.h:56
int32_t ad9467_output_invert(struct ad9467_dev *dev, int32_t invert, int32_t *ret_stat)
Activates the inverted (1) or normal (0) output mode.
Definition: ad9467.c:503
int32_t ad9467_read(struct ad9467_dev *dev, uint16_t reg_addr, uint8_t *reg_val)
Reads data from a register.
Definition: ad9467.c:135
int32_t ad9467_reset_pn9(struct ad9467_dev *dev, int32_t rst, int32_t *ret_stat)
Sets (1) or clears (0) the reset short PN sequence bit(PN9).
Definition: ad9467.c:280
#define AD9467_REG_ADC_INPUT
Definition: ad9467.h:61
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
int32_t ad9467_output_disable(struct ad9467_dev *dev, int32_t en, int32_t *ret_stat)
Disables (1) or enables (0) the data output.
Definition: ad9467.c:465
#define AD9467_BUFF_CURRENT_1(x)
Definition: ad9467.h:117
int32_t ad9467_read(struct ad9467_dev *dev, uint16_t reg_addr, uint8_t *reg_val)
Reads data from a register.
Definition: ad9467.c:135
#define AD9467_BUFF_CURRENT_2(x)
Definition: ad9467.h:120
int32_t ad9467_dco_output_clock_delay(struct ad9467_dev *dev, int32_t delay, int32_t *ret_stat)
Configures the clock delay setting.
Definition: ad9467.c:699
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
int32_t ad9467_output_invert(struct ad9467_dev *dev, int32_t invert, int32_t *ret_stat)
Activates the inverted (1) or normal (0) output mode.
Definition: ad9467.c:503
#define AD9467_REG_ANALOG_INPUT
Definition: ad9467.h:68
int32_t ad9467_test_mode(struct ad9467_dev *dev, int32_t mode, int32_t *ret_mode)
Sets the ADC's test mode.
Definition: ad9467.c:241
#define AD9467_TEST_IO_RST_PN_SHORT
Definition: ad9467.h:87
#define AD9467_OUT_MODE_DOUT_DISBL
Definition: ad9467.h:95
int32_t ad9467_output_disable(struct ad9467_dev *dev, int32_t en, int32_t *ret_stat)
Disables (1) or enables (0) the data output.
Definition: ad9467.c:465
int32_t ad9467_buffer_current_2(struct ad9467_dev *dev, int32_t percentage, int32_t *ret_stat)
Changes the input buffer current(2).
Definition: ad9467.c:903
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
int32_t ad9467_dco_clock_invert(struct ad9467_dev *dev, int32_t invert, int32_t *ret_stat)
Activates the normal (0) or inverted (1) DCO clock.
Definition: ad9467.c:662
#define AD9467_ANALOG_INPUT_COUPLING
Definition: ad9467.h:114
int32_t ad9467_full_scale_range(struct ad9467_dev *dev, float v_fs, float *ret_stat)
Configures the full-scale input voltage selection.
Definition: ad9467.c:752
int32_t ad9467_buffer_current_2(struct ad9467_dev *dev, int32_t percentage, int32_t *ret_stat)
Changes the input buffer current(2).
Definition: ad9467.c:903
int32_t ad9467_output_format(struct ad9467_dev *dev, int32_t format, int32_t *ret_stat)
Specifies the output format.
Definition: ad9467.c:543
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
#define AD9467_OUT_ADJ_LVDS
Definition: ad9467.h:100
int32_t ad9467_full_scale_range(struct ad9467_dev *dev, float v_fs, float *ret_stat)
Configures the full-scale input voltage selection.
Definition: ad9467.c:752
#define AD9467_REG_BUFF_CURRENT_1
Definition: ad9467.h:69
Header file of AD9467 Driver.
#define AD9467_ADC_INPUT_ANALOG_DSCN
Definition: ad9467.h:92
int32_t ad9467_offset_adj(struct ad9467_dev *dev, int32_t adj, int32_t *ret_stat)
Sets the offset adjustment.
Definition: ad9467.c:433
int32_t ad9467_output_current_adj(struct ad9467_dev *dev, int32_t adj, int32_t *ret_stat)
Sets the output current adjustment.
Definition: ad9467.c:624
#define AD9467_OUT_DELAY_DCO_DLY_EN
Definition: ad9467.h:107
#define AD9467_REG_BUFF_CURRENT_2
Definition: ad9467.h:70
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
#define AD9467_READ
Definition: ad9467.h:45
int32_t ad9467_setup(struct ad9467_dev **device, struct ad9467_init_param init_param)
Configures the test mode and the output mode to a default state.
Definition: ad9467.c:50
#define AD9467_OUT_PHASE_DCO_INV
Definition: ad9467.h:104
int32_t ad9467_analog_input_coupling(struct ad9467_dev *dev, int32_t coupling_mode, int32_t *ret_stat)
Sets the AC coupling(0) or DC coupling(1) mode.
Definition: ad9467.c:800
int32_t ad9467_write(struct ad9467_dev *dev, uint16_t reg_addr, uint8_t reg_val)
Writes data into a register.
Definition: ad9467.c:108
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
int32_t ad9467_reset_pn23(struct ad9467_dev *dev, int32_t rst, int32_t *ret_stat)
Sets (1) or clears (0) the reset long PN sequence bit(PN23).
Definition: ad9467.c:319
int32_t ad9467_output_format(struct ad9467_dev *dev, int32_t format, int32_t *ret_stat)
Specifies the output format.
Definition: ad9467.c:543
#define AD9467_TEST_IO_RST_PN_LONG
Definition: ad9467.h:86
int32_t ad9467_setup(struct ad9467_dev **device, struct ad9467_init_param init_param)
Configures the test mode and the output mode to a default state.
Definition: ad9467.c:50
struct no_os_spi_init_param spi_init
Definition: ad9467.h:132
int32_t ad9467_offset_adj(struct ad9467_dev *dev, int32_t adj, int32_t *ret_stat)
Sets the offset adjustment.
Definition: ad9467.c:433
#define AD9467_OUT_MODE_DATA_FORMAT(x)
Definition: ad9467.h:97
#define AD9467_WRITE
Definition: ad9467.h:46
#define AD9467_V_REF_IN_FS_RANGE(x)
Definition: ad9467.h:111
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
int32_t ad9467_analog_input_coupling(struct ad9467_dev *dev, int32_t coupling_mode, int32_t *ret_stat)
Sets the AC coupling(0) or DC coupling(1) mode.
Definition: ad9467.c:800