Go to the documentation of this file.
49 #define ADMV1014_REG_SPI_CONTROL 0x00
50 #define ADMV1014_REG_ALARM 0x01
51 #define ADMV1014_REG_ALARM_MASKS 0x02
52 #define ADMV1014_REG_ENABLE 0x03
53 #define ADMV1014_REG_QUAD 0x04
54 #define ADMV1014_REG_LO_AMP_PHASE_ADJUST1 0x05
55 #define ADMV1014_REG_MIXER 0x07
56 #define ADMV1014_REG_IF_AMP 0x08
57 #define ADMV1014_REG_IF_AMP_BB_AMP 0x09
58 #define ADMV1014_REG_BB_AMP_AGC 0x0A
59 #define ADMV1014_REG_VVA_TEMP_COMP 0x0B
62 #define ADMV1014_PARITY_EN_MSK NO_OS_BIT(15)
63 #define ADMV1014_SPI_SOFT_RESET_MSK NO_OS_BIT(14)
64 #define ADMV1014_CHIP_ID_MSK NO_OS_GENMASK(11, 4)
65 #define ADMV1014_CHIP_ID 0x9
66 #define ADMV1014_REVISION_ID_MSK NO_OS_GENMASK(3, 0)
69 #define ADMV1014_PARITY_ERROR_MSK NO_OS_BIT(15)
70 #define ADMV1014_TOO_FEW_ERRORS_MSK NO_OS_BIT(14)
71 #define ADMV1014_TOO_MANY_ERRORS_MSK NO_OS_BIT(13)
72 #define ADMV1014_ADDRESS_RANGE_ERROR_MSK NO_OS_BIT(12)
75 #define ADMV1014_IBIAS_PD_MSK NO_OS_BIT(14)
76 #define ADMV1014_P1DB_COMPENSATION_MSK NO_OS_GENMASK(13, 12)
77 #define ADMV1014_IF_AMP_PD_MSK NO_OS_BIT(11)
78 #define ADMV1014_QUAD_BG_PD_MSK NO_OS_BIT(9)
79 #define ADMV1014_BB_AMP_PD_MSK NO_OS_BIT(8)
80 #define ADMV1014_QUAD_IBIAS_PD_MSK NO_OS_BIT(7)
81 #define ADMV1014_DET_EN_MSK NO_OS_BIT(6)
82 #define ADMV1014_BG_PD_MSK NO_OS_BIT(5)
85 #define ADMV1014_QUAD_SE_MODE_MSK NO_OS_GENMASK(9, 6)
86 #define ADMV1014_QUAD_FILTERS_MSK NO_OS_GENMASK(3, 0)
89 #define ADMV1014_LOAMP_PH_ADJ_I_FINE_MSK NO_OS_GENMASK(15, 9)
90 #define ADMV1014_LOAMP_PH_ADJ_Q_FINE_MSK NO_OS_GENMASK(8, 2)
93 #define ADMV1014_MIXER_VGATE_MSK NO_OS_GENMASK(15, 9)
94 #define ADMV1014_DET_PROG_MSK NO_OS_GENMASK(6, 0)
97 #define ADMV1014_IF_AMP_COARSE_GAIN_I_MSK NO_OS_GENMASK(11, 8)
98 #define ADMV1014_IF_AMP_FINE_GAIN_Q_MSK NO_OS_GENMASK(7, 4)
99 #define ADMV1014_IF_AMP_FINE_GAIN_I_MSK NO_OS_GENMASK(3, 0)
102 #define ADMV1014_IF_AMP_COARSE_GAIN_Q_MSK NO_OS_GENMASK(15, 12)
103 #define ADMV1014_BB_AMP_OFFSET_Q_MSK NO_OS_GENMASK(9, 5)
104 #define ADMV1014_BB_AMP_OFFSET_I_MSK NO_OS_GENMASK(4, 0)
107 #define ADMV1014_BB_AMP_REF_GEN_MSK NO_OS_GENMASK(6, 3)
108 #define ADMV1014_BB_AMP_GAIN_CTRL_MSK NO_OS_GENMASK(2, 1)
109 #define ADMV1014_BB_SWITCH_HIGH_LOW_CM_MSK NO_OS_BIT(0)
112 #define ADMV1014_VVA_TEMP_COMP_MSK NO_OS_GENMASK(15, 0)
115 #define ADMV1014_READ NO_OS_BIT(7)
116 #define ADMV1014_REG_ADDR_READ_MSK NO_OS_GENMASK(6, 1)
117 #define ADMV1014_REG_ADDR_WRITE_MSK NO_OS_GENMASK(22, 17)
118 #define ADMV1014_REG_DATA_MSK NO_OS_GENMASK(16, 1)
119 #define ADMV1014_NUM_REGULATORS 9
122 #define ADMV1014_BUFF_SIZE_BYTES 3
123 #define ADMV1014_SPI_READ_CMD NO_OS_BIT(7)
124 #define ADMV1014_SPI_WRITE_CMD (0 << 7)
222 uint16_t mask, uint16_t data);
252 uint8_t q_coarse_gain, uint8_t i_fine_gain, uint8_t q_fine_gain);
256 uint8_t *q_coarse_gain, uint8_t *i_fine_gain, uint8_t *q_fine_gain);
@ DET_PROG_NEG_17_DBM_TO_NEG_1DBM
Definition: admv1014.h:167
enum admv1014_quad_se_mode quad_se_mode
Definition: admv1014.h:182
#define ADMV1014_DET_EN_MSK
Definition: admv1014.h:81
@ DET_PROG_NEG_14_DBM_TO_POS_2DBM
Definition: admv1014.h:163
unsigned long long lo_in
Definition: admv1014.h:178
#define ADMV1014_IF_AMP_COARSE_GAIN_Q_MSK
Definition: admv1014.h:102
#define ADMV1014_BB_SWITCH_HIGH_LOW_CM_MSK
Definition: admv1014.h:109
#define ADMV1014_LOAMP_PH_ADJ_Q_FINE_MSK
Definition: admv1014.h:90
int admv1014_get_det_prog(struct admv1014_dev *dev, enum admv1014_det_prog *det_prog)
Get Digital Rx Detector.
Definition: admv1014.c:153
@ LO_BAND_5_4_TO_7_GHZ
Definition: admv1014.h:153
unsigned int vcm_mv
Definition: admv1014.h:186
#define ADMV1014_IF_AMP_FINE_GAIN_I_MSK
Definition: admv1014.h:99
#define ADMV1014_CHIP_ID
Definition: admv1014.h:65
int admv1014_init(struct admv1014_dev **device, struct admv1014_init_param *init_param)
Initializes the admv1014.
Definition: admv1014.c:370
#define ADMV1014_REG_QUAD
Definition: admv1014.h:53
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 ADMV1014_MIXER_VGATE_MSK
Definition: admv1014.h:93
Header file for admv1014 Driver.
#define ADMV1014_REG_ENABLE
Definition: admv1014.h:52
#define ADMV1014_SPI_SOFT_RESET_MSK
Definition: admv1014.h:63
struct no_os_spi_init_param * spi_init
Definition: admv1014.h:176
Header file of SPI Interface.
@ ADMV1014_SE_MODE_DIFF
Definition: admv1014.h:142
#define ADMV1014_LOAMP_PH_ADJ_I_FINE_MSK
Definition: admv1014.h:89
int admv1014_set_bb_amp_gain(struct admv1014_dev *dev, uint8_t gain)
Set Baseband Amp Gain.
Definition: admv1014.c:174
int admv1014_spi_update_bits(struct admv1014_dev *dev, uint8_t reg_addr, uint16_t mask, uint16_t data)
Update ADMV1014 register.
Definition: admv1014.c:117
@ LO_BAND_8_62_TO_10_25_GHZ
Definition: admv1013.h:133
int admv1014_get_if_amp_gain(struct admv1014_dev *dev, uint8_t *i_coarse_gain, uint8_t *q_coarse_gain, uint8_t *i_fine_gain, uint8_t *q_fine_gain)
Get IF Amp Gain.
Definition: admv1014.c:280
enum admv1014_input_mode input_mode
Definition: admv1014.h:180
#define ADMV1014_DET_PROG_MSK
Definition: admv1014.h:94
unsigned long long lo_in
Definition: admv1014.h:199
#define ADMV1014_REG_IF_AMP_BB_AMP
Definition: admv1014.h:57
@ DET_PROG_NEG_13_DBM_TO_POS_3DBM
Definition: admv1014.h:162
@ DET_PROG_NEG_15_5_DBM_TO_POS_0_5_DBM
Definition: admv1014.h:165
bool p1db_comp_en
Definition: admv1014.h:209
Definition: ad9361_util.h:69
@ ADMV1014_SE_MODE_NEG
Definition: admv1014.h:141
int admv1014_spi_update_bits(struct admv1014_dev *dev, uint8_t reg_addr, uint16_t mask, uint16_t data)
Update ADMV1014 register.
Definition: admv1014.c:117
#define ADMV1014_CHIP_ID_MSK
Definition: admv1014.h:64
@ LO_BAND_5_4_TO_8_GHZ
Definition: admv1014.h:152
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
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
int admv1014_set_bb_amp_gain(struct admv1014_dev *dev, uint8_t gain)
Set Baseband Amp Gain.
Definition: admv1014.c:174
int admv1014_init(struct admv1014_dev **device, struct admv1014_init_param *init_param)
Initializes the admv1014.
Definition: admv1014.c:370
#define ADMV1014_QUAD_SE_MODE_MSK
Definition: admv1014.h:85
#define ADMV1014_BB_AMP_PD_MSK
Definition: admv1014.h:79
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
admv1014_input_mode
Switch Intermediate Frequency or I/Q Mode.
Definition: admv1014.h:130
int admv1014_spi_write(struct admv1014_dev *dev, uint8_t reg_addr, uint16_t data)
Writes data to ADMV1014 over SPI.
Definition: admv1014.c:62
struct no_os_spi_desc * spi_desc
Definition: admv1014.h:197
int admv1014_get_phase(struct admv1014_dev *dev, uint8_t *i_phase, uint8_t *q_phase)
Get LO Amp Phase.
Definition: admv1014.c:225
unsigned int vcm_mv
Definition: admv1014.h:207
#define ADMV1014_REG_IF_AMP
Definition: admv1014.h:56
@ DET_PROG_NEG_18_DBM_TO_NEG_2DBM
Definition: admv1014.h:168
@ ADMV1014_IQ_MODE
Definition: admv1014.h:131
#define ADMV1014_IF_AMP_PD_MSK
Definition: admv1014.h:77
bool det_en
Definition: admv1014.h:205
bool p1db_comp_en
Definition: admv1014.h:188
#define ADMV1014_IF_AMP_FINE_GAIN_Q_MSK
Definition: admv1014.h:98
#define ADMV1014_REG_MIXER
Definition: admv1014.h:55
@ DET_PROG_NEG_12_DBM_TO_POS_4DBM
Definition: admv1014.h:161
@ LO_BAND_6_6_TO_9_2_GHZ
Definition: admv1013.h:134
admv1014_det_prog
Digital Rx Detector Program.
Definition: admv1014.h:160
#define ADMV1014_REG_BB_AMP_AGC
Definition: admv1014.h:58
int admv1014_spi_read(struct admv1014_dev *dev, uint8_t reg_addr, uint16_t *data)
Reads data from ADMV1014 over SPI.
Definition: admv1014.c:86
@ LO_BAND_5_4_TO_8_GHZ
Definition: admv1013.h:135
@ ADMV1014_IF_MODE
Definition: admv1014.h:132
int admv1014_remove(struct admv1014_dev *dev)
ADMV1014 Resources Deallocation.
Definition: admv1014.c:467
int admv1014_spi_write(struct admv1014_dev *dev, uint8_t reg_addr, uint16_t data)
Writes data to ADMV1014 over SPI.
Definition: admv1014.c:62
admv1014_quad_se_mode
Switch Differential/Single-Ended Modes.
Definition: admv1014.h:139
@ LO_BAND_6_6_TO_9_2_GHZ
Definition: admv1014.h:151
enum admv1014_input_mode input_mode
Definition: admv1014.h:201
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
int admv1014_get_bb_amp_gain(struct admv1014_dev *dev, uint8_t *gain)
Get Baseband Amp Gain.
Definition: admv1014.c:187
@ LO_BAND_8_62_TO_10_25_GHZ
Definition: admv1014.h:150
int admv1014_set_if_amp_gain(struct admv1014_dev *dev, uint8_t i_coarse_gain, uint8_t q_coarse_gain, uint8_t i_fine_gain, uint8_t q_fine_gain)
Set IF Amp Gain.
Definition: admv1014.c:250
@ DET_PROG_NEG_16_25_DBM_TO_NEG_0_25_DBM
Definition: admv1014.h:166
int admv1014_get_det_prog(struct admv1014_dev *dev, enum admv1014_det_prog *det_prog)
Get Digital Rx Detector.
Definition: admv1014.c:153
enum admv1014_quad_se_mode quad_se_mode
Definition: admv1014.h:203
#define ADMV1014_REG_VVA_TEMP_COMP
Definition: admv1014.h:59
int admv1014_spi_read(struct admv1014_dev *dev, uint8_t reg_addr, uint16_t *data)
Reads data from ADMV1014 over SPI.
Definition: admv1014.c:86
@ ADMV1014_SE_MODE_POS
Definition: admv1014.h:140
#define ADMV1014_BB_AMP_GAIN_CTRL_MSK
Definition: admv1014.h:108
#define ADMV1014_BUFF_SIZE_BYTES
Definition: admv1014.h:122
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
int admv1014_set_phase(struct admv1014_dev *dev, uint8_t i_phase, uint8_t q_phase)
Set LO Amp Phase.
Definition: admv1014.c:208
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
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 ADMV1014_QUAD_FILTERS_MSK
Definition: admv1014.h:86
#define ADMV1014_SPI_READ_CMD
Definition: admv1014.h:123
#define ADMV1014_IF_AMP_COARSE_GAIN_I_MSK
Definition: admv1014.h:97
int admv1014_set_if_amp_gain(struct admv1014_dev *dev, uint8_t i_coarse_gain, uint8_t q_coarse_gain, uint8_t i_fine_gain, uint8_t q_fine_gain)
Set IF Amp Gain.
Definition: admv1014.c:250
int admv1014_set_det_prog(struct admv1014_dev *dev, enum admv1014_det_prog det_prog)
Set Digital Rx Detector.
Definition: admv1014.c:139
int admv1014_get_bb_amp_gain(struct admv1014_dev *dev, uint8_t *gain)
Get Baseband Amp Gain.
Definition: admv1014.c:187
#define ADMV1014_BB_AMP_REF_GEN_MSK
Definition: admv1014.h:107
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
int admv1014_get_if_amp_gain(struct admv1014_dev *dev, uint8_t *i_coarse_gain, uint8_t *q_coarse_gain, uint8_t *i_fine_gain, uint8_t *q_fine_gain)
Get IF Amp Gain.
Definition: admv1014.c:280
#define ADMV1014_SPI_WRITE_CMD
Definition: admv1014.h:124
ADMV1014 Initialization Parameters structure.
Definition: admv1014.h:174
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
ADMV1014 Device Descriptor.
Definition: admv1014.h:195
int admv1014_set_phase(struct admv1014_dev *dev, uint8_t i_phase, uint8_t q_phase)
Set LO Amp Phase.
Definition: admv1014.c:208
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
int admv1014_remove(struct admv1014_dev *dev)
ADMV1014 Resources Deallocation.
Definition: admv1014.c:467
#define ADMV1014_REG_SPI_CONTROL
Definition: admv1014.h:49
Header file of utility functions.
int admv1014_set_det_prog(struct admv1014_dev *dev, enum admv1014_det_prog det_prog)
Set Digital Rx Detector.
Definition: admv1014.c:139
admv1014_quad_filters
LO Filters BW Selection.
Definition: admv1014.h:149
#define ADMV1014_REG_LO_AMP_PHASE_ADJUST1
Definition: admv1014.h:54
#define ADMV1014_P1DB_COMPENSATION_MSK
Definition: admv1014.h:76
@ DET_PROG_NEG_15_DBM_TO_POS_1DBM
Definition: admv1014.h:164
@ LO_BAND_5_4_TO_7_GHZ
Definition: admv1013.h:136
chip_id
Definition: ad9172.h:51
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
bool det_en
Definition: admv1014.h:184
int admv1014_get_phase(struct admv1014_dev *dev, uint8_t *i_phase, uint8_t *q_phase)
Get LO Amp Phase.
Definition: admv1014.c:225