Go to the documentation of this file.
50 #define ADMV1013_REG_SPI_CONTROL 0x00
51 #define ADMV1013_REG_ALARM 0x01
52 #define ADMV1013_REG_ALARM_MASKS 0x02
53 #define ADMV1013_REG_ENABLE 0x03
54 #define ADMV1013_REG_LO_AMP_I 0x05
55 #define ADMV1013_REG_LO_AMP_Q 0x06
56 #define ADMV1013_REG_OFFSET_ADJUST_I 0x07
57 #define ADMV1013_REG_OFFSET_ADJUST_Q 0x08
58 #define ADMV1013_REG_QUAD 0x09
59 #define ADMV1013_REG_VVA_TEMP_COMP 0x0A
62 #define ADMV1013_PARITY_EN_MSK NO_OS_BIT(15)
63 #define ADMV1013_SPI_SOFT_RESET_MSK NO_OS_BIT(14)
64 #define ADMV1013_CHIP_ID_MSK NO_OS_GENMASK(11, 4)
65 #define ADMV1013_CHIP_ID 0xA
66 #define ADMV1013_REVISION_ID_MSK NO_OS_GENMASK(3, 0)
69 #define ADMV1013_PARITY_ERROR_MSK NO_OS_BIT(15)
70 #define ADMV1013_TOO_FEW_ERRORS_MSK NO_OS_BIT(14)
71 #define ADMV1013_TOO_MANY_ERRORS_MSK NO_OS_BIT(13)
72 #define ADMV1013_ADDRESS_RANGE_ERROR_MSK NO_OS_BIT(12)
75 #define ADMV1013_VGA_PD_MSK NO_OS_BIT(15)
76 #define ADMV1013_MIXER_PD_MSK NO_OS_BIT(14)
77 #define ADMV1013_QUAD_PD_MSK NO_OS_GENMASK(13, 11)
78 #define ADMV1013_BG_PD_MSK NO_OS_BIT(10)
79 #define ADMV1013_MIXER_IF_EN_MSK NO_OS_BIT(7)
80 #define ADMV1013_DET_EN_MSK NO_OS_BIT(5)
83 #define ADMV1013_LOAMP_PH_ADJ_FINE_MSK NO_OS_GENMASK(13, 7)
84 #define ADMV1013_MIXER_VGATE_MSK NO_OS_GENMASK(6, 0)
87 #define ADMV1013_MIXER_OFF_ADJ_P_MSK NO_OS_GENMASK(15, 9)
88 #define ADMV1013_MIXER_OFF_ADJ_N_MSK NO_OS_GENMASK(8, 2)
91 #define ADMV1013_QUAD_SE_MODE_MSK NO_OS_GENMASK(9, 6)
92 #define ADMV1013_QUAD_FILTERS_MSK NO_OS_GENMASK(3, 0)
95 #define ADMV1013_VVA_TEMP_COMP_MSK NO_OS_GENMASK(15, 0)
98 #define ADMV1013_BUFF_SIZE_BYTES 3
99 #define ADMV1013_SPI_READ_CMD NO_OS_BIT(7)
100 #define ADMV1013_SPI_WRITE_CMD (0 << 7)
102 #define MIXER_GATE_0_to_1_8_V(x) ((2389 * x/ 1000000 + 8100) / 100)
103 #define MIXER_GATE_1_8_to_2_6_V(x) ((2375 * x/ 1000000 + 125) / 100)
187 uint16_t mask, uint16_t data);
203 uint8_t i_offset_n, uint8_t q_offset_p,
208 uint8_t *i_offset_n, uint8_t *q_offset_p,
209 uint8_t *q_offset_n);
#define ADMV1013_REG_OFFSET_ADJUST_I
Definition: admv1013.h:56
#define ADMV1013_REG_LO_AMP_Q
Definition: admv1013.h:55
#define ADMV1013_QUAD_FILTERS_MSK
Definition: admv1013.h:92
admv1013_quad_se_mode
Switch Differential/Single-Ended Modes.
Definition: admv1013.h:122
struct no_os_spi_init_param * spi_init
Definition: admv1013.h:145
#define ADMV1013_MIXER_VGATE_MSK
Definition: admv1013.h:84
#define ADMV1013_QUAD_SE_MODE_MSK
Definition: admv1013.h:91
@ ADMV1013_IF_MODE
Definition: admv1013.h:115
unsigned long long lo_in
Definition: admv1013.h:147
#define ADMV1013_SPI_READ_CMD
Definition: admv1013.h:99
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
@ ADMV1013_IQ_MODE
Definition: admv1013.h:114
Header file of SPI Interface.
#define ADMV1013_SPI_WRITE_CMD
Definition: admv1013.h:100
int admv1013_init(struct admv1013_dev **device, struct admv1013_init_param *init_param)
Initializes the admv1013.
Definition: admv1013.c:294
int admv1013_spi_update_bits(struct admv1013_dev *dev, uint8_t reg_addr, uint16_t mask, uint16_t data)
Update ADMV1013 register.
Definition: admv1013.c:108
@ LO_BAND_8_62_TO_10_25_GHZ
Definition: admv1013.h:133
unsigned int vcm_uv
Definition: admv1013.h:174
int admv1013_get_iq_phase(struct admv1013_dev *dev, uint8_t *i_phase, uint8_t *q_phase)
Get I/Q Phase Accuracy.
Definition: admv1013.c:204
Header file for admv1013 Driver.
Definition: ad9361_util.h:69
int admv1013_get_iq_offset(struct admv1013_dev *dev, uint8_t *i_offset_p, uint8_t *i_offset_n, uint8_t *q_offset_p, uint8_t *q_offset_n)
Get I/Q Offset Accuracy.
Definition: admv1013.c:264
int admv1013_spi_write(struct admv1013_dev *dev, uint8_t reg_addr, uint16_t data)
Writes data to ADMV1013 over SPI.
Definition: admv1013.c:53
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 ADMV1013_CHIP_ID_MSK
Definition: admv1013.h:64
enum admv1013_input_mode input_mode
Definition: admv1013.h:168
int admv1013_get_iq_offset(struct admv1013_dev *dev, uint8_t *i_offset_p, uint8_t *i_offset_n, uint8_t *q_offset_p, uint8_t *q_offset_n)
Get I/Q Offset Accuracy.
Definition: admv1013.c:264
int admv1013_remove(struct admv1013_dev *dev)
ADMV1013 Resources Deallocation.
Definition: admv1013.c:382
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
int admv1013_set_iq_offset(struct admv1013_dev *dev, uint8_t i_offset_p, uint8_t i_offset_n, uint8_t q_offset_p, uint8_t q_offset_n)
Set I/Q Offset Accuracy.
Definition: admv1013.c:234
#define ADMV1013_DET_EN_MSK
Definition: admv1013.h:80
enum admv1013_quad_se_mode quad_se_mode
Definition: admv1013.h:170
int admv1013_spi_read(struct admv1013_dev *dev, uint8_t reg_addr, uint16_t *data)
Reads data from ADMV1013 over SPI.
Definition: admv1013.c:77
int admv1013_spi_read(struct admv1013_dev *dev, uint8_t reg_addr, uint16_t *data)
Reads data from ADMV1013 over SPI.
Definition: admv1013.c:77
#define ADMV1013_REG_LO_AMP_I
Definition: admv1013.h:54
@ ADMV1013_SE_MODE_NEG
Definition: admv1013.h:124
ADMV1013 Initialization Parameters structure.
Definition: admv1013.h:143
#define ADMV1013_REG_QUAD
Definition: admv1013.h:58
@ LO_BAND_6_6_TO_9_2_GHZ
Definition: admv1013.h:134
int admv1013_set_iq_offset(struct admv1013_dev *dev, uint8_t i_offset_p, uint8_t i_offset_n, uint8_t q_offset_p, uint8_t q_offset_n)
Set I/Q Offset Accuracy.
Definition: admv1013.c:234
@ ADMV1013_SE_MODE_DIFF
Definition: admv1013.h:125
@ LO_BAND_5_4_TO_8_GHZ
Definition: admv1013.h:135
unsigned long long lo_in
Definition: admv1013.h:166
int admv1013_init(struct admv1013_dev **device, struct admv1013_init_param *init_param)
Initializes the admv1013.
Definition: admv1013.c:294
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
@ ADMV1013_SE_MODE_POS
Definition: admv1013.h:123
ADMV1013 Device Descriptor.
Definition: admv1013.h:162
int admv1013_set_iq_phase(struct admv1013_dev *dev, uint8_t i_phase, uint8_t q_phase)
Set I/Q Phase Accuracy.
Definition: admv1013.c:178
bool det_en
Definition: admv1013.h:172
int admv1013_get_iq_phase(struct admv1013_dev *dev, uint8_t *i_phase, uint8_t *q_phase)
Get I/Q Phase Accuracy.
Definition: admv1013.c:204
enum admv1013_input_mode input_mode
Definition: admv1013.h:149
enum admv1013_quad_se_mode quad_se_mode
Definition: admv1013.h:151
#define ADMV1013_REG_SPI_CONTROL
Definition: admv1013.h:50
#define ADMV1013_REG_OFFSET_ADJUST_Q
Definition: admv1013.h:57
#define ADMV1013_LOAMP_PH_ADJ_FINE_MSK
Definition: admv1013.h:83
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
#define ADMV1013_MIXER_OFF_ADJ_P_MSK
Definition: admv1013.h:87
struct no_os_spi_desc * spi_desc
Definition: admv1013.h:164
admv1013_input_mode
Switch Intermediate Frequency or I/Q Mode.
Definition: admv1013.h:113
bool det_en
Definition: admv1013.h:153
#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 ADMV1013_BUFF_SIZE_BYTES
Definition: admv1013.h:98
int admv1013_set_iq_phase(struct admv1013_dev *dev, uint8_t i_phase, uint8_t q_phase)
Set I/Q Phase Accuracy.
Definition: admv1013.c:178
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
unsigned int vcm_uv
Definition: admv1013.h:155
admv1013_quad_filters
LO Filters BW Selection.
Definition: admv1013.h:132
#define ADMV1013_SPI_SOFT_RESET_MSK
Definition: admv1013.h:63
#define ADMV1013_REG_VVA_TEMP_COMP
Definition: admv1013.h:59
#define ADMV1013_MIXER_IF_EN_MSK
Definition: admv1013.h:79
int admv1013_spi_write(struct admv1013_dev *dev, uint8_t reg_addr, uint16_t data)
Writes data to ADMV1013 over SPI.
Definition: admv1013.c:53
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 MIXER_GATE_1_8_to_2_6_V(x)
Definition: admv1013.h:103
#define ADMV1013_CHIP_ID
Definition: admv1013.h:65
int admv1013_remove(struct admv1013_dev *dev)
ADMV1013 Resources Deallocation.
Definition: admv1013.c:382
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
Header file of utility functions.
#define MIXER_GATE_0_to_1_8_V(x)
Definition: admv1013.h:102
#define ADMV1013_REG_ENABLE
Definition: admv1013.h:53
#define ADMV1013_MIXER_OFF_ADJ_N_MSK
Definition: admv1013.h:88
int admv1013_spi_update_bits(struct admv1013_dev *dev, uint8_t reg_addr, uint16_t mask, uint16_t data)
Update ADMV1013 register.
Definition: admv1013.c:108
@ LO_BAND_5_4_TO_7_GHZ
Definition: admv1013.h:136
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140