Debian Codegraph @

thirdparty/analogdevicesinc/no-OS/drivers/ad9371/t_mykonos.h

raw symbols SCIP
1 /*!
2 * \file t_mykonos.h
3 * \brief Contains type definitions for Mykonos API
4 *
5 * Mykonos API version: 1.3.1.3534
6 */
7
8 #ifndef _T_MYKONOS_LIB_H_
9 #define _T_MYKONOS_LIB_H_
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 #include "common.h"
16
17
18 /**
19 * \brief Enum of unique error codes from the Mykonos API functions.
20 * Each error condition in the library should get its own enum value to allow
21 * easy debug of errors.
22 */
23 typedef enum
24 {
25 MYKONOS_ERR_OK=0,
26 MYKONOS_ERR_HAL_LAYER,
27 MYKONOS_ERR_INV_PARM,
28 MYKONOS_ERR_FAILED,
29 MYKONOS_ERR_WAITFOREVENT_INV_PARM,
30 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT,
31 MYKONOS_ERR_SETENSM_INVALID_NEWSTATE_WAIT,
32 MYKONOS_ERR_SETENSM_INVALID_NEWSTATE_ALERT,
33 MYKONOS_ERR_SETENSM_INVALID_NEWSTATE_TXRX,
34 MYKONOS_ERR_SETENSM_INVALIDSTATE,
35 MYKONOS_ERR_PU_RXPATH_INV_PARAM,
36 MYKONOS_ERR_PU_TXPATH_INV_PARAM,
37 MYKONOS_ERR_PU_OBSRXPATH_INV_PARAM,
38 MYKONOS_ERR_INIT_INV_ORXCHAN,
39 MYKONOS_ERR_INIT_INV_RXSYNCB_ORXSYNCB_MODE,
40 MYKONOS_ERR_INIT_INV_TXFIR_INTERPOLATION,
41 MYKONOS_ERR_INIT_INV_TXHB2_INTERPOLATION,
42 MYKONOS_ERR_INIT_INV_TXHB1_INTERPOLATION,
43 MYKONOS_ERR_INIT_INV_RXFIR_DECIMATION,
44 MYKONOS_ERR_INIT_INV_RXDEC5_DECIMATION,
45 MYKONOS_ERR_INIT_INV_RXHB1_DECIMATION,
46 MYKONOS_ERR_INIT_INV_SNIFFER_RHB1,
47 MYKONOS_ERR_INIT_INV_SNIFFER_RFIR_DEC,
48 MYKONOS_ERR_INIT_INV_ORX_RHB1,
49 MYKONOS_ERR_INIT_INV_ORX_RFIR_DEC,
50 MYKONOS_ERR_INIT_INV_ADCDIV,
51 MYKONOS_ERR_INIT_INV_DACDIV,
52 MYKONOS_ERR_INIT_INV_OBSRX_ADCDIV,
53 MYKONOS_ERR_CLKPLL_INV_HSDIV,
54 MYKONOS_ERR_CLKPLL_INV_VCODIV,
55 MYKONOS_ERR_CLKPLL_INV_RXTXPROFILES,
56 MYKONOS_ERR_SETCLKPLL_INV_VCOINDEX,
57 MYKONOS_ERR_SETCLKPLL_INV_FRACWORD,
58 MYKONOS_ERR_SETRFPLL_INV_PLLNAME,
59 MYKONOS_ERR_SETRFPLL_INV_LO_PARM,
60 MYKONOS_ERR_INV_SCALEDDEVCLK_PARAM,
61 MYKONOS_ERR_NULL_DEVICE_PARAM,
62 MYKONOS_ERR_CALCDEVCLK_NULLPARAM,
63 MYKONOS_ERR_SETRFPLL_INV_VCOINDEX,
64 MYKONOS_ERR_SETRFPLL_INV_REFCLK,
65 MYKONOS_ERR_SETORXGAIN_INV_CHANNEL,
66 MYKONOS_ERR_SETORXGAIN_INV_GAIN,
67 MYKONOS_ERR_GETORX1GAIN_INV_POINTER,
68 MYKONOS_ERR_GETORX2GAIN_INV_POINTER,
69 MYKONOS_ERR_GETSNIFFGAIN_INV_POINTER,
70 MYKONOS_ERR_GETOBSRXGAIN_CH_DISABLED,
71 MYKONOS_ERR_SETTX1ATTEN_INV_PARM,
72 MYKONOS_ERR_SETTX1ATTEN_INV_STEPSIZE_PARM,
73 MYKONOS_ERR_SETTX2ATTEN_INV_PARM,
74 MYKONOS_ERR_SETTX2ATTEN_INV_STEPSIZE_PARM,
75 MYKONOS_ERR_PROGRAMFIR_INV_NUMTAPS_PARM,
76 MYKONOS_ERR_PROGRAMFIR_INV_FIRNAME_PARM,
77 MYKONOS_ERR_RXFIR_INV_GAIN_PARM,
78 MYKONOS_ERR_OBSRXFIR_INV_GAIN_PARM,
79 MYKONOS_ERR_SRXFIR_INV_GAIN_PARM,
80 MYKONOS_ERR_TXFIR_INV_GAIN_PARM,
81 MYKONOS_ERR_READFIR_NULL_PARM,
82 MYKONOS_ERR_READFIR_COEFS_NULL,
83 MYKONOS_ERR_READFIR_INV_FIRNAME_PARM,
84 MYKONOS_ERR_READFIR_INV_NUMTAPS_PARM,
85 MYKONOS_ERR_SETRX1GAIN_INV_GAIN_PARM,
86 MYKONOS_ERR_SETRX2GAIN_INV_GAIN_PARM,
87 MYKONOS_ERR_INITSER_INV_VCODIV_PARM,
88 MYKONOS_ERR_INITDES_INV_VCODIV_PARM,
89 MYKONOS_ERR_SER_INV_M_PARM,
90 MYKONOS_ERR_SER_INV_L_PARM,
91 MYKONOS_ERR_SER_INV_HSCLK_PARM,
92 MYKONOS_ERR_SER_INV_LANERATE_PARM,
93 MYKONOS_ERR_SER_INV_LANEEN_PARM,
94 MYKONOS_ERR_SER_INV_AMP_PARM,
95 MYKONOS_ERR_SER_INV_PREEMP_PARM,
96 MYKONOS_ERR_SER_INV_LANEPN_PARM,
97 MYKONOS_ERR_SER_LANE_CONFLICT_PARM,
98 MYKONOS_ERR_SER_INV_TXSER_DIV_PARM,
99 MYKONOS_ERR_SER_LANE_RATE_CONFLICT_PARM,
100 MYKONOS_ERR_SER_INV_REAL_IF_DATA_PARM,
101 MYKONOS_ERR_HS_AND_LANE_RATE_NOT_INTEGER_MULT,
102 MYKONOS_ERR_DES_HS_AND_LANE_RATE_NOT_INTEGER_MULT,
103 MYKONOS_ERR_DESER_INV_M_PARM,
104 MYKONOS_ERR_DESER_INV_L_PARM,
105 MYKONOS_ERR_DESER_INV_HSCLK_PARM,
106 MYKONOS_ERR_DESER_INV_LANERATE_PARM,
107 MYKONOS_ERR_DESER_INV_LANEEN_PARM,
108 MYKONOS_ERR_DESER_INV_EQ_PARM,
109 MYKONOS_ERR_DESER_INV_LANEPN_PARM,
110 MYKONOS_ERR_FRAMER_INV_M_PARM,
111 MYKONOS_ERR_FRAMER_INV_BANKID_PARM,
112 MYKONOS_ERR_FRAMER_INV_LANEID_PARM,
113 MYKONOS_ERR_FRAMER_INV_K_OFFSET_PARAM,
114 MYKONOS_ERR_FRAMER_INV_REAL_IF_DATA_PARM,
115 MYKONOS_ERR_OBSRX_FRAMER_INV_M_PARM,
116 MYKONOS_ERR_OBSRX_FRAMER_INV_BANKID_PARM,
117 MYKONOS_ERR_OBSRX_FRAMER_INV_LANEID_PARM,
118 MYKONOS_ERR_OBSRX_FRAMER_INV_K_OFFSET_PARAM,
119 MYKONOS_ERR_OBSRX_FRAMER_INV_REAL_IF_DATA_PARM,
120 MYKONOS_ERR_DEFRAMER_INV_M_PARM,
121 MYKONOS_ERR_DEFRAMER_INV_BANKID_PARM,
122 MYKONOS_ERR_ERR_DEFRAMER_INV_LANEID_PARM,
123 MYKONOS_ERR_DEFRAMER_INV_K_OFFSET_PARAM,
124 MYKONOS_ERR_DEFRAMER_INV_K_PARAM,
125 MYKONOS_ERR_DEFRAMER_INV_FK_PARAM,
126 MYKONOS_ERR_RX_FRAMER_INV_PRBS_POLYORDER_PARAM,
127 MYKONOS_ERR_OBSRX_FRAMER_INV_PRBS_POLYORDER_PARAM,
128 MYKONOS_ERR_DEFRAMER_INV_PRBS_ENABLE_PARAM,
129 MYKONOS_ERR_DEFRAMER_INV_PRBS_POLYORDER_PARAM,
130 MYKONOS_ERR_DEFRAMER_INV_PRBS_CNTR_SEL_PARAM,
131 MYKONOS_ERR_INITARM_INV_DATARATE_PARM,
132 MYKONOS_ERR_INITARM_INV_REGCLK,
133 MYKONOS_ERR_INITARM_INV_ARMCLK_PARAM,
134 MYKONOS_ERR_LOADHEX_INV_CHARCOUNT,
135 MYKONOS_ERR_LOADHEX_INVALID_FIRSTCHAR,
136 MYKONOS_ERR_LOADHEX_INVALID_CHKSUM,
137 MYKONOS_ERR_LOADBIN_INVALID_BYTECOUNT,
138 MYKONOS_ERR_ARM_INVALID_BUILDCHKSUM,
139 MYKONOS_ERR_READARMMEM_INV_ADDR_PARM,
140 MYKONOS_ERR_WRITEARMMEM_INV_ADDR_PARM,
141 MYKONOS_ERR_ARMCMD_INV_OPCODE_PARM,
142 MYKONOS_ERR_ARMCMD_INV_NUMBYTES_PARM,
143 MYKONOS_ERR_ARMCMDSTATUS_INV_OPCODE_PARM,
144 MYKONOS_ERR_CHECKDEVSTRUCT_SPI,
145 MYKONOS_ERR_CHECKDEVSTRUCT_RX,
146 MYKONOS_ERR_CHECKDEVSTRUCT_RXSUB,
147 MYKONOS_ERR_CHECKDEVSTRUCT_RXFIR,
148 MYKONOS_ERR_CHECKDEVSTRUCT_TX,
149 MYKONOS_ERR_CHECKDEVSTRUCT_TXSUB,
150 MYKONOS_ERR_CHECKDEVSTRUCT_TXFIR,
151 MYKONOS_ERR_CHECKDEVSTRUCT_OBSRX,
152 MYKONOS_ERR_CHECKDEVSTRUCT_OBSRXSUB,
153 MYKONOS_ERR_CHECKDEVSTRUCT_SNIFFERFIR,
154 MYKONOS_ERR_CHECKDEVSTRUCT_ORXFIR,
155 MYKONOS_ERR_CHECKDEVSTRUCT_ORXGAINCTRL,
156 MYKONOS_ERR_CHECKDEVSTRUCT_SNIFFERGAINCTRL,
157 MYKONOS_ERR_CHECKDEVSTRUCT_OBSRXFRAMER,
158 MYKONOS_ERR_INITSER_INV_PROFILE,
159 MYKONOS_ERR_INITDES_INV_TXPROFILE,
160 MYKONOS_ERR_JESD204B_ILAS_MISMATCH,
161 MYKONOS_ERR_RXGAINTABLE_INV_CHANNEL,
162 MYKONOS_ERR_RXGAINTABLE_INV_GAIN_INDEX_RANGE,
163 MYKONOS_ERR_WRITE_CFG_MEMORY_FAILED,
164 MYKONOS_ERR_INV_RXFRAMER_PCLKDIV_PARM,
165 MYKONOS_ERR_RXFRAMER_INV_FK_PARAM,
166 MYKONOS_ERR_OBSRXFRAMER_INV_FK_PARAM,
167 MYKONOS_ERR_INV_OBSRXFRAMER_PCLKDIV_PARM,
168 MYKONOS_ERR_PU_OBSRXPATH_INV_LOSOURCE_PARAM,
169 MYKONOS_ERR_ARM_RADIOON_FAILED,
170 MYKONOS_ERR_INV_RX_GAIN_MODE_PARM,
171 MYKONOS_ERR_INV_ORX_GAIN_MODE_PARM,
172 MYKONOS_ERR_INV_AGC_RX_STRUCT_INIT,
173 MYKONOS_ERR_INV_AGC_RX_APD_THRESH_DIFF_VS_ATTACK_GAIN_STEP,
174 MYKONOS_ERR_INV_AGC_RX_PEAK_WAIT_TIME_PARM,
175 MYKONOS_ERR_INV_AGC_RX_GAIN_UPDATE_TIME_PARM,
176 MYKONOS_ERR_INV_AGC_RX_APD_HIGH_THRESH_PARM,
177 MYKONOS_ERR_INV_AGC_RX_APD_LOW_THRESH_PARM,
178 MYKONOS_ERR_INV_AGC_RX_BLOCK_DET_DECAY_PARM,
179 MYKONOS_ERR_INV_AGC_RX_APD_GAIN_STEP_PARM,
180 MYKONOS_ERR_INV_AGC_RX_HB2_GAIN_STEP_PARM,
181 MYKONOS_ERR_INV_AGC_RX_RECOVERY_GAIN_STEP_PARM,
182 MYKONOS_ERR_INV_AGC_PMD_MEAS_CONFIG,
183 MYKONOS_ERR_INV_AGC_PMD_MEAS_DURATION,
184 MYKONOS_ERR_INV_AGC_RX_ENABLE_SYNC_PULSE_GAIN_COUNTER,
185 MYKONOS_ERR_INV_AGC_RX_LOW_THS_PREV_GAIN_INC,
186 MYKONOS_ERR_INV_AGC_RX_PEAK_STRUCT_INIT,
187 MYKONOS_ERR_INV_AGC_RX_PEAK_THRESH_MODE,
188 MYKONOS_ERR_INV_AGC_RX_PWR_STRUCT_INIT,
189 MYKONOS_ERR_INV_AGC_RX_RESET_ON_RX_ENABLE,
190 MYKONOS_ERR_INV_AGC_RX_SLOW_LOOP_SETTLING_DELAY,
191 MYKONOS_ERR_INV_AGC_RX1_MAX_GAIN_INDEX,
192 MYKONOS_ERR_INV_AGC_RX1_MIN_GAIN_INDEX,
193 MYKONOS_ERR_INV_AGC_RX2_MAX_GAIN_INDEX,
194 MYKONOS_ERR_INV_AGC_RX2_MIN_GAIN_INDEX,
195 MYKONOS_ERR_INV_AGC_RX_PMD_LOWER_HIGH_THRESH,
196 MYKONOS_ERR_INV_AGC_RX_PMD_LOWER_LOW_THRESH,
197 MYKONOS_ERR_INV_AGC_RX_PMD_UPPER_HIGH_THRESH,
198 MYKONOS_ERR_INV_AGC_RX_PMD_UPPER_LOW_THRESH,
199 MYKONOS_ERR_INV_AGC_RX_PMD_LOWER_LOW_GAIN_STEP,
200 MYKONOS_ERR_INV_AGC_RX_PMD_LOWER_HIGH_GAIN_STEP,
201 MYKONOS_ERR_INV_AGC_RX_PMD_UPPER_LOW_GAIN_STEP,
202 MYKONOS_ERR_INV_AGC_RX_PMD_UPPER_HIGH_GAIN_STEP,
203 MYKONOS_ERR_INV_AGC_RX_APD_HIGH_GAIN_STEP_PARM,
204 MYKONOS_ERR_INV_AGC_RX_APD_LOW_GAIN_STEP_PARM,
205 MYKONOS_ERR_INV_AGC_RX_HB2_HIGH_GAIN_STEP_PARM,
206 MYKONOS_ERR_INV_AGC_RX_HB2_HIGH_THRESH_PARM,
207 MYKONOS_ERR_INV_AGC_RX_HB2_LOW_GAIN_STEP_PARM,
208 MYKONOS_ERR_INV_AGC_RX_HB2_LOW_THRESH_PARM,
209 MYKONOS_ERR_INV_AGC_RX_HB2_VERY_LOW_GAIN_STEP_PARM,
210 MYKONOS_ERR_INV_AGC_RX_HB2_VERY_LOW_THRESH_PARM,
211 MYKONOS_ERR_INV_AGC_RX_PKDET_FAST_ATTACK_VALUE,
212 MYKONOS_ERR_INV_AGC_RX_HB2_OVLD_ENABLE,
213 MYKONOS_ERR_INV_AGC_RX_HB2_OVLD_DUR_CNT,
214 MYKONOS_ERR_INV_AGC_RX_HB2_OVLD_THRESH_CNT,
215 MYKONOS_ERR_INV_AGC_OBSRX_STRUCT_INIT,
216 MYKONOS_ERR_INV_AGC_OBSRX_APD_THRESH_DIFF_VS_ATTACK_GAIN_STEP,
217 MYKONOS_ERR_INV_AGC_OBSRX_PEAK_WAIT_TIME_PARM,
218 MYKONOS_ERR_INV_AGC_OBSRX_GAIN_UPDATE_TIME_PARM,
219 MYKONOS_ERR_INV_AGC_OBSRX_APD_HIGH_THRESH_PARM,
220 MYKONOS_ERR_INV_AGC_OBSRX_APD_LOW_THRESH_PARM,
221 MYKONOS_ERR_INV_AGC_OBSRX_BLOCK_DET_DECAY_PARM,
222 MYKONOS_ERR_INV_AGC_OBSRX_APD_GAIN_STEP_PARM,
223 MYKONOS_ERR_INV_AGC_OBSRX_HB2_GAIN_STEP_PARM,
224 MYKONOS_ERR_INV_AGC_OBSRX_RECOVERY_GAIN_STEP_PARM,
225 MYKONOS_ERR_INV_AGC_OBSRX_MAX_GAIN_INDEX,
226 MYKONOS_ERR_INV_AGC_OBSRX_MIN_GAIN_INDEX,
227 MYKONOS_ERR_INV_AGC_OBSRX_SELECT,
228 MYKONOS_ERR_INV_AGC_OBSRX_PMD_MEAS_CONFIG,
229 MYKONOS_ERR_INV_AGC_OBSRX_PMD_MEAS_DURATION,
230 MYKONOS_ERR_INV_AGC_OBSRX_ENABLE_SYNC_PULSE_GAIN_COUNTER,
231 MYKONOS_ERR_INV_AGC_OBSRX_LOW_THS_PREV_GAIN_INC,
232 MYKONOS_ERR_INV_AGC_OBSRX_PEAK_STRUCT_INIT,
233 MYKONOS_ERR_INV_AGC_OBSRX_PEAK_THRESH_MODE,
234 MYKONOS_ERR_INV_AGC_OBSRX_PWR_STRUCT_INIT,
235 MYKONOS_ERR_INV_AGC_OBSRX_RESET_ON_RX_ENABLE,
236 MYKONOS_ERR_INV_AGC_OBSRX_SLOW_LOOP_SETTLING_DELAY,
237 MYKONOS_ERR_INV_AGC_OBSRX1_MAX_GAIN_INDEX,
238 MYKONOS_ERR_INV_AGC_OBSRX1_MIN_GAIN_INDEX,
239 MYKONOS_ERR_INV_AGC_OBSRX2_MAX_GAIN_INDEX,
240 MYKONOS_ERR_INV_AGC_OBSRX2_MIN_GAIN_INDEX,
241 MYKONOS_ERR_INV_AGC_OBSRX_PMD_LOWER_HIGH_THRESH,
242 MYKONOS_ERR_INV_AGC_OBSRX_PMD_LOWER_LOW_THRESH,
243 MYKONOS_ERR_INV_AGC_OBSRX_PMD_UPPER_HIGH_THRESH,
244 MYKONOS_ERR_INV_AGC_OBSRX_PMD_UPPER_LOW_THRESH,
245 MYKONOS_ERR_INV_AGC_OBSRX_PMD_LOWER_LOW_GAIN_STEP,
246 MYKONOS_ERR_INV_AGC_OBSRX_PMD_LOWER_HIGH_GAIN_STEP,
247 MYKONOS_ERR_INV_AGC_OBSRX_PMD_UPPER_LOW_GAIN_STEP,
248 MYKONOS_ERR_INV_AGC_OBSRX_PMD_UPPER_HIGH_GAIN_STEP,
249 MYKONOS_ERR_INV_AGC_OBSRX_APD_HIGH_GAIN_STEP_PARM,
250 MYKONOS_ERR_INV_AGC_OBSRX_APD_LOW_GAIN_STEP_PARM,
251 MYKONOS_ERR_INV_AGC_OBSRX_HB2_HIGH_GAIN_STEP_PARM,
252 MYKONOS_ERR_INV_AGC_OBSRX_HB2_HIGH_THRESH_PARM,
253 MYKONOS_ERR_INV_AGC_OBSRX_HB2_LOW_GAIN_STEP_PARM,
254 MYKONOS_ERR_INV_AGC_OBSRX_HB2_LOW_THRESH_PARM,
255 MYKONOS_ERR_INV_AGC_OBSRX_HB2_VERY_LOW_GAIN_STEP_PARM,
256 MYKONOS_ERR_INV_AGC_OBSRX_HB2_VERY_LOW_THRESH_PARM,
257 MYKONOS_ERR_INV_AGC_OBSRX_PKDET_FAST_ATTACK_VALUE,
258 MYKONOS_ERR_INV_AGC_OBSRX_HB2_OVLD_ENABLE,
259 MYKONOS_ERR_INV_AGC_OBSRX_HB2_OVLD_DUR_CNT,
260 MYKONOS_ERR_INV_AGC_OBSRX_HB2_OVLD_THRESH_CNT,
261 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_CALPLL_LOCK,
262 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_CLKPLLCP,
263 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_CLKPLL_LOCK,
264 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_RXPLLCP,
265 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_RXPLL_LOCK,
266 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_TXPLLCP,
267 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_TXPLL_LOCK,
268 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_SNIFFPLLCP,
269 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_SNIFFPLL_LOCK,
270 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_RXBBFCALDONE,
271 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_TXBBFCALDONE,
272 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_RFDCCALDONE,
273 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_ADCTUNECALDONE,
274 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_RX1ADCPROFILE,
275 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_RX2ADCPROFILE,
276 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_ORXADCPROFILE,
277 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_RCALDONE,
278 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_ARMBUSY,
279 MYKONOS_ERR_WAITFOREVENT_TIMEDOUT_INITARMDONE,
280 MYKONOS_ERR_TIMEDOUT_ARMMAILBOXBUSY,
281 MYKONOS_ERR_PU_OBSRXPATH_ARMERROR,
282 MYKONOS_ERR_EN_TRACKING_CALS_ARMSTATE_ERROR,
283 MYKONOS_ERR_EN_TRACKING_CALS_ARMERROR,
284 MYKONOS_ERR_SETRFPLL_ARMERROR,
285 MYKONOS_ERR_INIT_INV_TXINPUTHB_PARM,
286 MYKONOS_ERR_LOAD_ADCPROFILE_INV_VCODIV,
287 MYKONOS_ERR_LOAD_ADCPROFILE_CUSTOM_RXREQUIRED,
288 MYKONOS_ERR_LOAD_ADCPROFILE_CUSTOM_ORXREQUIRED,
289 MYKONOS_ERR_LOAD_ADCPROFILE_CUSTOM_SNRXREQUIRED,
290 MYKONOS_ERR_SETUP_PA_PROT_INV_AVG_DURATION,
291 MYKONOS_ERR_SETUP_PA_PROT_INV_STICKY_ENABLE,
292 MYKONOS_ERR_SETUP_PA_PROT_INV_ATTEN_STEP,
293 MYKONOS_ERR_SETUP_PA_PROT_INV_ATTEN_ENABLE,
294 MYKONOS_ERR_SETUP_PA_PROT_INV_POWER_THRESH,
295 MYKONOS_ERR_SETUP_PA_PROT_INV_TX_CHANNEL,
296 MYKONOS_ERR_GET_DAC_PWR_INV_POINTER,
297 MYKONOS_ERR_GET_PA_FLAG_STATUS_INV_POINTER,
298 MYKONOS_ERR_GET_OBSRX_OVERLOADS_NULL_PARM,
299 MYKONOS_ERR_GET_RX1_OVERLOADS_NULL_PARM,
300 MYKONOS_ERR_GET_RX2_OVERLOADS_NULL_PARM,
301 MYKONOS_ERR_GETRADIOSTATE_NULL_PARAM,
302 MYKONOS_ERR_ABORT_INITCALS_NULL_PARAM,
303 MYKONOS_ERR_ARM_RADIOOFF_FAILED,
304 MYKONOS_ERR_WAIT_INITCALS_NULL_PARAM,
305 MYKONOS_ERR_WAIT_INITCALS_CALFAILED,
306 MYKONOS_ERR_WAIT_INITCALS_ARMERROR,
307 MYKONOS_ERR_CHECK_PLL_LOCK_NULL_PARM,
308 MYKONOS_ERR_GET_TXFILTEROVRG_NULL_PARM,
309 MYKONOS_ERR_PROGRAM_RXGAIN_TABLE_NULL_PARM,
310 MYKONOS_ERR_PROGRAMFIR_NULL_PARM,
311 MYKONOS_ERR_PROGRAMFIR_COEFS_NULL,
312 MYKONOS_ERR_READ_DEFRAMERSTATUS_NULL_PARAM,
313 MYKONOS_ERR_READ_DEFRAMERPRBS_NULL_PARAM,
314 MYKONOS_ERR_READ_ORXFRAMERSTATUS_NULL_PARAM,
315 MYKONOS_ERR_READ_RXFRAMERSTATUS_NULL_PARAM,
316 MYKONOS_ERR_ARMCMDSTATUS_NULL_PARM,
317 MYKONOS_ERR_READARMCMDSTATUS_INV_OPCODE_PARM,
318 MYKONOS_ERR_READARMCMDSTATUS_NULL_PARM,
319 MYKONOS_ERR_READARMCMDSTATUSBYTE_NULL_PARM,
320 MYKONOS_ERR_ARMCMD_NULL_PARM,
321 MYKONOS_ERR_WRITEARMMEM_NULL_PARM,
322 MYKONOS_ERR_LOADBIN_NULL_PARAM,
323 MYKONOS_ERR_GETTX1ATTEN_NULL_PARM,
324 MYKONOS_ERR_GETTX2ATTEN_NULL_PARM,
325 MYKONOS_ERR_ENFRAMERLINK_INV_LANESEN_PARM,
326 MYKONOS_ERR_ENOBSFRAMERLINK_INV_LANESEN_PARM,
327 MYKONOS_ERR_ENTXNCO_TXPROFILE_INVALID,
328 MYKONOS_ERR_ENTXNCO_TX1_FREQ_INVALID,
329 MYKONOS_ERR_ENTXNCO_TX2_FREQ_INVALID,
330 MYKONOS_ERR_JESD204B_ILAS_MISMATCH_NULLPARAM,
331 MYKONOS_ERR_LOAD_LBADCPROFILE_ARMMEM_FAILED,
332 MYKONOS_ERR_LOAD_SNRXADCPROFILE_ARMMEM_FAILED,
333 MYKONOS_ERR_LOAD_ADCPROFILE_SNRX_ADCDIV_ZERO,
334 MYKONOS_ERR_LOAD_ORXADCPROFILE_ARMMEM_FAILED,
335 MYKONOS_ERR_LOAD_ADCPROFILE_ORXADCDIV_ZERO,
336 MYKONOS_ERR_LOAD_RXADCPROFILE_ARMMEM_FAILED,
337 MYKONOS_ERR_LOAD_ADCPROFILE_RXADCDIV_ZERO,
338 MYKONOS_ERR_LOAD_ADCPROFILE_CUSTOM_LBREQUIRED,
339 MYKONOS_ERR_LOAD_ADCPROFILE_MISSING_ORX_PROFILE,
340 MYKONOS_ERR_GETRFPLL_INV_PLLNAME,
341 MYKONOS_ERR_GETRFPLL_ARMERROR,
342 MYKONOS_ERR_GETRFPLL_NULLPARAM,
343 MYKONOS_ERR_INITARM_INV_VCODIV,
344 MYKONOS_ERR_GET_PLLFREQ_INV_HSDIV,
345 MYKONOS_ERR_GET_PLLFREQ_INV_REFCLKDIV,
346 MYKONOS_ERR_SETORXGAIN_INV_ORX1GAIN,
347 MYKONOS_ERR_SETORXGAIN_INV_ORX2GAIN,
348 MYKONOS_ERR_SETORXGAIN_INV_SNRXGAIN,
349 MYKONOS_ERR_GET_RX1_DEC_POWER_NUM_SAMPLES,
350 MYKONOS_ERR_GET_RX1_DEC_POWER_NULL_PARM,
351 MYKONOS_ERR_GET_RX2_DEC_POWER_NUM_SAMPLES,
352 MYKONOS_ERR_GET_RX2_DEC_POWER_NULL_PARM,
353 MYKONOS_ERR_GET_OBSRX_DEC_POWER_NUM_SAMPLES,
354 MYKONOS_ERR_GET_OBSRX_DEC_POWER_NULL_PARM,
355 MYKONOS_ERR_GETARMVER_NULL_PARM,
356 MYKONOS_ERR_EN_CLGCTRACKING_ARMSTATE_ERROR,
357 MYKONOS_ERR_EN_DPDTRACKING_ARMSTATE_ERROR,
358 MYKONOS_ERR_RESTDPDMOD_WRONGBUFFERSIZE,
359 MYKONOS_ERR_RESTDPDMOD_ARMSTATE,
360 MYKONOS_ERR_RESTDPDMOD_INVALID_TXCHANNEL,
361 MYKONOS_ERR_RESTDPDMOD_ARMERRFLAG,
362 MYKONOS_ERR_SAVDPDMOD_WRONGBUFFERSIZE,
363 MYKONOS_ERR_SAVDPDMOD_ARMSTATE,
364 MYKONOS_ERR_SAVDPDMOD_INVALID_TXCHANNEL,
365 MYKONOS_ERR_SAVDPDMOD_ARMERRFLAG,
366 MYKONOS_ERR_WRITEARMCFG_ARMERRFLAG,
367 MYKONOS_ERR_CFGDPD_TXORX_PROFILE_INV,
368 MYKONOS_ERR_CFGDPD_NULL_DPDCFGSTRUCT,
369 MYKONOS_ERR_CFGDPD_ARMSTATE_ERROR,
370 MYKONOS_ERR_CFGDPD_INV_DPDDAMPING,
371 MYKONOS_ERR_CFGDPD_INV_DPDSAMPLES,
372 MYKONOS_ERR_CFGDPD_INV_DPDOUTLIERTHRESH,
373 MYKONOS_ERR_CFGDPD_INV_DPDPRIORWEIGHT,
374 MYKONOS_ERR_CFGCLGC_INV_DESIREDGAIN,
375 MYKONOS_ERR_CFGCLGC_INV_TXATTENLIMIT,
376 MYKONOS_ERR_CFGCLGC_INV_CLGC_CTRLRATIO,
377 MYKONOS_ERR_SETCLGCGAIN_INV_DESIREDGAIN,
378 MYKONOS_ERR_SETCLGCGAIN_INV_TXCHANNEL,
379 MYKONOS_ERR_SETCLGCGAIN_TRACK_ARMERRFLAG,
380 MYKONOS_ERR_CFGDPD_INV_DPD_ADDDELAY,
381 MYKONOS_ERR_CFGDPD_INV_PNSEQLEVEL,
382 MYKONOS_ERR_READARMCFG_ARMERRFLAG,
383 MYKONOS_ERR_GETPENDTRKCALS_NULL_PARAM,
384 MYKONOS_ERR_ARMCMDSTATUS_ARMERROR,
385 MYKONOS_ERR_WAITARMCMDSTATUS_TIMEOUT,
386 MYKONOS_ERR_PU_GETOBSRXPATH_ARMERROR,
387 MYKONOS_ERR_GETDPDCFG_NULL_DPDCFGSTRUCT,
388 MYKONOS_ERR_GETDPDCFG_TXORX_PROFILE_INV,
389 MYKONOS_ERR_GETDPDSTATUS_ARMERRFLAG,
390 MYKONOS_ERR_GETDPDSTATUS_NULLPARAM,
391 MYKONOS_ERR_SETDEFOBSRXPATH_NULL_OBSRX_STRUCT,
392 MYKONOS_ERR_SETDEFOBSRXPATH_NULL_DEF_OBSRX_STRUCT,
393 MYKONOS_ERR_GETCLGCSTATUS_NULLPARAM,
394 MYKONOS_ERR_GETCLGCSTATUS_ARMERRFLAG,
395 MYKONOS_ERR_CHECKDEVSTRUCT_NULLDEVPOINTER,
396 MYKONOS_ERR_READ_DEFFIFODEPTH_NULL_PARAM,
397 MYKONOS_ERR_READ_DEFFIFODEPTH_LMFCCOUNT_NULL_PARAM,
398 MYKONOS_ERR_GETDPDSTATUS_INV_CH,
399 MYKONOS_ERR_GETCLGCSTATUS_INV_CH,
400 MYKONOS_ERR_INIT_INV_TXINPUTHB_INV_RATE,
401 MYKONOS_ERR_INIT_INV_TXINPUTHB0_INV_RATE,
402 MYKONOS_ERR_TXFIR_TAPSEXCEEDED,
403 MYKONOS_ERR_TXFIR_INV_NUMROWS,
404 MYKONOS_ERR_TXFIR_INV_NUMTAPS_PARM,
405 MYKONOS_ERR_RXFIR_TAPSEXCEEDED,
406 MYKONOS_ERR_ORXFIR_TAPSEXCEEDED,
407 MYKONOS_ERR_SNRXFIR_TAPSEXCEEDED,
408 MYKONOS_ERR_GETINITCALSTATUS_NULL_PARAM,
409 MYKONOS_ERR_GETINITCALSTATUS_ARMERROR,
410 MYKONOS_ERR_CFGDPD_INV_NUMWEIGHTS,
411 MYKONOS_ERR_CFGDPD_INV_MODELVERSION,
412 MYKONOS_ERR_SETDPDACT_INV_TXCHANNEL,
413 MYKONOS_ERR_SETDPDACT_INV_STATE,
414 MYKONOS_ERR_SETDPDACT_ARMERRFLAG,
415 MYKONOS_ERR_CFGCLGC_TXORX_PROFILE_INV,
416 MYKONOS_ERR_CFGCLGC_NULL_CLGCCFGSTRUCT,
417 MYKONOS_ERR_CFGCLGC_ARMSTATE_ERROR,
418 MYKONOS_ERR_GETCLGCCFG_TXORX_PROFILE_INV,
419 MYKONOS_ERR_GETCLGCCFG_NULL_CFGSTRUCT,
420 MYKONOS_ERR_CALCDIGCLK_NULLDEV_PARAM,
421 MYKONOS_ERR_CALCDIGCLK_NULL_CLKSTRUCT,
422 MYKONOS_ERR_CFGCLGC_INV_CLGC_ADDDELAY,
423 MYKONOS_ERR_CFGCLGC_INV_PNSEQLEVEL,
424 MYKONOS_ERR_CFGVSWR_TXORX_PROFILE_INV,
425 MYKONOS_ERR_CFGVSWR_ARMSTATE_ERROR,
426 MYKONOS_ERR_CFGVSWR_INV_3P3GPIOPIN,
427 MYKONOS_ERR_CFGVSWR_INV_PNSEQLEVEL,
428 MYKONOS_ERR_CFGVSWR_INV_VSWR_ADDDELAY,
429 MYKONOS_ERR_CFGVSWR_NULL_VSWRCFGSTRUCT,
430 MYKONOS_ERR_GETVSWRCFG_NULL_CFGSTRUCT,
431 MYKONOS_ERR_GETVSWRCFG_TXORX_PROFILE_INV,
432 MYKONOS_ERR_GETVSWRSTATUS_ARMERRFLAG,
433 MYKONOS_ERR_GETVSWRSTATUS_INV_CH,
434 MYKONOS_ERR_GETVSWRSTATUS_NULLPARAM,
435 MYKONOS_ERR_SET_RX_MAX_GAIN_INDEX,
436 MYKONOS_ERR_SET_RX_MIN_GAIN_INDEX,
437 MYKONOS_ERR_AGC_MIN_MAX_RX_CHANNEL,
438 MYKONOS_ERR_SET_ORX_MAX_GAIN_INDEX_CHANNEL,
439 MYKONOS_ERR_SET_ORX_MAX_GAIN_INDEX,
440 MYKONOS_ERR_SET_ORX_MIN_GAIN_INDEX,
441 MYKONOS_ERR_AGC_MIN_MAX_ORX_CHANNEL,
442 MYKONOS_ERR_RX1_TEMP_GAIN_COMP_RANGE,
443 MYKONOS_ERR_RX2_TEMP_GAIN_COMP_RANGE,
444 MYKONOS_ERR_OBS_RX_TEMP_GAIN_COMP_RANGE,
445 MYKONOS_ERR_RX1_TEMP_GAIN_COMP_STEP,
446 MYKONOS_ERR_RX2_TEMP_GAIN_COMP_STEP,
447 MYKONOS_ERR_OBS_RX_TEMP_GAIN_COMP_STEP,
448 MYKONOS_ERR_RX1_TEMP_GAIN_COMP_NULL,
449 MYKONOS_ERR_RX2_TEMP_GAIN_COMP_NULL,
450 MYKONOS_ERR_OBS_RX_TEMP_GAIN_COMP_NULL,
451 MYKONOS_ERR_GETTXLOLSTATUS_NULLPARAM,
452 MYKONOS_ERR_GETTXLOLSTATUS_INV_CH,
453 MYKONOS_ERR_GETTXLOLSTATUS_ARMERRFLAG,
454 MYKONOS_ERR_GETTXQECSTATUS_NULLPARAM,
455 MYKONOS_ERR_GETTXQECSTATUS_INV_CH,
456 MYKONOS_ERR_GETTXQECSTATUS_ARMERRFLAG,
457 MYKONOS_ERR_GETRXQECSTATUS_NULLPARAM,
458 MYKONOS_ERR_GETRXQECSTATUS_INV_CH,
459 MYKONOS_ERR_GETRXQECSTATUS_ARMERRFLAG,
460 MYKONOS_ERR_GETORXQECSTATUS_NULLPARAM,
461 MYKONOS_ERR_GETORXQECSTATUS_INV_CH,
462 MYKONOS_ERR_GETORXQECSTATUS_ARMERRFLAG,
463 MYKONOS_ERR_RESCHEDULE_TRACK_CAL_INV,
464 MYKONOS_ERR_RESCHEDULE_TRACK_ARMERRFLAG,
465
466 MYKONOS_ERR_SETSTATEALL_TRACK_CAL_INV,
467 MYKONOS_ERR_SETSTATEALL_TRACK_ARMERRFLAG,
468
469 MYKONOS_ERR_GETSTATEALL_TRACK_NULL_PARAM,
470 MYKONOS_ERR_GETSTATEALL_TRACK_ARMERRFLAG,
471 MYKONOS_ERR_GETSTATEALL_TRACK_ARMERROR,
472
473 MYKONOS_ERR_SETSTATE_TRACK_CAL_INV,
474 MYKONOS_ERR_SETSTATE_TRACK_ARMERRFLAG,
475
476 MYKONOS_ERR_GETSTATE_TRACK_NULL_PARAM,
477 MYKONOS_ERR_GETSTATE_TRACK_ARMERRFLAG,
478 MYKONOS_ERR_GETSTATE_TRACK_ARMERROR,
479
480 MYKONOS_ERR_ARMSTATE_PROFILE_ERROR,
481 MYKONOS_ERR_ARMSTATE_CAL_ERROR,
482 MYKONOS_ERR_ARMSTATE_EXCEPTION,
483 MYKONOS_ERR_WAITARMCSTATE_TIMEOUT,
484
485 MYKONOS_ERR_GETPRODUCTID_NULL_PARAM,
486 MYKONOS_ERR_GET_API_VERSION_NULL_PARAM,
487
488 MYKONOS_ERR_PROFILES_HSDIGCLK,
489 MYKONOS_ERR_RXPROFILE_RXCHANNEL,
490 MYKONOS_ERR_RXPROFILE_IQRATE,
491 MYKONOS_ERR_RXPROFILE_RFBW,
492 MYKONOS_ERR_RXPROFILE_FILTER_DECIMATION,
493 MYKONOS_ERR_RXPROFILE_FIR_COEFS,
494 MYKONOS_ERR_RXPROFILE_ADCDIV,
495 MYKONOS_ERR_TXPROFILE_IQRATE,
496 MYKONOS_ERR_TXPROFILE_RFBW,
497 MYKONOS_ERR_TXPROFILE_FILTER_INTERPOLATION,
498 MYKONOS_ERR_TXPROFILE_FIR_COEFS,
499 MYKONOS_ERR_TXPROFILE_DACDIV,
500 MYKONOS_ERR_RESET_TXLOL_INV_PARAM,
501 MYKONOS_ERR_RESET_TXLOL_ARMERROR
502 } mykonosErr_t;
503
504 /**
505 * \brief Enum for Mykonos low voltage GPIO available pins
506 */
507 typedef enum
508 {
509 MYKGPIONAN = 0x00,
510 MYKGPIO0 = 0x1,
511 MYKGPIO1 = 0x2,
512 MYKGPIO2 = 0x4,
513 MYKGPIO3 = 0x8,
514 MYKGPIO4 = 0x10,
515 MYKGPIO5 = 0x20,
516 MYKGPIO6 = 0x40,
517 MYKGPIO7 = 0x80,
518 MYKGPIO8 = 0x100,
519 MYKGPIO9 = 0x200,
520 MYKGPIO10 = 0x400,
521 MYKGPIO11 = 0x800,
522 MYKGPIO12 = 0x1000,
523 MYKGPIO13 = 0x2000,
524 MYKGPIO14 = 0x4000,
525 MYKGPIO15 = 0x8000,
526 MYKGPIO16 = 0x10000,
527 MYKGPIO17 = 0x20000,
528 MYKGPIO18 = 0x40000
529 } mykonosGpioSelect_t;
530
531
532 /**
533 * \brief Enum of valid Mykonos Enable State Machine (ENSM) states
534 */
535 typedef enum
536 {
537 WAIT = 0, /*!< Mykonos ENSM state upon which a power up in the WAIT/SLEEP state occurs */
538 INIT = 1, /*!< Mykonos ENSM state upon which a power up delay state ocurrs to allow clocks to stabilize */
539 WAITCALS = 2, /*!< Mykonos ENSM state upon which calibrations are initializing */
540 ALERTCALS = 3, /*!< Mykonos ENSM state upon which calibrations are occurring */
541 ALERTLDS = 4, /*!< Mykonos ENSM state upon which a delay state is occurring when moving from WAIT to ALERT to allow internal circuits to power up */
542 ALERT = 5, /*!< Mykonos ENSM state upon which the internal RF synth is powered up, and TX and RX data paths are still powered down */
543 TX_RX = 6, /*!< Mykonos ENSM state upon which the ability to power up data paths depending on the TxEnable/RxEnable pins or SPI bits */
544 FLUSH = 7 /*!< Mykonos ENSM state upon which the data paths are cleared when exiting the TX_RX state */
545 } mykonosEnsmState_t;
546
547
548 /**
549 * \brief Enum of possible Tx channels
550 */
551 typedef enum
552 {
553 TXOFF = 0,
554 TX1 = 1,
555 TX2 = 2,
556 TX1_TX2 = 3
557 } mykonosTxChannels_t;
558
559 /**
560 * \brief Enum of possible Rx channels
561 */
562 typedef enum
563 {
564 RXOFF = 0,
565 RX1 = 1,
566 RX2 = 2,
567 RX1_RX2 = 3
568 } mykonosRxChannels_t;
569
570 /**
571 * \brief Enum of possible Observation Rx channels
572 */
573 typedef enum
574 {
575 OBS_RXOFF = 0,
576 OBS_RX1_TXLO = 1,
577 OBS_RX2_TXLO = 2,
578 OBS_INTERNALCALS = 3,
579 OBS_SNIFFER = 4,
580 OBS_RX1_SNIFFERLO = 5,
581 OBS_RX2_SNIFFERLO = 6,
582 OBS_SNIFFER_A = 0x14,
583 OBS_SNIFFER_B = 0x24,
584 OBS_SNIFFER_C = 0x34
585 } mykonosObsRxChannels_t;
586
587 /**
588 * \brief Enum of possible Sniffer Rx channels
589 */
590 typedef enum
591 {
592 SNIFFER_A = 1,
593 SNIFFER_B = 2,
594 SNIFFER_C = 3
595 } mykonosSnifferChannel_t;
596
597 /**
598 * \brief Enum of possible Observation Rx channels to enable and run calibrations for during init.
599 * Choose ENUM value that enables all channels that will be used in the system. During system use,
600 * only one channel can be used at a time. This is also used to alert the ARM processor
601 * which observation channels are valid for the current desired system setup.
602 */
603 typedef enum
604 {
605 MYK_OBS_RXOFF = 0x00,
606 MYK_ORX1 = 0x01,
607 MYK_ORX2 = 0x02,
608 MYK_ORX1_ORX2 = 0x03,
609 MYK_SNRXA = 0x04,
610 MYK_SNRXB = 0x08,
611 MYK_SNRXC = 0x10,
612 MYK_SNRXA_B_C = 0x1C
613 } mykonosObsRxChannelsEn_t;
614
615 /**
616 * \brief Enum of possible DAC divider settings (2x, 2.5x, 4x)
617 */
618 typedef enum
619 {
620 DACDIV_2,
621 DACDIV_2p5,
622 DACDIV_4
623 } mykonosDacDiv_t;
624
625 /**
626 * \brief Enum of possible VCO divider settings (1x, 1.5x, 2x, 3x)
627 */
628 typedef enum
629 {
630 VCODIV_1 = 0,
631 VCODIV_1p5 = 1,
632 VCODIV_2 = 2,
633 VCODIV_3 = 3
634 } mykonosVcoDiv_t;
635
636 /**
637 * \brief Enum of possible PRBS pattern settings
638 */
639 typedef enum
640 {
641 MYK_PRBS7 = 0,
642 MYK_PRBS15 = 1,
643 MYK_PRBS31 = 2
644 } mykonosPrbsOrder_t;
645
646 /**
647 * \brief Enum of RF PLL names
648 */
649 typedef enum
650 {
651 CLK_PLL,
652 RX_PLL,
653 TX_PLL,
654 SNIFFER_PLL
655 } mykonosRfPllName_t;
656
657 /**
658 * \brief Enum of Rx profile types
659 */
660 typedef enum
661 {
662 MYK_RX_PROFILE,
663 MYK_OBS_PROFILE,
664 MYK_SNIFFER_PROFILE
665 } mykonosRxProfType_t;
666
667 /**
668 * \brief Enum of ORx PLL names
669 */
670 typedef enum
671 {
672 OBSLO_TX_PLL,
673 OBSLO_SNIFFER_PLL
674 } mykonosObsRxLoSource_t;
675
676 /**
677 * \brief Enum of possible wait events to use with MYKONOS_waitForEvent()
678 */
679 typedef enum
680 {
681 CALPLL_LOCK,
682 CLKPLLCP,
683 CLKPLL_LOCK,
684 RF_RXPLLCP,
685 RF_RXPLL_LOCK,
686 RF_TXPLLCP,
687 RF_TXPLL_LOCK,
688 RF_SNIFFERPLLCP,
689 RF_SNIFFERPLL_LOCK,
690 RXBBF_CALDONE,
691 TXBBF_CALDONE,
692 RX_RFDC_CALDONE,
693 RX_ADCTUNER_CALDONE,
694 RX1_ADCPROFILE,
695 RX2_ADCPROFILE,
696 ORX_ADCPROFILE,
697 RCAL_CALDONE,
698 ARMBUSY,
699 INITARM_DONE
700 } waitEvent_t;
701
702 /**
703 * \brief Enum to set the desired FIR filter type for related functions
704 */
705 typedef enum
706 {
707 TX1_FIR = 1,
708 TX2_FIR = 2,
709 TX1TX2_FIR = 3,
710 RX1_FIR = 4,
711 RX2_FIR = 8,
712 RX1RX2_FIR = 12,
713 OBSRX_A_FIR = 16,
714 OBSRX_B_FIR = 32
715 } mykonosfirName_t;
716
717 /**
718 * \brief Enum to set the desired Rx gain table channel
719 */
720 typedef enum
721 {
722 RX1_GT = 1,
723 RX2_GT,
724 RX1_RX2_GT,
725 ORX_GT,
726 SNRX_GT,
727 LOOPBACK_GT
728 }mykonosGainTable_t;
729
730 /**
731 * \brief Enum to set the Rx Gain control mode
732 */
733 typedef enum
734 {
735 MGC = 0, /*!< Manual Gain Control */
736 AGC = 2, /*!< Automatic Gain Control (AGC) */
737 HYBRID = 3 /*!< Hybrid AGC Gain Control */
738
739 } mykonosGainMode_t;
740
741 /**
742 * \brief Enum to set the Tx Atenuation step size
743 */
744 typedef enum
745 {
746 TXATTEN_0P05_DB = 0, /*!< Tx attenuation 0.05dB step size */
747 TXATTEN_0P1_DB = 1, /*!< Tx attenuation 0.1dB step size */
748 TXATTEN_0P2_DB = 2, /*!< Tx attenuation 0.2dB step size */
749 TXATTEN_0P4_DB = 3 /*!< Tx attenuation 0.4dB step size */
750 } mykonosTxAttenStepSize_t;
751
752 /**
753 * \brief Enum to help set the init calibration mask
754 */
755 typedef enum
756 {
757 TX_BB_FILTER = 0x0001,
758 ADC_TUNER = 0x0002,
759 TIA_3DB_CORNER = 0x0004,
760 DC_OFFSET = 0x0008,
761 TX_ATTENUATION_DELAY = 0x0010,
762 RX_GAIN_DELAY = 0x0020,
763 FLASH_CAL = 0x0040,
764 PATH_DELAY = 0x0080,
765 TX_LO_LEAKAGE_INTERNAL = 0x0100,
766 TX_LO_LEAKAGE_EXTERNAL = 0x0200,
767 TX_QEC_INIT = 0x0400,
768 LOOPBACK_RX_LO_DELAY = 0x0800,
769 LOOPBACK_RX_RX_QEC_INIT = 0x1000,
770 RX_LO_DELAY = 0x2000,
771 RX_QEC_INIT = 0x4000,
772 DPD_INIT = 0x8000,
773 CLGC_INIT = 0x10000,
774 VSWR_INIT = 0x20000
775 } mykonosInitCalibrations_t;
776
777 /**
778 * \brief Enum to help set the tracking calibration mask
779 */
780 typedef enum
781 {
782 TRACK_RX1_QEC = 0x00001,
783 TRACK_RX2_QEC = 0x00002,
784 TRACK_ORX1_QEC = 0x00004,
785 TRACK_ORX2_QEC = 0x00008,
786 TRACK_TX1_LOL = 0x00010,
787 TRACK_TX2_LOL = 0x00020,
788 TRACK_TX1_QEC = 0x00040,
789 TRACK_TX2_QEC = 0x00080,
790 TRACK_TX1_DPD = 0x00100,
791 TRACK_TX2_DPD = 0x00200,
792 TRACK_TX1_CLGC = 0x00400,
793 TRACK_TX2_CLGC = 0x00800,
794 TRACK_TX1_VSWR = 0x01000,
795 TRACK_TX2_VSWR = 0x02000,
796 TRACK_ORX1_QEC_SNLO = 0x10000,
797 TRACK_ORX2_QEC_SNLO = 0x20000,
798 TRACK_SRX_QEC = 0x40000
799 } mykonosTrackingCalibrations_t;
800
801 /**
802 * \brief Enum to set the GPIO3v3 mode
803 */
804 typedef enum
805 {
806 GPIO3V3_LEVELTRANSLATE_MODE = 1, /*!< Level translate mode, signal level on low voltage GPIO output on GPIO3v3 pins */
807 GPIO3V3_INVLEVELTRANSLATE_MODE = 2, /*!< Inverted Level translate mode, inverse of signal level on low voltage GPIO output on GPIO3v3 pins */
808 GPIO3V3_BITBANG_MODE = 3, /*!< Manual mode, API function sets output pin levels and reads input pin levels */
809 GPIO3V3_EXTATTEN_LUT_MODE = 4, /*!< GPIO3v3 output level follows Rx1/Rx2 gain table external control 6bit field. */
810 } mykonosGpio3v3Mode_t;
811
812 /**
813 * \brief Enum to set the low voltage GPIO mode
814 */
815 typedef enum
816 {
817 GPIO_MONITOR_MODE = 0, /*!< Allows a choice of debug signals to output from Mykonos to monitor the state of the device */
818 GPIO_BITBANG_MODE = 3, /*!< Manual mode, API function sets output pin levels and reads input pin levels */
819 GPIO_ARM_OUT_MODE = 9, /*!< Allows internal ARM processor to output on GPIO pins */
820 GPIO_SLICER_OUT_MODE = 10 /*!< Allows Slicer active configuration to the GPIO output pins */
821 } mykonosGpioMode_t;
822
823 /**
824 * \brief Enum for ARM states
825 */
826 typedef enum
827 {
828 MYK_ARM_POWERUP = 0x00, /*!< ARM is powered up and ready to be programmed */
829 MYK_ARM_READY = 0x01, /*!< ARM enter this state once the boot up sequence is completed */
830 MYK_ARM_IDLE = 0x02, /*!< ARM enter this state after initial calibrations are completed */
831 MYK_ARM_RADIO_ON = 0x03, /*!< ARM has moved from MYKONOS_ARM_IDLE state into MYKONOS_ARM_RADIO_ON after the proper command, an abort command will move back to MYKONOS_ARM_IDLE state */
832 MYK_ARM_PROFILE_ERROR = 0x04, /*!< ARM has detected an illegal profile */
833 MYK_ARM_CAL_ERROR = 0x40, /*!< ARM has detected an error in the tracking calibrations */
834 MYK_ARM_EXCEPTION = 0x80 /*!< ARM system problem has been detected */
835 } mykonosArmState_t;
836
837 /**
838 * \brief Data structure to hold 3.3 VDC GPIO settings
839 */
840 typedef struct
841 {
842 uint16_t gpio3v3Oe; /*!< Pin direction: bit per 3.3v GPIO, 0=Input, 1=Output from Mykonos device */
843 mykonosGpio3v3Mode_t gpio3v3SrcCtrl3_0; /*!< Mode for GPIO3v3[3:0] pins */
844 mykonosGpio3v3Mode_t gpio3v3SrcCtrl7_4; /*!< Mode for GPIO3v3[7:4] pins */
845 mykonosGpio3v3Mode_t gpio3v3SrcCtrl11_8; /*!< Mode for GPIO3v3[11:8] pins */
846 } mykonosGpio3v3_t;
847
848 /**
849 * \brief Data structure to hold low voltage GPIO settings
850 */
851 typedef struct
852 {
853 uint32_t gpioOe; /*!< Output Enable per low voltage GPIO pin (1=output, 0=input) */
854 mykonosGpioMode_t gpioSrcCtrl3_0; /*!< Mode for low voltage GPIO[3:0] pins */
855 mykonosGpioMode_t gpioSrcCtrl7_4; /*!< Mode for low voltage GPIO[7:4] pins */
856 mykonosGpioMode_t gpioSrcCtrl11_8; /*!< Mode for low voltage GPIO[11:8] pins */
857 mykonosGpioMode_t gpioSrcCtrl15_12; /*!< Mode for low voltage GPIO[15:12] pins */
858 mykonosGpioMode_t gpioSrcCtrl18_16; /*!< Mode for low voltage GPIO[18:16] pins */
859 } mykonosGpioLowVoltage_t;
860
861 /**
862 * \brief Structure used within the DPD config structure to hold a int8_t complex number
863 */
864 typedef struct{
865 int8_t real; /*!< real part of the complex number */
866 int8_t imag; /*!< imaginary part of the complex number */
867 } int8_cpx;
868
869 /**
870 * \brief Structure to configure DPD (Only valid for AD9373 device)
871 *
872 * This information is loaded into the ARM memory using the
873 * MYKONOS_configDpd() function before running the DPD init or tracking
874 * calibrations. These values can only be changed when the ARM is in the
875 * radioOff state.
876 */
877 typedef struct
878 {
879 uint8_t damping; /*!< 1/2^(damping + 8) fraction of previous model 'forgotten' per adaptation (default: 5 = '1/8192' , valid 0 to 15), 0 = infinite damping */
880 uint8_t numWeights; /*!< number of weights to use for int8_cpx weights weights member of this structure (default = 1) */
881 uint8_t modelVersion; /*!< DPD model version: one of four different generalized polynomial models: 0 = same as R0 silicon, 1-3 are new and the best one depends on the PA (default: 2) */
882 uint8_t highPowerModelUpdate; /*!< 1 = Update saved model whenever peak Tx digital RMS is within 1dB of historical peak Tx RMS */
883 uint8_t modelPriorWeight; /*!< Determines how much weight the loaded prior model has on DPD modeling (Valid 0 - 32, default 20) */
884 uint8_t robustModeling; /*!< Default off = 0, 1=enables automatic outlier removal during DPD modeling */
885 uint16_t samples; /*!< number of samples to capture (default: 512, valid 64 - 32768) */
886 uint16_t outlierThreshold; /*!< threshold for sample in AM-AM plot outside of 1:1 line to be thrown out. (default: 50% = 8192/2, valid 8192 to 1) */
887 int16_t additionalDelayOffset; /*!< 16th of an ORx sample (16=1sample), (default 0, valid -64 to 64) */
888 uint16_t pathDelayPnSeqLevel; /*!< Default 255 (-30dBFs=(20Log10(value/8192)), (valid range 1 to 8191) */
889 int8_cpx weights[3]; /*!< DPD model error weighting (real/imag valid from -128 to 127) */
890 } mykonosDpdConfig_t;
891
892 /**
893 * \brief Structure to configure CLGC (Closed Loop Gain Control) (Only valid for AD9373 device)
894 *
895 * This information is loaded into the ARM memory using the
896 * MYKONOS_configClgc() function before running the CLGC init or tracking
897 * calibrations. These values can only be changed when the ARM is in the
898 * radioOff state.
899 */
900 typedef struct
901 {
902 int16_t tx1DesiredGain; /*!< (value = 100 * dB (valid range -32768 to 32767) - total gain and attenuation from Mykonos Tx1 output to ORx1 input in (dB * 100) */
903 int16_t tx2DesiredGain; /*!< (value = 100 * dB (valid range -32768 to 32767) - total gain and attenuation from Mykonos Tx2 output to ORx2 input in (dB * 100) */
904 uint16_t tx1AttenLimit; /*!< (valid range 0 - 40dB), no default, depends on PA, Protects PA by making sure Tx1Atten is not reduced below the limit */
905 uint16_t tx2AttenLimit; /*!< (valid range 0 - 40dB), no default, depends on PA, Protects PA by making sure Tx2Atten is not reduced below the limit */
906 uint16_t tx1ControlRatio; /*!< valid range 1-100, default 45 */
907 uint16_t tx2ControlRatio; /*!< valid range 1-100, default 45 */
908 uint8_t allowTx1AttenUpdates; /*!< 0= allow CLGC to run, but Tx1Atten will not be updated. User can still read back power measurements. 1=CLGC runs, and Tx1Atten automatically updated */
909 uint8_t allowTx2AttenUpdates; /*!< 0= allow CLGC to run, but Tx2Atten will not be updated. User can still read back power measurements. 1=CLGC runs, and Tx2Atten automatically updated */
910
911 int16_t additionalDelayOffset; /*!< 16th of an ORx sample (16=1sample), (default 0, valid -64 to 64) */
912 uint16_t pathDelayPnSeqLevel; /*!< Default 255 (-30dBFs=(20Log10(value/8192)), (valid range 1 to 8191) */
913 } mykonosClgcConfig_t;
914
915 typedef struct
916 {
917 /* VSWR init cal parameters */
918 int16_t additionalDelayOffset; /*!< 16th of an ORx sample (16=1sample), (default 0, valid -64 to 64) */
919 uint16_t pathDelayPnSeqLevel; /*!< Default 255 (-30dBFs=(20Log10(value/8192)), (valid range 1 to 8191) */
920
921 /* VSWR tracking cal parameters */
922 uint8_t tx1VswrSwitchGpio3p3Pin; /*!< 3p3V GPIO pin to use to control VSWR switch for Tx1 (valid 0-11) (output from Mykonos) */
923 uint8_t tx2VswrSwitchGpio3p3Pin; /*!< 3p3V GPIO pin to use to control VSWR switch for Tx2 (valid 0-11) (output from Mykonos) */
924 uint8_t tx1VswrSwitchPolarity; /*!< 3p3v GPIO pin polarity for forward path of Tx1, opposite used for reflection path (1 = high level, 0 = low level) */
925 uint8_t tx2VswrSwitchPolarity; /*!< 3p3v GPIO pin polarity for forward path of Tx2, opposite used for reflection path (1 = high level, 0 = low level) */
926 uint8_t tx1VswrSwitchDelay_ms; /*!< Delay for Tx1 after flipping the VSWR switch until measurement is made. In ms resolution */
927 uint8_t tx2VswrSwitchDelay_ms; /*!< Delay for Tx2 after flipping the VSWR switch until measurement is made. In ms resolution */
928 } mykonosVswrConfig_t;
929
930 typedef struct
931 {
932 /**
933 * errorStatus(decimal) | Description
934 * ---------------------|-----------------------
935 * 0 | NO ERROR (Tracking success)
936 * 1 | Tx data path not enabled
937 * 2 | ORX data path is not enabled
938 * 3 | Loopback switch closed
939 * 4 | VSWR init cal was not run
940 * 5 | Path delay not setup
941 * 6 | Data measurement was aborted
942 * 7 | VSWR disabled
943 * 8 | If set, entered cal but not finished
944 * 9 | No GPIO configured in single ORx configuration
945 * 10 | Tx is not observable with any of the ORx Channels
946 * 11 | ORX_TRACKING_DISABLED ORx tracking must be enabled
947 *
948 */
949 uint32_t errorStatus;
950 uint32_t trackCount; /*!< Number of times VSWR tracking has run since last reset */
951 int32_t forwardGainRms_dB; /*!< Forward RMS gain measured from Tx to ORx path (1 = 0.01 dB Gain) */
952 int32_t forwardGainReal; /*!< Real part of the forward path complex gain (1 = 0.01 linear Gain) */
953 int32_t forwardGainImag; /*!< Imaginary part of the forward path complex gain (1 = 0.01 linear Gain) */
954 int32_t reflectedGainRms_dB; /*!< Measured reflection path gain in RMS (1 = 0.01 dB Gain) */
955 int32_t reflectedGainReal; /*!< Real part of the reflection path complex gain (1 = 0.01 linear Gain) */
956 int32_t reflectedGainImag; /*!< Imaginary part of the reflection path complex gain (1 = 0.01 linear Gain) */
957 int32_t vswr_forward_tx_rms; /*!< Forward RMS measured from Tx path (1 = 0.01 dBFS) */
958 int32_t vswr_forward_orx_rms; /*!< Forward RMS measured from ORx path (1 = 0.01 dBFS) */
959 int32_t vswr_reflection_tx_rms; /*!< Reflected RMS measured from Tx path (1 = 0.01 dBFS) */
960 int32_t vswr_reflection_orx_rms; /*!< Reflected RMS measured from ORx path (1 = 0.01 dBFS) */
961 } mykonosVswrStatus_t;
962
963 /**
964 * \brief Data structure to hold Mykonos FIR filter settings
965 */
966 typedef struct
967 {
968 int8_t gain_dB; /*!< Filter gain in dB*/
969 uint8_t numFirCoefs; /*!< Number of coefficients in the FIR filter */
970 int16_t *coefs; /*!< A pointer to an array of filter coefficients */
971 } mykonosFir_t;
972
973 /**
974 * \brief Data structure to hold Mykonos JESD204b Framer configuration settings
975 */
976 typedef struct
977 {
978 uint8_t bankId; /*!< JESD204B Configuration Bank ID extension to Device ID. Range is 0..15 */
979 uint8_t deviceId; /*!< JESD204B Configuration Device ID link identification number. Range is 0..255 */
980 uint8_t lane0Id; /*!< JESD204B Configuration starting Lane ID. If more than one lane is used, each lane will increment from the Lane0 ID. Range is 0..31 */
981 uint8_t M; /*!< Number of ADCs (0, 2, or 4) where 2 ADCs are required per receive chain (I and Q) */
982 uint8_t K; /*!< Number of frames in a multiframe. Default = 32, F*K must be modulo 4. Where, F=2*M/numberOfLanes */
983 uint8_t scramble; /*!< Scrambling off if framerScramble = 0, if framerScramble > 0 scrambling is enabled */
984 uint8_t externalSysref; /*!< External SYSREF select. 0 = use internal SYSREF, 1 = use external SYSREF */
985 uint8_t serializerLanesEnabled; /*!< Serializer lane select bit field. Where, [0] = Lane0 enabled, [1] = Lane1 enabled, etc */
986 uint8_t serializerLaneCrossbar; /*!< Lane crossbar to map framer lane outputs to physical lanes */
987 uint8_t serializerAmplitude; /*!< Serializer amplitude setting. Default = 22. Range is 0..31 */
988 uint8_t preEmphasis; /*!< Serializer pre-emphasis setting. Default = 4 Range is 0..7 */
989 uint8_t invertLanePolarity; /*!< Lane inversion select. Default = 0. Where, bit[0] = 0 will invert lane [0], bit[1] = 0 will invert lane 1, etc. */
990 uint8_t lmfcOffset; /*!< LMFC offset value for deterministic latency setting. Range is 0..31 */
991 uint8_t newSysrefOnRelink; /*!< Flag for determining if SYSREF on relink should be set. Where, if > 0 = set, 0 = not set */
992 uint8_t enableAutoChanXbar; /*!< Flag for determining if auto channel select for the xbar should be set. Where, if > 0 = set, '0' = not set */
993 uint8_t obsRxSyncbSelect; /*!< Selects SYNCb input source. Where, 0 = use RXSYNCB for this framer, 1 = use OBSRX_SYNCB for this framer */
994 uint8_t rxSyncbMode; /*!< Flag for determining if CMOS mode for RX Sync signal is used. Where, if > 0 = CMOS, '0' = LVDS */
995 uint8_t overSample; /*!< Selects framer bit repeat or oversampling mode for lane rate matching. Where, 0 = bitRepeat mode (changes effective lanerate), 1 = overSample (maintains same lane rate between ObsRx framer and Rx framer and oversamples the ADC samples) */
996 } mykonosJesd204bFramerConfig_t;
997
998 /* NO Doxygen content required for this data structure as this is used internally */
999 /// @cond
1000 typedef struct
1001 {
1002 uint8_t DID; /*!< JESD204B Configuration Device ID for ILAS check */
1003 uint8_t BID; /*!< JESD204B Configuration Bank ID for ILAS check */
1004 uint8_t LID0; /*!< JESD204B Configuration starting Lane ID for ILAS check */
1005 uint8_t L; /*!< JESD204B Configuration L = lanes per data converter for ILAS check */
1006 uint8_t SCR; /*!< JESD204B Configuration scramble setting for ILAS check */
1007 uint8_t F; /*!< JESD204B Configuration F = octets per frame for ILAS check */
1008 uint8_t K; /*!< JESD204B Configuration K = frames per multiframe for ILAS check */
1009 uint8_t M; /*!< JESD204B Configuration M = number of data converters for ILAS check */
1010 uint8_t N; /*!< JESD204B Configuration N = data converter sample resolution for ILAS check */
1011 uint8_t CS; /*!< JESD204B Configuration CS = number of control bits transferred per sample per frame for ILAS check */
1012 uint8_t NP; /*!< JESD204B Configuration NP = JESD204B word size based on the highest resolution of the data converter for ILAS check */
1013 uint8_t S; /*!< JESD204B Configuration S = number of samples/data converter/frame for ILAS check */
1014 uint8_t CF; /*!< JESD204B Configuration CF = '0' = control bits appended to each sample, '1' = appended to end of frame for ILAS check */
1015 uint8_t HD; /*!< JESD204B Configuration HD = high density bit - samples are contained within lane (0) or divided over more than one lane (1) for ILAS check */
1016 uint8_t FCHK0; /*!< JESD204B Configuration checksum for ILAS check */
1017 } mykonosJesd204bLane0Config_t;
1018 /// @endcond
1019
1020 /**
1021 * \brief Data structure to hold the settings for the deserializer and deframer configuration
1022 *
1023 * EQ Settings | 3GHz Loss (dB) |6GHz Loss (dB) | max FR408HR Length (in) | max FR4 Length (in)
1024 *-------------|----------------|---------------|-------------------------|---------------------
1025 * 0 | 6.5 | 14 | 20 | 12
1026 * 1 | 11.5 | 21 | 30 | 20
1027 * 2 | 18 | 31 | 46 | 32
1028 * 3 | 21.5 | 38 | 56 | 40
1029 * 4 | 22 | 39 | 60 | 43
1030 */
1031 typedef struct
1032 {
1033 uint8_t bankId; /*!< Extension to Device ID. Range is 0..15 */
1034 uint8_t deviceId; /*!< Link identification number. Range is 0..255 */
1035 uint8_t lane0Id; /*!< Lane0 ID. Range is 0..31 */
1036 uint8_t M; /*!< Number of DACs (0, 2, or 4) - 2 DACs per transmit chain (I and Q) */
1037 uint8_t K; /*!< Number of frames in a multiframe. Default = 32, F*K = modulo 4. Where, F=2*M/numberOfLanes */
1038 uint8_t scramble; /*!< Scrambling off if scramble = 0, if framerScramble > 0 scrambling is enabled */
1039 uint8_t externalSysref; /*!< External SYSREF select. 0 = use internal SYSREF, 1 = external SYSREF */
1040 uint8_t deserializerLanesEnabled; /*!< Deserializer lane select bit field. Where, [0] = Lane0 enabled, [1] = Lane1 enabled, etc */
1041 uint8_t deserializerLaneCrossbar; /*!< Lane crossbar to map physical lanes to deframer lane inputs [1:0] = Deframer Input 0 Lane section, [3:2] = Deframer Input 1 lane select, etc */
1042 uint8_t EQSetting; /*!< Equalizer setting. Applied to all deserializer lanes. Range is 0..4 */
1043 uint8_t invertLanePolarity; /*!< PN inversion per each lane. bit[0] = 1 Invert PN of Lane 0, bit[1] = Invert PN of Lane 1, etc */
1044 uint8_t lmfcOffset; /*!< LMFC offset value to adjust deterministic latency. Range is 0..31 */
1045 uint8_t newSysrefOnRelink; /*!< Flag for determining if SYSREF on relink should be set. Where, if > 0 = set, '0' = not set */
1046 uint8_t enableAutoChanXbar; /*!< Flag for determining if auto channel select for the xbar should be set. Where, if > 0 = set, '0' = not set */
1047 uint8_t txSyncbMode; /*!< Flag for determining if CMOS mode for TX Sync signal is used. Where, if > 0 = CMOS, '0' = LVDS */
1048 } mykonosJesd204bDeframerConfig_t;
1049
1050 /**
1051 * \brief Data structure to hold settings for the current Rx specific use case profile
1052 */
1053 typedef struct
1054 {
1055 uint8_t adcDiv; /*!< The divider used to generate the ADC clock (Valid: 1,2) */
1056 mykonosFir_t *rxFir; /*!< Pointer to Rx FIR filter structure */
1057 uint8_t rxFirDecimation; /*!< Rx FIR decimation (1,2,4) */
1058 uint8_t rxDec5Decimation; /*!< Decimation of Dec5 or Dec4 filter (5,4) */
1059 uint8_t enHighRejDec5; /*!< If set, and DEC5 filter used, will use a higher rejection DEC5 FIR filter. Where, 1 = enabled, 0 = disabled */
1060 uint8_t rhb1Decimation; /*!< RX Halfband1 (HB1) decimation. Can be either 1 or 2 */
1061 uint32_t iqRate_kHz; /*!< Rx IQ data rate in kHz */
1062 uint32_t rfBandwidth_Hz; /*!< Rx RF passband bandwidth for the profile */
1063 uint32_t rxBbf3dBCorner_kHz; /*!< Rx BBF (TIA) 3dB corner in kHz */
1064 uint16_t *customAdcProfile; /*!< Custom ADC profile to set the bandwidth of the ADC response */
1065 } mykonosRxProfile_t;
1066
1067 /**
1068 * \brief Data structure to hold settings for the current Tx specific use case profile
1069 */
1070 typedef struct
1071 {
1072 mykonosDacDiv_t dacDiv; /*!< The divider used to generate the DAC clock (ENUM Values)*/
1073 mykonosFir_t *txFir; /*!< Pointer to Tx FIR filter structure */
1074 uint8_t txFirInterpolation; /*!< The TX digital FIR filter interpolation (1,2,4) */
1075 uint8_t thb1Interpolation; /*!< Tx Halfband1 (HB1) filter interpolation (1,2) */
1076 uint8_t thb2Interpolation; /*!< Tx Halfband2 (HB2) filter interpolation (1,2) */
1077 uint8_t txInputHbInterpolation; /*!< Interpolation of half band filter before the programmable FIR (valid 1,2,4) */
1078 uint32_t iqRate_kHz; /*!< Tx IQ data rate in kHz */
1079 uint32_t primarySigBandwidth_Hz; /*!< Tx primary signal BW */
1080 uint32_t rfBandwidth_Hz; /*!< Tx RF passband bandwidth for the profile */
1081 uint32_t txDac3dBCorner_kHz; /*!< DAC filter 3dB corner in kHz */
1082 uint32_t txBbf3dBCorner_kHz; /*!< Tx BBF 3dB corner in kHz */
1083 uint8_t enableDpdDataPath; /*!< Enable Tx Dynamic pre distortion - only valid for AD9373 device */
1084 } mykonosTxProfile_t;
1085
1086 /**
1087 * \brief Data structure to hold SnRx gain control settings for initialization and during use
1088 */
1089 typedef struct
1090 {
1091 mykonosGainMode_t gainMode; /*!< Current Sniffer gain control mode setting */
1092 uint8_t gainIndex; /*!< Current Sniffer gain index. Can be used differently for Manual Gain control/AGC */
1093 uint8_t maxGainIndex; /*!< Max gain index for the currently loaded Sniffer Gain table */
1094 uint8_t minGainIndex; /*!< Min gain index for the currently loaded Sniffer Gain table */
1095 } mykonosSnifferGainControl_t;
1096
1097 /**
1098 * \brief Data structure to hold ORx gain control settings for initialization and during use
1099 */
1100 typedef struct
1101 {
1102 mykonosGainMode_t gainMode; /*!< Current ORx gain control mode setting */
1103 uint8_t orx1GainIndex; /*!< ORx1 Gain Index, can be used in different ways for manual and AGC gain control */
1104 uint8_t orx2GainIndex; /*!< ORx2 Gain Index, can be used in different ways for manual and AGC gain control */
1105 uint8_t maxGainIndex; /*!< Max gain index for the currently loaded ORx Gain table */
1106 uint8_t minGainIndex; /*!< Min gain index for the currently loaded ORx Gain table */
1107 } mykonosORxGainControl_t;
1108
1109 /**
1110 * \brief Data structure to hold Rx gain control settings for initialization and during use
1111 */
1112 typedef struct
1113 {
1114 mykonosGainMode_t gainMode; /*!< Current Rx gain control mode setting */
1115 uint8_t rx1GainIndex; /*!< Rx1 Gain Index, can be used in different ways for manual and AGC gain control */
1116 uint8_t rx2GainIndex; /*!< Rx2 Gain Index, can be used in different ways for manual and AGC gain control */
1117 uint8_t rx1MaxGainIndex; /*!< Max gain index for the currently loaded Rx1 Gain table */
1118 uint8_t rx1MinGainIndex; /*!< Min gain index for the currently loaded Rx1 Gain table */
1119 uint8_t rx2MaxGainIndex; /*!< Max gain index for the currently loaded Rx2 Gain table */
1120 uint8_t rx2MinGainIndex; /*!< Min gain index for the currently loaded Rx2 Gain table */
1121 uint8_t rx1Rssi; /*!< Stores Rx1 RSSI value read back from the Mykonos */
1122 uint8_t rx2Rssi; /*!< Stores Rx2 RSSI value read back from the Mykonos */
1123 } mykonosRxGainControl_t;
1124
1125 /**
1126 * \brief Data structure to hold peak detector settings for the AGC
1127 */
1128 typedef struct
1129 {
1130 /* Threshold Settings */
1131 uint8_t apdHighThresh; /*!< APD high threshold. Must be greater than apdLowThresh. Min = apdLowThresh, Max = 0x3F. 6-bit field. */
1132 uint8_t apdLowThresh; /*!< APD low threshold. Must be less than apdHighThresh. Min = 0, Max = apdHighThresh. 6-bit field. */
1133 uint8_t hb2HighThresh; /*!< HB2 high threshold. Must be greater than hb2LowThresh. Min = hb2LowThresh, Max = 0xFF. 8-bit field. */
1134 uint8_t hb2LowThresh; /*!< HB2 low threshold. Must be less than hb2HighThresh. Min = 0, Max = hb2HighThresh. 8-bit field. */
1135 uint8_t hb2VeryLowThresh; /*!< HB2 very low threshold. Must be less than hb2LowThresh. Min = 0, Max = hb2LowThresh. 8-bit field. */
1136
1137 /* Threshold Counter Settings */
1138 uint8_t apdHighThreshExceededCnt; /*!< APD high threshold exceeded counter. Sets number of peaks to detect above apdHighThresh to cause gain decrement according to apdHighGainStepAttack. 8-bit field. */
1139 uint8_t apdLowThreshExceededCnt; /*!< APD low threshold exceeded counter. Sets number of peaks to detect below apdLowThresh to cause gain increment according to apdLowGainStepRecovery. 8-bit field. */
1140 uint8_t hb2HighThreshExceededCnt; /*!< HB2 high threshold exceeded counter. Sets number of overloads to detect above hb2HighThresh to cause gain decrement according to hb2HighGainStepAttack. 8-bit field. */
1141 uint8_t hb2LowThreshExceededCnt; /*!< HB2 low threshold exceeded counter. Sets number of peaks to detect below hb2LowThresh to cause gain increment according to hb2LowGainStepRecovery. 8-bit field. */
1142 uint8_t hb2VeryLowThreshExceededCnt; /*!< HB2 very low threshold exceeded counter. Sets number of peaks to detect below hb2VeryLowThresh to cause gain increment according to hb2VeryLowGainStepRecovery. 8-bit field. */
1143
1144 /* Gain Step Settings */
1145 uint8_t apdHighGainStepAttack; /*!< Number of gain indices to decrement gain when apdHighThreshExceededCnt is exceeded. 5-bit field. */
1146 uint8_t apdLowGainStepRecovery; /*!< Number of gain indices to increment gain when apdLowThreshExceededCnt is exceeded. 5-bit field */
1147 uint8_t hb2HighGainStepAttack; /*!< Number of gain indices to decrement gain when hb2HighThreshExceededCnt is exceeded. 5-bit field */
1148 uint8_t hb2LowGainStepRecovery; /*!< Number of gain indices to increment gain when hb2LowThreshExceededCnt is exceeded. 5-bit field*/
1149 uint8_t hb2VeryLowGainStepRecovery; /*!< Number of gain indices to increment gain when hb2VeryLowThreshExceededCnt is exceeded. 5-bit field */
1150
1151 /* Fast Attack Settings */
1152 uint8_t apdFastAttack; /*!< [1] Enables APD fast attack mode - gain decrements immediately when apdHighThreshExceededCnt is exceeded. [0] disables APD fast attack mode - gain decrements at the expiry of agcGainUpdateCounter. 1-bit field. */
1153 uint8_t hb2FastAttack; /*!< [1] Enables HB2 fast attack mode - gain decrements immediately when hb2HighThreshExceededCnt is exceeded. [0] disables HB2 fast attack mode - gain decrements at the expiry of agcGainUpdateCounter. 1-bit field. */
1154
1155 /* HB2 Configuration Settings */
1156 uint8_t hb2OverloadDetectEnable; /*!< [1] Enables the HB2 overload detector. [0] Disables the HB2 overload detector. 1-bit field. */
1157 uint8_t hb2OverloadDurationCnt; /*!< Sets the samples size window of the HB2 overload detector. If hb2OverloadThreshCnt number of overloads are detected, the hb2xxxThreshExceededCnt increments. 3-bit field. [001]=1, [001]=4, [010]=8, [011]=12, [100]=16, [101]=24, [110]=32, [111]=INVALID */
1158 uint8_t hb2OverloadThreshCnt; /*!< Sets the number of individual overloads necessary within hb2OverloadDurationCnt samples to increment the hb2xxxThreshExceededCnt */
1159 } mykonosPeakDetAgcCfg_t;
1160
1161 /**
1162 * \brief Data structure to hold power measurement settings for the AGC
1163 */
1164 typedef struct
1165 {
1166 /* Threshold Settings */
1167 uint8_t pmdUpperHighThresh; /*!< Power measurement upper band, high threshold . This value is a positive offset to the pmdUpperLowThresh threshold. 4-bit field */
1168 uint8_t pmdUpperLowThresh; /*!< Power measurement upper band, low threshold. This value sets the threshold in (negative) -dBFS. Byte value must be less than pmdLowerHighThresh. 7-bit field */
1169 uint8_t pmdLowerHighThresh; /*!< Power measurement lower band, high threshold. This value sets the threshold in (negative) -dBFS. Byte value must be greater than pmdUpperLowThresh. 7-bit field */
1170 uint8_t pmdLowerLowThresh; /*!< Power measurement lower band, low threshold. This value is a negative offset to the pmdLowerHighThresh threshold. 4-bit field */
1171
1172 /* Gain Step Settings */
1173 uint8_t pmdUpperHighGainStepAttack; /*!< Number of gain indices to decrement gain if pmdUpperHighThresh is exceeded by the end of the agcGainUpdateCounter. 5-bit field */
1174 uint8_t pmdUpperLowGainStepAttack; /*!< Number of gain indices to decrement gain if pmdUpperLowThresh is exceeded by the end of the agcGainUpdateCounter. 5-bit field */
1175 uint8_t pmdLowerHighGainStepRecovery; /*!< Number of gain indices to increment gain if pmdLowerHighThresh is not exceeded by the end of the agcGainUpdateCounter. 5-bit field */
1176 uint8_t pmdLowerLowGainStepRecovery; /*!< Number of gain indices to increment gain if pmdLowerLowThresh is not exceeded by the end of the agcGainUpdateCounter. 5-bit field */
1177
1178 /* PMD Configuration Settings */
1179 uint8_t pmdMeasDuration; /*!< Number of samples to measure power on. The number of samples corresponding to the 4-bit word is 8*2^(pmdMeasDuration[3:0]). This value must be less than agcGainUpdateCounter */
1180 uint8_t pmdMeasConfig; /*!< Power measurement configuration. 2-bit field. [00]=PMD disabled, [01]=PMD Enabled at HB2 output, [10]=Enabled at RFIR output (recommended), [11]=PMD Enabled at BBDC2 */
1181 } mykonosPowerMeasAgcCfg_t;
1182
1183 /**
1184 * \brief Data structure to hold general AGC settings for initialization and during use
1185 */
1186 typedef struct
1187 {
1188 /* Gain Table Settings */
1189 uint8_t agcRx1MaxGainIndex; /*!< Maximum Rx1 gain index allowed in AGC mode. Must be greater than agcRx1MinGainIndex and valid gain index. 8-bit field */
1190 uint8_t agcRx1MinGainIndex; /*!< Minimum Rx1 gain index allowed in AGC mode. Must be less than agcRx1MinGainIndex and valid gain index. 8-bit field */
1191 uint8_t agcRx2MaxGainIndex; /*!< Maximum Rx2 gain index allowed in AGC mode. Must be greater than agcRx2MinGainIndex and valid gain index. 8-bit field */
1192 uint8_t agcRx2MinGainIndex; /*!< Minimum Rx2 gain index allowed in AGC mode. Must be less than agcRx2MinGainIndex and valid gain index. 8-bit field */
1193 uint8_t agcObsRxMaxGainIndex; /*!< Maximum ObsRx gain index allowed in AGC mode. Must be greater than agcObsRxMinGainIndex and valid gain index. 8-bit field */
1194 uint8_t agcObsRxMinGainIndex; /*!< Minimum ObsRx gain index allowed in AGC mode. Must be less than agcObsRxMaxGainIndex and valid gain index. 8-bit field */
1195 uint8_t agcObsRxSelect; /*!< Sniffer or ObsRx AGC channel select. [1] = SnRx */
1196
1197 /* AGC Mode Selection */
1198 uint8_t agcPeakThresholdMode; /*!< [1] = Peak Threshold Mode, power based gain changes are disabled. [0] = Peak and overload detectors are ignored for gain changes */
1199 uint8_t agcLowThsPreventGainIncrease; /*!< [1] PMD based gain increments are ignored if apd/hb2LowThreshExceedCnt is high [0] apdLowThreshExceededCnt and hb2LowThreshExceededCnt are "Don't cares" to the AGC gain recovery */
1200
1201 /* AGC General Settings */
1202 uint32_t agcGainUpdateCounter; /*!< Number of samples for the AGC gain update counter. Counter operates on the IQ data rate. 22-bit field. Min = 0x000001, Max = 0x3FFFFF */
1203 uint8_t agcSlowLoopSettlingDelay; /*!< Number of IQ data rate clock cycles to wait after a gain change before peak/power measurements resume. 7-bit field */
1204 uint8_t agcPeakWaitTime; /*!< Number of IQ data rate clock cycles to wait to enable peak/overload detectors after AGC is enabled. 5-bit field. Min = 0x02. Max = 0x1F */
1205 uint8_t agcResetOnRxEnable; /*!< [1] = Performs a reset of the AGC slow loop state machine when Rx is disabled. [0] = AGC slow loop state machine maintains its state when Rx is disabled. */
1206 uint8_t agcEnableSyncPulseForGainCounter; /*!< [1] = Allows sync of agcGainUpdateCounter to the time-slot boundary. GPIO setup required. [0] = agcGainUpdateCounter functions as normal */
1207
1208 mykonosPeakDetAgcCfg_t *peakAgc; /*!< pointer to structure for Peak AGC */
1209 mykonosPowerMeasAgcCfg_t *powerAgc; /*!< pointer to structure for Power AGC */
1210 } mykonosAgcCfg_t;
1211
1212 /**
1213 * \brief Data structure to hold Tx data path settings
1214 */
1215 typedef struct
1216 {
1217 mykonosTxProfile_t *txProfile; /*!< Tx datapath profile, 3dB corner frequencies, and digital filter enables */
1218 mykonosJesd204bDeframerConfig_t *deframer; /*!< Mykonos JESD204b deframer config for the Tx data path */
1219 mykonosTxChannels_t txChannels; /*!< The desired Tx channels to enable during initialization */
1220 uint8_t txPllUseExternalLo; /*!< Internal LO=0, external LO*2 if =1 */
1221 uint64_t txPllLoFrequency_Hz; /*!< Tx PLL LO frequency (internal or external LO) */
1222 mykonosTxAttenStepSize_t txAttenStepSize; /*!< Tx Attenuation step size */
1223 uint16_t tx1Atten_mdB; /*!< Initial and current Tx1 Attenuation */
1224 uint16_t tx2Atten_mdB; /*!< Initial and current Tx2 Attenuation */
1225 mykonosDpdConfig_t *dpdConfig; /*!< DPD settings. Only valid for AD9373 device, set pointer to NULL otherwise */
1226 mykonosClgcConfig_t *clgcConfig; /*!< CLGC settings. Only valid for AD9373 device, set pointer to NULL otherwise */
1227 mykonosVswrConfig_t *vswrConfig; /*!< VSWR settings. Only valid for AD9373 device, set pointer to NULL otherwise */
1228 } mykonosTxSettings_t;
1229
1230 /**
1231 * \brief Data structure to hold Rx data path settings
1232 */
1233 typedef struct
1234 {
1235 mykonosRxProfile_t *rxProfile; /*!< Rx datapath profile, 3dB corner frequencies, and digital filter enables */
1236 mykonosJesd204bFramerConfig_t *framer; /*!< Rx JESD204b framer configuration structure */
1237 mykonosRxGainControl_t *rxGainCtrl; /*!< Rx Gain control settings structure */
1238 mykonosAgcCfg_t *rxAgcCtrl; /*!< Rx AGC control settings structure */
1239 mykonosRxChannels_t rxChannels; /*!< The desired Rx Channels to enable during initialization */
1240 uint8_t rxPllUseExternalLo; /*!< Internal LO = 0, external LO*2 = 1 */
1241 uint64_t rxPllLoFrequency_Hz; /*!< Rx PLL LO Frequency (internal or external LO) */
1242 uint8_t realIfData; /*!< Flag to choose if complex baseband or real IF data are selected for Rx and ObsRx paths. Where, if > 0 = real IF data, '0' = zero IF (IQ) data*/
1243 } mykonosRxSettings_t;
1244
1245 /**
1246 * \brief Data structure to hold ORx data path settings
1247 */
1248 typedef struct
1249 {
1250 mykonosRxProfile_t *orxProfile; /*!< ORx datapath profile, 3dB corner frequencies, and digital filter enables. */
1251 mykonosORxGainControl_t *orxGainCtrl; /*!< ObsRx gain control settings structure */
1252 mykonosAgcCfg_t *orxAgcCtrl; /*!< ORx AGC control settings structure */
1253 mykonosRxProfile_t *snifferProfile; /*!< Sniffer datapath profile, 3dB corner frequencies, and digital filter enables. */
1254 mykonosSnifferGainControl_t *snifferGainCtrl; /*!< SnRx gain control settings structure */
1255 mykonosJesd204bFramerConfig_t *framer; /*!< ObsRx JESD204b framer configuration structure */
1256 mykonosObsRxChannelsEn_t obsRxChannelsEnable; /*!< The desired ObsRx channels to configure/calibrate during initialization */
1257 mykonosObsRxLoSource_t obsRxLoSource; /*!< The sniffer/ORx mixers can use the TX_PLL or SNIFFER_PLL */
1258 uint64_t snifferPllLoFrequency_Hz; /*!< SnRx PLL LO frequency in Hz */
1259 uint8_t realIfData; /*!< Flag to choose if complex baseband or real IF data are selected for Rx and ObsRx paths. Where if > 0 = real IF data, '0' = complex data */
1260 uint16_t *customLoopbackAdcProfile; /*!< Custom Loopback ADC profile to set the bandwidth of the ADC response */
1261 mykonosObsRxChannels_t defaultObsRxChannel; /*!< Default ObsRx channel to enter when radioOn called */
1262 } mykonosObsRxSettings_t;
1263
1264
1265 /**
1266 * \brief Data structure to hold ARM GPIO pin assignments for each ARM input/output pin.
1267 */
1268 typedef struct
1269 {
1270 uint8_t useRx2EnablePin; /*!< 0= RX1_ENABLE controls RX1 and RX2, 1 = separate RX1_ENABLE/RX2_ENABLE pins */
1271 uint8_t useTx2EnablePin; /*!< 0= TX1_ENABLE controls TX1 and TX2, 1 = separate TX1_ENABLE/TX2_ENABLE pins */
1272 uint8_t txRxPinMode; /*!< 0= ARM command mode, 1 = Pin mode to power up Tx/Rx chains */
1273 uint8_t orxPinMode; /*!< 0= ARM command mode, 1 = Pin mode to power up ObsRx receiver*/
1274
1275 /* Mykonos ARM input GPIO pins -- Only valid if orxPinMode = 1 */
1276 uint8_t orxTriggerPin; /*!< Select desired GPIO pin (valid 4-15) */
1277 uint8_t orxMode2Pin; /*!< Select desired GPIO pin (valid 0-18) */
1278 uint8_t orxMode1Pin; /*!< Select desired GPIO pin (valid 0-18) */
1279 uint8_t orxMode0Pin; /*!< Select desired GPIO pin (valid 0-18) */
1280
1281 /* Mykonos ARM output GPIO pins -- always available, even when pin mode not enabled*/
1282 uint8_t rx1EnableAck; /*!< Select desired GPIO pin (0-15), [4] = Output Enable */
1283 uint8_t rx2EnableAck; /*!< Select desired GPIO pin (0-15), [4] = Output Enable */
1284 uint8_t tx1EnableAck; /*!< Select desired GPIO pin (0-15), [4] = Output Enable */
1285 uint8_t tx2EnableAck; /*!< Select desired GPIO pin (0-15), [4] = Output Enable */
1286 uint8_t orx1EnableAck; /*!< Select desired GPIO pin (0-15), [4] = Output Enable */
1287 uint8_t orx2EnableAck; /*!< Select desired GPIO pin (0-15), [4] = Output Enable */
1288 uint8_t srxEnableAck; /*!< Select desired GPIO pin (0-15), [4] = Output Enable */
1289 uint8_t txObsSelect; /*!< Select desired GPIO pin (0-15), [4] = Output Enable */
1290 /* When 2Tx are used with only 1 ORx input, this GPIO tells the BBIC which Tx channel is */
1291 /* active for calibrations, so BBIC can route correct RF Tx path into the single ORx input */
1292 } mykonosArmGpioConfig_t;
1293
1294 /**
1295 * \brief Data structure to hold auxiliary IO settings (AuxDAC, ARM GPIO, GPIO3.3v, low voltage GPIO, HSCP, etc)
1296 */
1297 typedef struct
1298 {
1299 uint16_t auxDacEnable; /*!< Aux DAC enable. One bit per Aux DAC. Where bit[0] = Aux DAC 0, bit[1] = Aux DAC 1, etc */
1300 uint16_t auxDacValue[10]; /*!< Aux DAC value */
1301 uint8_t auxDacSlope[10]; /*!< Aux DAC slope */
1302 uint8_t auxDacVref[10]; /*!< Aux DAC voltage reference value */
1303
1304 mykonosGpio3v3_t *gpio3v3; /*!< GPIO 3.3 VDC settings data structure pointer */
1305 mykonosGpioLowVoltage_t *gpio; /*!< Low voltage GPIO settings data structure pointer */
1306 mykonosArmGpioConfig_t *armGpio; /*!< Mykonos ARM GPIO settings*/
1307 } mykonosAuxIo_t;
1308
1309 /**
1310 * \brief Data structure to hold digital clock settings
1311 */
1312 typedef struct
1313 {
1314 uint32_t deviceClock_kHz; /*!< CLKPLL and device reference clock frequency in kHz */
1315 uint32_t clkPllVcoFreq_kHz; /*!< CLKPLL VCO frequency in kHz */
1316 mykonosVcoDiv_t clkPllVcoDiv; /*!< CLKPLL VCO divider */
1317 uint8_t clkPllHsDiv; /*!< CLKPLL high speed clock divider */
1318 } mykonosDigClocks_t;
1319
1320
1321 /**
1322 * \brief Data structure used to read back the Init Calibration Status
1323 */
1324 typedef struct
1325 {
1326 uint32_t calsDoneLastRun; /*!< Init cals that completed in the last call to MYKONOS_runInitCals() */
1327 uint32_t calsDoneLifetime; /*!< Init cals that have completed successfully since loading of the ARM processor */
1328 uint32_t calsMinimum; /*!< Minimum set of init cals that must complete before device can move to radioOn state */
1329 uint8_t initErrCal; /*!< If an init cal had an error, this represents the opcode of the init cal that reported an error */
1330 uint8_t initErrCode; /*!< If an init cal had an error, this represents the ARM error code describing the failure */
1331 } mykonosInitCalStatus_t;
1332
1333 /**
1334 * \brief Data structure used to read back DPD calibration status
1335 */
1336 typedef struct
1337 {
1338 /**
1339 * dpdErrorStatus (decimal) | Description
1340 * --------------------------|-----------------------
1341 * 0 | No Error
1342 * 1 | ORX_DISABLED
1343 * 2 | TX_DISABLED
1344 * 3 | PATHDELAY_NOT_SETUP
1345 * 4 | DPD_INIT_NOT_RUN
1346 * 5 | ORX_SIG_TOO_LOW
1347 * 6 | ORX_SIG_SATURATED
1348 * 7 | TX_SIG_TOO_LOW
1349 * 8 | TX_SIG_SATURATED
1350 * 9 | MODEL_ERROR_HIGH
1351 * 10 | AM_AM_OUTLIERS
1352 * 11 | INVALID_TX_PROFILE
1353 * 12 | ORX_TRACKING_DISABLED ORx tracking must be enabled
1354 * 13 | Cal suspended
1355 * 14 | Reserved
1356 * 15 | Reserved
1357 * 16 | Reserved
1358 * 17 | Reserved
1359 * 18 | Reserved
1360 */
1361 uint32_t dpdErrorStatus;
1362 uint32_t dpdTrackCount; /*!< Number of times DPD tracking has run since last reset */
1363 uint32_t dpdModelErrorPercent; /*!< Percent Error of PA model * 10 to include 1 decimal place */
1364 uint32_t dpdExtPathDelay; /*!< External path delay from Tx output to ORx input, at 1/16 sample resolution of ORx sample rate */
1365 } mykonosDpdStatus_t;
1366
1367 /**
1368 * \brief Data structure used to read back CLGC calibration status
1369 */
1370 typedef struct
1371 {
1372 /**
1373 * clgcErrorStatus(decimal) | Description
1374 * -------------------------|-----------------------
1375 * 0 | NO ERROR
1376 * 1 | TX Disabled
1377 * 2 | ORx is disabled
1378 * 3 | Loopback switch is clo
1379 * 4 | Data measurement aborted during capture
1380 * 5 | No initial calibration was done
1381 * 6 | Path delay not setup
1382 * 7 | No apply control is possible
1383 * 8 | Control value is out of range
1384 * 9 | CLGC feature is disabled
1385 * 10 | TX attenuation is capped
1386 * 11 | Gain measurement
1387 * 12 | No GPIO configured in single ORx configuration
1388 * 13 | Tx is not observable with any of the ORx Channels
1389 * 14 | ORX_TRACKING_DISABLED ORx tracking must be enabled
1390 * 15 | Cal suspended
1391 * 16 | RESERVED
1392 * 17 | RESERVED
1393 * 18 | RESERVED
1394 * 19 | RESERVED
1395 */
1396 uint32_t errorStatus;
1397 uint32_t trackCount; /*!< Number of times CLGC tracking has run since last reset */
1398 int32_t desiredGain; /*!< Desired gain/attenuation from Tx output to ORx input of Mykonos device. 0.01 dB resolution */
1399 int32_t currentGain; /*!< Current measured gain in 0.01 dB resolution. */
1400 uint32_t txGain; /*!< Current TxAttenuation setting, same as MYKONOS_getTx1/2Attenuation(), in 0.05dB resolution */
1401 int32_t txRms; /*!< Tx digital sample power measured at DPD block input (0.01 dB resolution) */
1402 int32_t orxRms; /*!< ORx digital sample power measured at ORx port (0.01 dB resolution) */
1403 } mykonosClgcStatus_t;
1404
1405 /**
1406 * \brief Data structure to hold Tx LOL Status
1407 */
1408 typedef struct
1409 {
1410 uint32_t errorCode; /*!< error code from Tx LOL */
1411 uint32_t percentComplete; /*!< percent of required data collected for the current cal. Range 0 to 100 */
1412 uint32_t performanceMetric; /*!< Variance of the corrections, and gives an indication in dB on how much LO leakage is corrected on an average tracking pass. */
1413 uint32_t iterCount; /*!< running counter that increments each time the cal runs to completion */
1414 uint32_t updateCount; /*!< running counter that increments each time the cal updates the correction/actuator hardware */
1415 } mykonosTxLolStatus_t;
1416
1417 /**
1418 * \brief Data structure to hold Tx QEC Status
1419 */
1420 typedef struct
1421 {
1422 uint32_t errorCode; /*!< error code from Tx QEC */
1423 uint32_t percentComplete; /*!< percent of required data collected for the current cal. Range 0 to 100 */
1424 uint32_t performanceMetric; /*!< Number of codes adjusted which is the number of codes of correction made last time which can be converted to an IRR power metric as with Rx QEC, if desired. */
1425 uint32_t iterCount; /*!< running counter that increments each time the cal runs to completion */
1426 uint32_t updateCount; /*!< running counter that increments each time the cal updates the correction/actuator hardware */
1427 } mykonosTxQecStatus_t;
1428
1429 /**
1430 * \brief Data structure to hold Rx QEC Status
1431 */
1432 typedef struct
1433 {
1434 uint32_t errorCode; /*!< error code from Rx QEC */
1435 uint32_t percentComplete; /*!< percent of required data collected for the current cal. Range 0 to 100 */
1436 uint32_t selfcheckIrrDb; /*!< selfCheckIrrdDb - Power-weighted average Image Rejection Ratio (IRR) in dBc. */
1437 uint32_t iterCount; /*!< running counter that increments each time the cal runs to completion */
1438 uint32_t updateCount; /*!< running counter that increments each time the cal updates the correction/actuator hardware */
1439 } mykonosRxQecStatus_t;
1440
1441 /**
1442 * \brief Data structure to hold Orx QEC Status
1443 */
1444 typedef struct
1445 {
1446 uint32_t errorCode; /*!< error code from Orx QEC */
1447 uint32_t percentComplete; /*!< percent of required data collected for the current cal. Range 0 to 100 */
1448 uint32_t selfcheckIrrDb; /*!< selfCheckIrrdDb - Power-weighted average Image Rejection Ratio (IRR) in dBc. */
1449 uint32_t iterCount; /*!< running counter that increments each time the cal runs to completion */
1450 uint32_t updateCount; /*!< running counter that increments each time the cal updates the correction/actuator hardware */
1451 } mykonosOrxQecStatus_t;
1452
1453 /**
1454 * \brief Data structure to hold Mykonos device settings
1455 */
1456 typedef struct
1457 {
1458 spiSettings_t *spiSettings; /*!< SPI settings data structure pointer */
1459 mykonosRxSettings_t *rx; /*!< Rx settings data structure pointer */
1460 mykonosTxSettings_t *tx; /*!< Tx settings data structure pointer */
1461 mykonosObsRxSettings_t *obsRx; /*!< ObsRx settings data structure pointer */
1462 mykonosAuxIo_t *auxIo; /*!< Auxiliary IO settings data structure pointer */
1463 mykonosDigClocks_t *clocks; /*!< Holds settings for CLKPLL and reference clock */
1464 uint8_t profilesValid; /*!< Mykonos initialize function uses this as an output to remember which profile data structure pointers are valid */
1465 } mykonosDevice_t;
1466
1467 #ifdef __cplusplus
1468 }
1469 #endif
1470
1471 #endif