no-OS
|
Contains macro definitions and function prototypes for mykonos.c. More...
Go to the source code of this file.
Macros | |
#define | TX_PROFILE_VALID 0x01 |
#define | RX_PROFILE_VALID 0x02 |
#define | ORX_PROFILE_VALID 0x04 |
#define | SNIFF_PROFILE_VALID 0x08 |
Functions | |
mykonosErr_t | MYKONOS_resetDevice (mykonosDevice_t *device) |
Performs a hard reset on the MYKONOS DUT (Toggles RESETB pin on device) More... | |
mykonosErr_t | MYKONOS_getDeviceRev (mykonosDevice_t *device, uint8_t *revision) |
Reads back the silicon revision for the Mykonos Device. More... | |
mykonosErr_t | MYKONOS_getProductId (mykonosDevice_t *device, uint8_t *productId) |
Reads back the Product ID for the Mykonos Device. More... | |
mykonosErr_t | MYKONOS_setSpiSettings (mykonosDevice_t *device) |
Sets the Mykonos device SPI settings (3wire/4wire, MSBFirst, etc). More... | |
mykonosErr_t | MYKONOS_verifyDeviceDataStructure (mykonosDevice_t *device) |
Verifies the integrity of the Mykonos device data structure. More... | |
mykonosErr_t | MYKONOS_verifyProfiles (mykonosDevice_t *device) |
Verifies the init structure profiles are valid combinations. More... | |
mykonosErr_t | MYKONOS_initialize (mykonosDevice_t *device) |
Initializes the Mykonos device based on the desired device settings. More... | |
mykonosErr_t | MYKONOS_waitForEvent (mykonosDevice_t *device, waitEvent_t waitEvent, uint32_t timeout_us) |
Performs a blocking wait for a Mykonos calibration or Pll Lock. More... | |
mykonosErr_t | MYKONOS_readEventStatus (mykonosDevice_t *device, waitEvent_t waitEvent, uint8_t *eventDone) |
Performs a readback with no wait for a Mykonos calibration or Pll Lock. More... | |
mykonosErr_t | MYKONOS_getApiVersion (mykonosDevice_t *device, uint32_t *siVer, uint32_t *majorVer, uint32_t *minorVer, uint32_t *buildVer) |
Get API version number. More... | |
mykonosErr_t | MYKONOS_initDigitalClocks (mykonosDevice_t *device) |
Sets the CLKPLL output frequency. More... | |
mykonosErr_t | MYKONOS_setRfPllFrequency (mykonosDevice_t *device, mykonosRfPllName_t pllName, uint64_t rfPllLoFrequency_Hz) |
Sets the RF PLL local oscillator frequency (RF carrier frequency). More... | |
mykonosErr_t | MYKONOS_getRfPllFrequency (mykonosDevice_t *device, mykonosRfPllName_t pllName, uint64_t *rfPllLoFrequency_Hz) |
Gets the RF PLL local oscillator frequency (RF carrier frequency). More... | |
mykonosErr_t | MYKONOS_checkPllsLockStatus (mykonosDevice_t *device, uint8_t *pllLockStatus) |
Checks if the PLLs are locked. More... | |
mykonosErr_t | MYKONOS_setRfPllLoopFilter (mykonosDevice_t *device, mykonosRfPllName_t pllName, uint16_t loopBandwidth_kHz, uint8_t stability) |
Sets the RF PLL loop filter bandwith. More... | |
mykonosErr_t | MYKONOS_getRfPllLoopFilter (mykonosDevice_t *device, mykonosRfPllName_t pllName, uint16_t *loopBandwidth_kHz, uint8_t *stability) |
Gets the RF PLL loop filter bandwidth and stability. More... | |
mykonosErr_t | MYKONOS_initArm (mykonosDevice_t *device) |
Resets the ARM processor and performs initialization. More... | |
mykonosErr_t | MYKONOS_loadArmFromBinary (mykonosDevice_t *device, uint8_t *binary, uint32_t count) |
Loads binary byte array into ARM program memory. More... | |
mykonosErr_t | MYKONOS_loadArmConcurrent (mykonosDevice_t *device, uint8_t *binary, uint32_t count) |
Loads binary byte array into ARM program memory. This API function allows user to load the ARM concurrently. This is specially to reduce the system initialization time. More... | |
mykonosErr_t | MYKONOS_verifyArmChecksum (mykonosDevice_t *device) |
Verifies the ARM checksum value. More... | |
mykonosErr_t | MYKONOS_checkArmState (mykonosDevice_t *device, mykonosArmState_t armStateCheck) |
Verifies the ARM status once it is start running. More... | |
mykonosErr_t | MYKONOS_getArmVersion (mykonosDevice_t *device, uint8_t *majorVer, uint8_t *minorVer, uint8_t *rcVer, mykonosBuild_t *buildType) |
Reads back the version of the ARM binary loaded into the Mykonos ARM memory. More... | |
mykonosErr_t | MYKONOS_configDpd (mykonosDevice_t *device) |
This function will configure DPD settings. More... | |
mykonosErr_t | MYKONOS_getDpdConfig (mykonosDevice_t *device) |
mykonosErr_t | MYKONOS_getDpdStatus (mykonosDevice_t *device, mykonosTxChannels_t txChannel, mykonosDpdStatus_t *dpdStatus) |
This function reads the DPD calibration status from the Mykonos ARM processor. More... | |
mykonosErr_t | MYKONOS_restoreDpdModel (mykonosDevice_t *device, mykonosTxChannels_t txChannel, uint8_t *modelDataBuffer, uint32_t modelNumberBytes) |
This function will allow loading of the DPD model file. More... | |
mykonosErr_t | MYKONOS_saveDpdModel (mykonosDevice_t *device, mykonosTxChannels_t txChannel, uint8_t *modelDataBuffer, uint32_t modelNumberBytes) |
This function called during RadioOff, will allow retrieval of the DPD model file. More... | |
mykonosErr_t | MYKONOS_setDpdActState (mykonosDevice_t *device, mykonosTxChannels_t txChannel, uint8_t actState) |
This function sets the state of the DPD actuator. More... | |
mykonosErr_t | MYKONOS_resetDpd (mykonosDevice_t *device, mykonosTxChannels_t txChannel, mykonosDpdResetMode_t reset) |
This function resets the DPD model. More... | |
mykonosErr_t | MYKONOS_setDpdBypassConfig (mykonosDevice_t *device, mykonosDpdBypassConfig_t *actConfig) |
DPD feature to set the bypassing actuator when Tx signal power is below a programmable threshold given in mykonosDpdBypassConfig_t lowPowerActuatorBypassLevel. More... | |
mykonosErr_t | MYKONOS_getDpdBypassConfig (mykonosDevice_t *device, mykonosDpdBypassConfig_t *actConfig) |
Get configuration for bypassing DPD actuator. More... | |
mykonosErr_t | MYKONOS_setDpdActuatorCheck (mykonosDevice_t *device, mykonosDpdActuatorCheck_t *actCheck) |
DPD feature to set the actuator gain difference check. If the gain before and after the actuator exceeds the value actCheck->actuatorGainCheckLevel an error will be issued and the actuator will reset depending on the actCheck->actuatorGainCheckMode. More... | |
mykonosErr_t | MYKONOS_getDpdActuatorCheck (mykonosDevice_t *device, mykonosDpdActuatorCheck_t *actCheck) |
Get configuration for DPD actuator check. More... | |
mykonosErr_t | MYKONOS_setClgcAttenTuningConfig (mykonosDevice_t *device, mykonosClgcAttenTuningConfig_t *attRangeCfg) |
CLGC feature to set the TX attenuation tuning range to a relative range around a nominal value. More... | |
mykonosErr_t | MYKONOS_getClgcAttenTuningConfig (mykonosDevice_t *device, mykonosClgcAttenTuningConfig_t *attRangeCfg) |
Get configuration for CLGC Tx attenuation tuning range. More... | |
mykonosErr_t | MYKONOS_configClgc (mykonosDevice_t *device) |
This function will configure CLGC settings. More... | |
mykonosErr_t | MYKONOS_getClgcConfig (mykonosDevice_t *device) |
mykonosErr_t | MYKONOS_getClgcStatus (mykonosDevice_t *device, mykonosTxChannels_t txChannel, mykonosClgcStatus_t *clgcStatus) |
This function reads the CLGC calibration status from the Mykonos ARM processor. More... | |
mykonosErr_t | MYKONOS_setClgcGain (mykonosDevice_t *device, mykonosTxChannels_t txChannel, int16_t gain) |
This function updates the CLGC desired gain parameter. More... | |
mykonosErr_t | MYKONOS_configVswr (mykonosDevice_t *device) |
This function, when called during RadioOff, will configure VSWR settings. More... | |
mykonosErr_t | MYKONOS_getVswrConfig (mykonosDevice_t *device) |
mykonosErr_t | MYKONOS_getVswrStatus (mykonosDevice_t *device, mykonosTxChannels_t txChannel, mykonosVswrStatus_t *vswrStatus) |
This function reads the VSWR calibration status from the Mykonos ARM processor. More... | |
mykonosErr_t | MYKONOS_runInitCals (mykonosDevice_t *device, uint32_t calMask) |
Runs the Mykonos initialization calibrations. More... | |
mykonosErr_t | MYKONOS_waitInitCals (mykonosDevice_t *device, uint32_t timeoutMs, uint8_t *errorFlag, uint8_t *errorCode) |
Blocking waits for the Mykonos initialization calibrations to complete. More... | |
mykonosErr_t | MYKONOS_abortInitCals (mykonosDevice_t *device, uint32_t *calsCompleted) |
Aborts from an on going ARM init calibration operation. More... | |
mykonosErr_t | MYKONOS_getInitCalStatus (mykonosDevice_t *device, mykonosInitCalStatus_t *initCalStatus) |
Gets the device initialization calibration status. More... | |
mykonosErr_t | MYKONOS_resetExtTxLolChannel (mykonosDevice_t *device, mykonosTxChannels_t channelSel) |
Performs reset to the External Tx LO Leakage tracking calibration channel estimate. More... | |
mykonosErr_t | MYKONOS_radioOn (mykonosDevice_t *device) |
Instructs the ARM processor to move the radio state to the Radio ON state. More... | |
mykonosErr_t | MYKONOS_radioOff (mykonosDevice_t *device) |
Instructs the ARM processor to move the radio state to the off state. More... | |
mykonosErr_t | MYKONOS_getRadioState (mykonosDevice_t *device, uint32_t *radioStatus) |
Reads the current ARM radio state. More... | |
mykonosErr_t | MYKONOS_enableTrackingCals (mykonosDevice_t *device, uint32_t enableMask) |
Sets which ARM tracking cals are enabled during the radioOn state. More... | |
mykonosErr_t | MYKONOS_rescheduleTrackingCal (mykonosDevice_t *device, mykonosTrackingCalibrations_t trackingCal) |
Reschedules a tracking calibration to run. Can be used to override the tracking calibration timer and force a tracking calibration to run. Can be used to reschedule a tracking calibration after a tracking calibration error has been detected. Only one tracking calibration object can be scheduled per channel per function call. More... | |
mykonosErr_t | MYKONOS_setAllTrackCalState (mykonosDevice_t *device, uint32_t trackingCalMask) |
Suspend or resume tracking calibrations in RADIO_ON. More... | |
mykonosErr_t | MYKONOS_getAllTrackCalState (mykonosDevice_t *device, uint32_t *trackCals) |
Get the Suspended or Resumed state for tracking calibrations. More... | |
mykonosErr_t | MYKONOS_setTrackingCalState (mykonosDevice_t *device, mykonosTrackingCalibrations_t trackingCal, uint8_t trackCalState) |
Suspend or resume individual tracking calibration. More... | |
mykonosErr_t | MYKONOS_getTrackingCalState (mykonosDevice_t *device, mykonosTrackingCalibrations_t trackingCal, uint8_t *trackCalState) |
Get the Suspended or Resumed state for individual tracking calibration. More... | |
mykonosErr_t | MYKONOS_getEnabledTrackingCals (mykonosDevice_t *device, uint32_t *enableMask) |
Reads back which ARM tracking cals are enabled. More... | |
mykonosErr_t | MYKONOS_getPendingTrackingCals (mykonosDevice_t *device, uint32_t *pendingCalMask) |
Returns the tracking calibration pending and error status. More... | |
mykonosErr_t | MYKONOS_getTxLolStatus (mykonosDevice_t *device, mykonosTxChannels_t txChannel, mykonosTxLolStatus_t *txLolStatus) |
Returns the status of the TxLOL external tracking calibration. More... | |
mykonosErr_t | MYKONOS_getTxQecStatus (mykonosDevice_t *device, mykonosTxChannels_t txChannel, mykonosTxQecStatus_t *txQecStatus) |
Returns the status of the TxQEC tracking calibration. More... | |
mykonosErr_t | MYKONOS_getRxQecStatus (mykonosDevice_t *device, mykonosRxChannels_t rxChannel, mykonosRxQecStatus_t *rxQecStatus) |
Returns the status of the RxQEC tracking calibration. More... | |
mykonosErr_t | MYKONOS_getOrxQecStatus (mykonosDevice_t *device, mykonosObsRxChannels_t orxChannel, mykonosOrxQecStatus_t *orxQecStatus) |
Returns the status of the ORxQEC tracking calibration. More... | |
mykonosErr_t | MYKONOS_setSnifferChannel (mykonosDevice_t *device, mykonosSnifferChannel_t snifferChannel) |
Selects the Sniffer RF input to use for the observation receiver when in ObsRx pin mode and ORX_MODE = SNIFFER(4) More... | |
mykonosErr_t | MYKONOS_setRadioControlPinMode (mykonosDevice_t *device) |
Configures the Radio power up/down control for Rx and Tx paths to be controlled by pins (TX1/2_ENABLE, RX1/2_ENABLE, and GPIO pins) or an API function call. More... | |
mykonosErr_t | MYKONOS_setPathDelay (mykonosDevice_t *device, mykonosPathdelay_t *pathDelay) |
This function will configure the path delay settings for all the features: DPD, VSWR and CLGC. More... | |
mykonosErr_t | MYKONOS_getPathDelay (mykonosDevice_t *device, mykonosPathDelaySel_t select, mykonosPathdelay_t *pathDelay) |
This function will read the current path delay settings for the selected calibration. More... | |
mykonosErr_t | MYKONOS_getDpdErrorCounters (mykonosDevice_t *device, mykonosTxChannels_t txChannel, mykonosDpdErrorCounters_t *dpdErrCnt) |
This function reads the current error counters for all the DPD error codes from mykonosDpdErrors_t. More... | |
mykonosErr_t | MYKONOS_readArmMem (mykonosDevice_t *device, uint32_t address, uint8_t *returnData, uint32_t bytesToRead, uint8_t autoIncrement) |
Read from the Mykonos ARM program or data memory. More... | |
mykonosErr_t | MYKONOS_writeArmMem (mykonosDevice_t *device, uint32_t address, uint8_t *data, uint32_t byteCount) |
Write to the Mykonos ARM program or data memory. More... | |
mykonosErr_t | MYKONOS_writeArmConfig (mykonosDevice_t *device, uint8_t objectId, uint16_t offset, uint8_t *data, uint8_t byteCount) |
Low level helper function used by Mykonos API to write the ARM memory config structures. More... | |
mykonosErr_t | MYKONOS_readArmConfig (mykonosDevice_t *device, uint8_t objectId, uint16_t offset, uint8_t *data, uint8_t byteCount) |
Low level helper function used by Mykonos API to read the ARM memory config structures. More... | |
mykonosErr_t | MYKONOS_sendArmCommand (mykonosDevice_t *device, uint8_t opCode, uint8_t *extendedData, uint8_t extendedDataNumBytes) |
Sends a command to the Mykonos ARM processor. More... | |
mykonosErr_t | MYKONOS_readArmCmdStatus (mykonosDevice_t *device, uint16_t *errorWord, uint16_t *statusWord) |
Reads the Mykonos ARM 64-bit command status register. More... | |
mykonosErr_t | MYKONOS_readArmCmdStatusByte (mykonosDevice_t *device, uint8_t opCode, uint8_t *cmdStatByte) |
Isolated byte read of the Mykonos ARM 64-bit command status register based on the opcode. More... | |
mykonosErr_t | MYKONOS_waitArmCmdStatus (mykonosDevice_t *device, uint8_t opCode, uint32_t timeoutMs, uint8_t *cmdStatByte) |
Mykonos ARM command status wait function polls command status until opcode completes. More... | |
mykonosErr_t | MYKONOS_writeArmProfile (mykonosDevice_t *device) |
Mykonos ARM configuration write. More... | |
mykonosErr_t | MYKONOS_loadAdcProfiles (mykonosDevice_t *device) |
Function called automatically that loads the ADC profiles into the ARM. More... | |
mykonosErr_t | MYKONOS_resetDeframer (mykonosDevice_t *device) |
Resets the JESD204B Deframer. More... | |
mykonosErr_t | MYKONOS_setupSerializers (mykonosDevice_t *device) |
Sets up the JESD204B Serializers. More... | |
mykonosErr_t | MYKONOS_setupDeserializers (mykonosDevice_t *device) |
Sets up the JESD204B Deserializers. More... | |
mykonosErr_t | MYKONOS_setupJesd204bFramer (mykonosDevice_t *device) |
Sets up the JESD204B Framer. More... | |
mykonosErr_t | MYKONOS_setupJesd204bObsRxFramer (mykonosDevice_t *device) |
Sets up the JESD204B OBSRX Framer. More... | |
mykonosErr_t | MYKONOS_setupJesd204bDeframer (mykonosDevice_t *device) |
Sets up the JESD204B Deframer. More... | |
mykonosErr_t | MYKONOS_enableRxFramerLink (mykonosDevice_t *device, uint8_t enable) |
Enables/Disables the JESD204B Rx Framer. More... | |
mykonosErr_t | MYKONOS_enableObsRxFramerLink (mykonosDevice_t *device, uint8_t enable) |
Enables/Disables the JESD204B ObsRx Framer. More... | |
mykonosErr_t | MYKONOS_enableMultichipSync (mykonosDevice_t *device, uint8_t enableMcs, uint8_t *mcsStatus) |
Sets up the chip for multichip sync, and cleans up after MCS. More... | |
mykonosErr_t | MYKONOS_enableSysrefToRxFramer (mykonosDevice_t *device, uint8_t enable) |
Enables or disables SYSREF to the transceiver's RX framer. More... | |
mykonosErr_t | MYKONOS_enableSysrefToObsRxFramer (mykonosDevice_t *device, uint8_t enable) |
Enables or disables SYSREF to the transceiver's Observation RX framer. More... | |
mykonosErr_t | MYKONOS_enableSysrefToDeframer (mykonosDevice_t *device, uint8_t enable) |
Enables or disables SYSREF to the transceiver's deframer. More... | |
mykonosErr_t | MYKONOS_readRxFramerStatus (mykonosDevice_t *device, uint8_t *framerStatus) |
Reads the transceiver's RX framer status. More... | |
mykonosErr_t | MYKONOS_readOrxFramerStatus (mykonosDevice_t *device, uint8_t *obsFramerStatus) |
Reads the transceiver's Observation RX framer status. More... | |
mykonosErr_t | MYKONOS_readDeframerStatus (mykonosDevice_t *device, uint8_t *deframerStatus) |
Reads the transceiver's deframer status. More... | |
mykonosErr_t | MYKONOS_getDeframerFifoDepth (mykonosDevice_t *device, uint8_t *fifoDepth, uint8_t *readEnLmfcCount) |
Reads the Mykonos JESD204b Deframer determinstic FIFO depth. More... | |
mykonosErr_t | MYKONOS_enableRxFramerPrbs (mykonosDevice_t *device, mykonosPrbsOrder_t polyOrder, uint8_t enable) |
Selects the PRBS type and enables or disables RX Framer PRBS20 generation. More... | |
mykonosErr_t | MYKONOS_enableObsRxFramerPrbs (mykonosDevice_t *device, mykonosPrbsOrder_t polyOrder, uint8_t enable) |
Selects the PRBS type and enables or disables OBSRX Framer PRBS20 generation. More... | |
mykonosErr_t | MYKONOS_rxInjectPrbsError (mykonosDevice_t *device) |
Injects a PRBS error into the RX data path. More... | |
mykonosErr_t | MYKONOS_obsRxInjectPrbsError (mykonosDevice_t *device) |
Initiates a PRBS error injection into the Observation RX data path. More... | |
mykonosErr_t | MYKONOS_enableDeframerPrbsChecker (mykonosDevice_t *device, uint8_t lanes, mykonosPrbsOrder_t polyOrder, uint8_t enable) |
Configures and enables or disables the transceiver's deframer PRBS checker. More... | |
mykonosErr_t | MYKONOS_clearDeframerPrbsCounters (mykonosDevice_t *device) |
Clears the deframer/deserializer PRBS counters. More... | |
mykonosErr_t | MYKONOS_readDeframerPrbsCounters (mykonosDevice_t *device, uint8_t counterSelect, uint32_t *prbsErrorCount) |
Reads the deframer PRBS counters. More... | |
mykonosErr_t | MYKONOS_jesd204bIlasCheck (mykonosDevice_t *device, uint16_t *mismatch) |
Reads the lane 0 JESD204B deframer configuration and compares it against the ILAS received values. More... | |
mykonosErr_t | MYKONOS_setRxFramerDataSource (mykonosDevice_t *device, uint8_t dataSource) |
Select data to inject into the Rx framer input (ADC data or Loopback data from deframer output) More... | |
mykonosErr_t | MYKONOS_setObsRxFramerDataSource (mykonosDevice_t *device, uint8_t dataSource) |
Select data to inject into the ObsRx framer input (ADC data or Loopback data from deframer output) More... | |
mykonosErr_t | MYKONOS_programFir (mykonosDevice_t *device, mykonosfirName_t filterToProgram, mykonosFir_t *firFilter) |
Configures one or more FIR filters in the device. More... | |
mykonosErr_t | MYKONOS_readFir (mykonosDevice_t *device, mykonosfirName_t filterToRead, mykonosFir_t *firFilter) |
Reads the FIR filter programmed into the device. More... | |
mykonosErr_t | MYKONOS_programRxGainTable (mykonosDevice_t *device, uint8_t *gainTablePtr, uint8_t numGainIndexesInTable, mykonosGainTable_t rxChannel) |
Programs the gain table settings for either Rx1, Rx2, Rx1 + Rx2, ORx, or SnRx receiver types. More... | |
mykonosErr_t | MYKONOS_setRx1ManualGain (mykonosDevice_t *device, uint8_t gainIndex) |
Sets the Rx1 Manual Gain Index. More... | |
mykonosErr_t | MYKONOS_setRx2ManualGain (mykonosDevice_t *device, uint8_t gainIndex) |
Sets the Rx2 Manual Gain index. More... | |
mykonosErr_t | MYKONOS_getRx1Gain (mykonosDevice_t *device, uint8_t *rx1GainIndex) |
Reads the Rx1 Gain Index for Manual or AGC gain control mode. More... | |
mykonosErr_t | MYKONOS_getRx2Gain (mykonosDevice_t *device, uint8_t *rx2GainIndex) |
Reads the Rx2 Gain Index for Manual or AGC gain control mode. More... | |
mykonosErr_t | MYKONOS_setupRxAgc (mykonosDevice_t *device) |
Sets up the device Rx Automatic Gain Control (AGC) registers. More... | |
mykonosErr_t | MYKONOS_resetRxAgc (mykonosDevice_t *device) |
This function resets the AGC state machine. More... | |
mykonosErr_t | MYKONOS_setRxAgcMinMaxGainIndex (mykonosDevice_t *device, mykonosRxChannels_t rxChannelSelect, uint8_t maxGainIndex, uint8_t minGainIndex) |
This function sets the min/max gain indexes for AGC in the main RX channel. More... | |
mykonosErr_t | MYKONOS_setObsRxAgcMinMaxGainIndex (mykonosDevice_t *device, mykonosObsRxChannels_t obsRxChannelSelect, uint8_t maxGainIndex, uint8_t minGainIndex) |
This function sets the min/max gain indexes for AGC in the observation channel. More... | |
mykonosErr_t | MYKONOS_setRx1TempGainComp (mykonosDevice_t *device, int16_t rx1TempCompGain_mdB) |
This function sets the Temperature gain compensation for Rx1 channel. More... | |
mykonosErr_t | MYKONOS_getRx1TempGainComp (mykonosDevice_t *device, int16_t *rx1TempCompGain_mdB) |
This function gets the Temperature gain compensation for Rx1. More... | |
mykonosErr_t | MYKONOS_setRx2TempGainComp (mykonosDevice_t *device, int16_t rx2TempCompGain_mdB) |
This function sets the Temperature gain compensation for Rx2 channel. More... | |
mykonosErr_t | MYKONOS_getRx2TempGainComp (mykonosDevice_t *device, int16_t *rx2TempCompGain_mdB) |
This function gets the Temperature gain compensation for Rx2. More... | |
mykonosErr_t | MYKONOS_setObsRxTempGainComp (mykonosDevice_t *device, int16_t obsRxTempCompGain_mdB) |
This function sets the Temperature gain compensation for the observation channel. More... | |
mykonosErr_t | MYKONOS_getObsRxTempGainComp (mykonosDevice_t *device, int16_t *obsRxTempCompGain_mdB) |
This function gets the Temperature gain compensation for the observation channel. More... | |
mykonosErr_t | MYKONOS_enableRxGainCtrSyncPulse (mykonosDevice_t *device, uint8_t enable) |
Enables or disables the Rx slow loop gain counter to use the sync pulse. More... | |
mykonosErr_t | MYKONOS_setRxGainControlMode (mykonosDevice_t *device, mykonosGainMode_t mode) |
Configures the Rx gain control mode. More... | |
mykonosErr_t | MYKONOS_getRx1DecPower (mykonosDevice_t *device, uint16_t *rx1DecPower_mdBFS) |
Performs a power measurement in the Rx1 digital data path. More... | |
mykonosErr_t | MYKONOS_getRx2DecPower (mykonosDevice_t *device, uint16_t *rx2DecPower_mdBFS) |
Performs a power measurement in the Rx2 digital data path. More... | |
mykonosErr_t | MYKONOS_setDefaultObsRxPath (mykonosDevice_t *device, mykonosObsRxChannels_t defaultObsRxCh) |
Sets the default Obs Rx channel to enter when device moves from radioOff to radioOn. More... | |
mykonosErr_t | MYKONOS_setObsRxPathSource (mykonosDevice_t *device, mykonosObsRxChannels_t obsRxCh) |
Powers up or down the Observation Rx signal chain in the radioOn state. More... | |
mykonosErr_t | MYKONOS_getObsRxPathSource (mykonosDevice_t *device, mykonosObsRxChannels_t *obsRxCh) |
Reads back the currently enabled Observation Rx channel in the radioOn state. More... | |
mykonosErr_t | MYKONOS_setObsRxManualGain (mykonosDevice_t *device, mykonosObsRxChannels_t obsRxCh, uint8_t gainIndex) |
Sets the Rx gain of the ObsRx channel. More... | |
mykonosErr_t | MYKONOS_getObsRxGain (mykonosDevice_t *device, uint8_t *gainIndex) |
Gets the gain index of the currently enabled ObsRx channel. More... | |
mykonosErr_t | MYKONOS_setupObsRxAgc (mykonosDevice_t *device) |
Sets up the device ObsRx Automatic Gain Control (AGC) registers. More... | |
mykonosErr_t | MYKONOS_enableObsRxGainCtrSyncPulse (mykonosDevice_t *device, uint8_t enable) |
Enables or disables the ObsRx slow loop gain counter to use the sync pulse. More... | |
mykonosErr_t | MYKONOS_setObsRxGainControlMode (mykonosDevice_t *device, mykonosGainMode_t mode) |
Configures the ObsRx gain control mode. More... | |
mykonosErr_t | MYKONOS_getObsRxDecPower (mykonosDevice_t *device, uint16_t *obsRxDecPower_mdBFS) |
Performs a power measurement in the ObsRx digital data path. More... | |
mykonosErr_t | MYKONOS_setTx1Attenuation (mykonosDevice_t *device, uint16_t tx1Attenuation_mdB) |
Sets the Tx1 RF output Attenuation. More... | |
mykonosErr_t | MYKONOS_setTx2Attenuation (mykonosDevice_t *device, uint16_t tx2Attenuation_mdB) |
Sets the Tx2 RF output Attenuation (Step size is 0.05dB.) More... | |
mykonosErr_t | MYKONOS_getTx1Attenuation (mykonosDevice_t *device, uint16_t *tx1Attenuation_mdB) |
Reads back the Tx1 RF output Attenuation. More... | |
mykonosErr_t | MYKONOS_getTx2Attenuation (mykonosDevice_t *device, uint16_t *tx2Attenuation_mdB) |
Reads back the Tx2 RF output Attenuation. More... | |
mykonosErr_t | MYKONOS_getTxFilterOverRangeStatus (mykonosDevice_t *device, uint8_t *txFilterStatus) |
Checks the Tx Filter over-range bit assignments for digital clipping in the Tx data path. More... | |
mykonosErr_t | MYKONOS_enableTxNco (mykonosDevice_t *device, uint8_t enable, int32_t tx1ToneFreq_kHz, int32_t tx2ToneFreq_kHz) |
Enables/Disables the Tx NCO test tone. More... | |
mykonosErr_t | MYKONOS_setupPaProtection (mykonosDevice_t *device, uint16_t powerThreshold, uint8_t attenStepSize, uint8_t avgDuration, uint8_t stickyFlagEnable, uint8_t txAttenControlEnable) |
Writes Mykonos device registers with settings for the PA Protection block. More... | |
mykonosErr_t | MYKONOS_enablePaProtection (mykonosDevice_t *device, uint8_t enable) |
Enables the Mykonos PA Protection block according to the parameters passed in MYKONOS_setupPaProtection(...). More... | |
mykonosErr_t | MYKONOS_getDacPower (mykonosDevice_t *device, mykonosTxChannels_t channel, uint16_t *channelPower) |
Obtains an estimate of a TX channel's accumulated power over the sample duration provided in MYKONOS_setupPaProtection(...) More... | |
mykonosErr_t | MYKONOS_getPaProtectErrorFlagStatus (mykonosDevice_t *device, uint8_t *errorFlagStatus) |
Returns PA Protection Error Flag Status. More... | |
mykonosErr_t | MYKONOS_clearPaErrorFlag (mykonosDevice_t *device) |
Manually clears the PA Protection Error Flags. More... | |
const char * | getMykonosErrorMessage (mykonosErr_t errorCode) |
Helper function for return of character string based on 32-bit mykonosErr_t enum value. More... | |
mykonosErr_t | MYKONOS_initSubRegisterTables (mykonosDevice_t *device) |
Write indirect registers (Programmable FIRs, Rx gain tables, JESD204B settings). Must be done after Multi Chip Sync. More... | |
mykonosErr_t | MYKONOS_setTxPfirSyncClk (mykonosDevice_t *device) |
Sets the digital Tx PFIR SYNC clock divider. More... | |
mykonosErr_t | MYKONOS_setRxPfirSyncClk (mykonosDevice_t *device) |
Sets the digital Rx PFIR SYNC clock divider. More... | |
mykonosErr_t | MYKONOS_setRfDcOffsetCnt (mykonosDevice_t *device, mykonosDcOffsetChannels_t channel, uint16_t measureCount) |
Sets the measure count which is the number of samples taken before DC offset correction is applied for the given RF channel. This value should be changed after ARM initialization. channel can be one of the following ( mykonosDcOffsetChannels_t ). More... | |
mykonosErr_t | MYKONOS_getRfDcOffsetCnt (mykonosDevice_t *device, mykonosDcOffsetChannels_t channel, uint16_t *measureCount) |
retrieves the measure count which is the number of samples taken before DC offset correction is applied for the given Rf channel. channel can be one of the following ( mykonosDcOffsetChannels_t ). More... | |
mykonosErr_t | MYKONOS_setDigDcOffsetMShift (mykonosDevice_t *device, mykonosDcOffsetChannels_t channel, uint8_t mShift) |
Sets M-Shift value which is the Corner frequency of Rx notch filter for the given channel. channel can be one of the following ( mykonosDcOffsetChannels_t ). More... | |
mykonosErr_t | MYKONOS_getDigDcOffsetMShift (mykonosDevice_t *device, mykonosDcOffsetChannels_t channel, uint8_t *mShift) |
retrieves the M-Shift value which is the Corner frequency of Rx notch filter for the given channel. channel can be one of the following ( mykonosDcOffsetChannels_t ). More... | |
mykonosErr_t | MYKONOS_setDigDcOffsetEn (mykonosDevice_t *device, uint8_t enableMask) |
Enable/ Disable Digital DC Offset channels using the channel mask. The mask can be a combination of the following channel values ( mykonosRxDcOffsettEn_t ). More... | |
mykonosErr_t | MYKONOS_getDigDcOffsetEn (mykonosDevice_t *device, uint8_t *enableMask) |
reads Enable/ Disable channels Digital DC Offset and returns a mask of it. The mask returned will be a combination of the following channel values ( mykonosRxDcOffsettEn_t ). More... | |
Contains macro definitions and function prototypes for mykonos.c.
Mykonos API version: 1.5.2.3566
#define ORX_PROFILE_VALID 0x04 |
#define RX_PROFILE_VALID 0x02 |
#define SNIFF_PROFILE_VALID 0x08 |
#define TX_PROFILE_VALID 0x01 |
Legal Disclaimer Copyright 2015-2017 Analog Devices Inc. Released under the AD9371 API license, for more information see the "LICENSE.txt" file in this zip file.
const char* getMykonosErrorMessage | ( | mykonosErr_t | errorCode | ) |
Helper function for return of character string based on 32-bit mykonosErr_t enum value.
To save codespace, these error strings are ifdef'd out unless the user adds a define MYKONOS_VERBOSE to their workspace. This function can be useful for debug. Each function also returns unique error codes to make it easier to determine where the code broke.
errorCode | is enumerated error code value |
mykonosErr_t MYKONOS_abortInitCals | ( | mykonosDevice_t * | device, |
uint32_t * | calsCompleted | ||
) |
Aborts from an on going ARM init calibration operation.
The ARM init calibrations can take several seconds. If for any reason the Baseband processor needs to stop the running ARM calibration sequence, call this function. The *calsCompleted parameter is an option parameter that will return which cals completed before the abort command was received. If *calsCompleted is a null pointer, no value will be returned.
Dependencies
device | A pointer to the device settings structure |
calsCompleted | A bitmask is returned which describes which cals completed during the previous MYKONOS_runInitCals() call. |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_ABORT_INITCALS_NULL_PARAM | Function parameter calsCompleted has NULL pointer |
mykonosErr_t MYKONOS_checkArmState | ( | mykonosDevice_t * | device, |
mykonosArmState_t | armStateCheck | ||
) |
Verifies the ARM status once it is start running.
Wait for ARM to go into radio state, if takes longer there is and ARM error get error in Application layer calling MYKONOS_getRadioState()
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
armStateCheck | if the ARM is not in this state it will return an error, |
MYKONOS_ERR_ARMSTATE_EXCEPTION | ARM system problem has been detected. |
MYKONOS_ERR_ARMSTATE_CAL_ERROR | ARM has detected an error in the tracking calibrations. |
MYKONOS_ERR_ARMSTATE_EXCEPTION | ARM has detected an illegal profile. |
MYKONOS_ERR_WAITARMCSTATE_TIMEOUT | Timeout occurred in check ARM state. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_checkPllsLockStatus | ( | mykonosDevice_t * | device, |
uint8_t * | pllLockStatus | ||
) |
Checks if the PLLs are locked.
This function updates the pllLockStatus pointer with a lock status it per PLL.
pllLockStatus[0] = CLKPLL Locked pllLockStatus[1] = RX_PLL Locked pllLockStatus[2] = TX_PLL Locked pllLockStatus[3] = SNIFFER_PLL Locked pllLockStatus[4] = CAL_PLL Locked
device | the Mykonos device data structure |
pllLockStatus | Lock status bit per PLL |
mykonosErr_t MYKONOS_clearDeframerPrbsCounters | ( | mykonosDevice_t * | device | ) |
Clears the deframer/deserializer PRBS counters.
Dependencies
device | is a pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_clearPaErrorFlag | ( | mykonosDevice_t * | device | ) |
Manually clears the PA Protection Error Flags.
This function manually clears the PA Error Flags. The user must setup the PA Protection block to enable sticky error flags. Sticky error flags require the user to clear the bit manually even if the accumulated power is below the power threshold for the PA protection block.
Dependencies
device | Pointer to the Mykonos device's data structure |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_configClgc | ( | mykonosDevice_t * | device | ) |
This function will configure CLGC settings.
A DPD-enabled transceiver is required for CLGC to be enabled. The CLGC has several user adjustable settings that can be configured before running the runInitCals with the calMask set for the CLGC init cal. Call this function with desired settings set before running the CLGC init cal or enabling CLGC tracking.
This function can be called in either Radio On or Off state.
Dependencies
MYKONOS_ERR_CFGCLGC_TXORX_PROFILE_INV | ERROR: Tx and ObsRx profiles must be valid to use the CLGC feature |
MYKONOS_ERR_CFGCLGC_NULL_CLGCCFGSTRUCT | ERROR: CLGC config structure pointer is null in device->tx->clgcConfig |
MYKONOS_ERR_CFGCLGC_INV_DESIREDGAIN | ERROR: CLGC tx1DesiredGain or tx2DesiredGain parameter is out of range |
MYKONOS_ERR_CFGCLGC_INV_TXATTENLIMIT | ERROR: CLGC tx1AttenLimit or tx2AttenLimit parameter is out of range |
MYKONOS_ERR_CFGCLGC_INV_CLGC_CTRLRATIO | ERROR: clgcControlRatio parameter is out of range |
MYKONOS_ERR_CFGCLGC_INV_THRESHOLD | Error: tx1RelThreshold or tx2RelThreshold parameter is out of range |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_configDpd | ( | mykonosDevice_t * | device | ) |
This function will configure DPD settings.
A DPD-enabled transceiver is required for DPD to be enabled. The DPD has several user adjustable settings that can be configured before running the runInitCals with the calMask set for the DPD init cal. Call this function with desired settings set before running the DPD init cal or enabling DPD tracking.
This function can be called in either Radio On or Off state.
Dependencies
MYKONOS_ERR_CFGDPD_TXORX_PROFILE_INV | ERROR: to use these features, a valid Tx and ORx profile must exist in the device data structure |
MYKONOS_ERR_CFGDPD_NULL_DPDCFGSTRUCT | ERROR: device->tx->dpdConfig is a NULL pointer |
MYKONOS_ERR_CFGDPD_INV_DPDDAMPING | ERROR: damping parameter is out of range |
MYKONOS_ERR_CFGDPD_INV_DPDSAMPLES | ERROR: samples parameter is out of range |
MYKONOS_ERR_CFGDPD_INV_NUMWEIGHTS | ERROR: numWeights parameter is out of range (0-3) |
MYKONOS_ERR_CFGDPD_INV_MODELVERSION | ERROR: modelVersion parameter is out of range (0-3) |
MYKONOS_ERR_CFGDPD_INV_DPDOUTLIERTHRESH | ERROR: outlierThreshold parameter is out of range |
MYKONOS_ERR_CFGDPD_INV_DPD_ADDDELAY | ERROR: additionalDelayOffset parameter is out of range |
MYKONOS_ERR_CFGDPD_INV_PNSEQLEVEL | ERROR: pathDelayPnSeqLevel parameter is out of range |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_configVswr | ( | mykonosDevice_t * | device | ) |
This function, when called during RadioOff, will configure VSWR settings.
A DPD-enabled transceiver is required for VSWR to be enabled. The VSWR has several user adjustable settings that can be configured before running the runInitCals with the calMask set for the VSWR init cal. Call this function with desired settings set before running the VSWR init cal or enabling VSWR tracking.
Dependencies
MYKONOS_ERR_CFGVSWR_TXORX_PROFILE_INV | ERROR: Tx and ObsRx profiles must be valid to use the VSWR feature |
MYKONOS_ERR_CFGVSWR_NULL_VSWRCFGSTRUCT | ERROR: CLGC config structure pointer is null in device->tx->clgcConfig |
MYKONOS_ERR_CFGVSWR_ARMSTATE_ERROR | ERROR: ARM is not in the IDLE(radioOff) or Ready state. |
mykonosErr_t MYKONOS_enableDeframerPrbsChecker | ( | mykonosDevice_t * | device, |
uint8_t | lanes, | ||
mykonosPrbsOrder_t | polyOrder, | ||
uint8_t | enable | ||
) |
Configures and enables or disables the transceiver's deframer PRBS checker.
Dependencies
device | is a pointer to the device settings structure |
lanes | selects the lane for PRBS checking based on a 4-bit mask, where each weighted bit corresponds with a different lane selection as such: '1' = lane 0, '2' = lane 1, '4' = lane 2, '8' = lane 3 |
polyOrder | selects the PRBS type based on enum values (MYK_PRBS7, MYK_PRBS15, MYK_PRBS31) |
enable | '1' = enables checking, '0' = disables checking |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_DEFRAMER_INV_PRBS_POLYORDER_PARAM | Invalid polyOrder parameter - use ENUM |
MYKONOS_ERR_DEFRAMER_INV_PRBS_ENABLE_PARAM | Invalid enable (valid 0-1) or lanes (valid 0-15) parameter |
mykonosErr_t MYKONOS_enableMultichipSync | ( | mykonosDevice_t * | device, |
uint8_t | enableMcs, | ||
uint8_t * | mcsStatus | ||
) |
Sets up the chip for multichip sync, and cleans up after MCS.
When working with multiple transceivers or even only one transceiver that requires deterministic latency between the Tx and observation and or main Rx JESD204B data path, Multichip sync is necessary. This function should be run after all transceivers are initialized.
After the SYSREF pulses have been sent, call the MYKONOS_enableMultichipSync() function again with the enableMcs parameter set to 0. When enableMcs = 0, the MCS status will be returned in the mcsStatus parameter.
Typical sequence: 1) Initialize all Mykonos devices in system using MYKONOS_initialize() 2) Run MYKONOS_enableMultichipSync with enableMcs = 1 3) Send at least 3 SYSREF pulses 4) Run MYKONOS_enableMultichipSync with enableMcs = 0 5) Load ARM, run ARM cals and continue to active Transmit/Receive
mcsStatus | bit Description |
---|---|
[0] | MCS JESD SYSREF Status (1 = sync occurred) |
[1] | MCS Digital Clocks Sync Status (1 = sync occurred) |
[2] | MCS CLKPLL SDM Sync Status (1 = sync occurred) |
[3] | MCS Device Clock divider Sync Status (1 = sync occurred) |
Dependencies
device | is a pointer to the device settings structure |
enableMcs | =1 will enable the MCS state machine, =0 will allow reading back MCS status |
mcsStatus | optional parameter, if pointer is not null the function Which will be populated with the mcsStatus word described in the table above. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_enableObsRxFramerLink | ( | mykonosDevice_t * | device, |
uint8_t | enable | ||
) |
Enables/Disables the JESD204B ObsRx Framer.
This function is normally not necessary. In the event that the link needs to be reset, this function allows the ObsRx framer to be disabled and re-enabled.
Dependencies
device | is a pointer to the device settings structure |
enable | 0 = Disable the selected framer, 1 = enable the selected framer link |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_ENFRAMERLINK_INV_LANESEN_PARM | Invalid serializerLanesEnabled parameter in device data structure (Valid 0-15) |
mykonosErr_t MYKONOS_enableObsRxFramerPrbs | ( | mykonosDevice_t * | device, |
mykonosPrbsOrder_t | polyOrder, | ||
uint8_t | enable | ||
) |
Selects the PRBS type and enables or disables OBSRX Framer PRBS20 generation.
Dependencies
device | is a pointer to the device settings structure |
polyOrder | selects the PRBS type based on a two-bit value range from 0-3 |
enable | '1' = enables PRBS OBSRX framer PRBS generator, '0' = disables PRBS generator |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_OBSRX_FRAMER_INV_PRBS_POLYORDER_PARAM | polyOrder parameter is not a valid value - use ENUM |
mykonosErr_t MYKONOS_enableObsRxGainCtrSyncPulse | ( | mykonosDevice_t * | device, |
uint8_t | enable | ||
) |
Enables or disables the ObsRx slow loop gain counter to use the sync pulse.
Dependencies:
device | is structure pointer to the Mykonos data structure containing the device SPI settings |
enable | is a uint8_t data type where '0' = disable ObsRx gain counter from using sync pulse, '1' = enable ObsRx gain. All other values will throw an error. counter to use the sync pulse. This value is written back to the device data structure for storage. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_enablePaProtection | ( | mykonosDevice_t * | device, |
uint8_t | paProtectEnable | ||
) |
Enables the Mykonos PA Protection block according to the parameters passed in MYKONOS_setupPaProtection(...).
This function enables the PA Protection block according to the parameters passed in MYKONOS_setupPaProtection(...) The paProtectEnable signal enables the PA Protection block, allowing usage of the PA protection functions.
Dependencies
device | Pointer to the Mykonos device's data structure |
paProtectEnable | "1" Enables the PA Protection block. "0" Disables the PA Protection block |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_enableRxFramerLink | ( | mykonosDevice_t * | device, |
uint8_t | enable | ||
) |
Enables/Disables the JESD204B Rx Framer.
This function is normally not necessary. In the event that the link needs to be reset, this function allows the Rx framer to be disabled and re-enabled.
Dependencies
device | is a pointer to the device settings structure |
enable | 0 = Disable the selected framer, 1 = enable the selected framer link |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_ENFRAMERLINK_INV_LANESEN_PARM | Invalid serializerLanesEnabled parameter in device data structure |
mykonosErr_t MYKONOS_enableRxFramerPrbs | ( | mykonosDevice_t * | device, |
mykonosPrbsOrder_t | polyOrder, | ||
uint8_t | enable | ||
) |
Selects the PRBS type and enables or disables RX Framer PRBS20 generation.
Dependencies
device | is a pointer to the device settings structure |
polyOrder | selects the PRBS type based on a two-bit value range from 0-3 |
enable | '1' = enables PRBS RX framer PRBS generator, '0' = disables PRBS generator |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_RX_FRAMER_INV_PRBS_POLYORDER_PARAM | Invalid polyOrder parameter, use ENUM |
mykonosErr_t MYKONOS_enableRxGainCtrSyncPulse | ( | mykonosDevice_t * | device, |
uint8_t | enable | ||
) |
Enables or disables the Rx slow loop gain counter to use the sync pulse.
Dependencies:
device | is structure pointer to the Mykonos data structure containing the device SPI settings |
enable | is a uint8_t data type where '0' = disable Rx gain counter from using sync pulse, '1' = enable Rx gain. All other values will throw an error. counter to use the sync pulse. This value is written back to the device data structure for storage. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_enableSysrefToDeframer | ( | mykonosDevice_t * | device, |
uint8_t | enable | ||
) |
Enables or disables SYSREF to the transceiver's deframer.
Dependencies
device | is a pointer to the device settings structure |
enable | = '1' enables SYSREF to deframer, '0' disables SYSREF to deframer |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_enableSysrefToObsRxFramer | ( | mykonosDevice_t * | device, |
uint8_t | enable | ||
) |
Enables or disables SYSREF to the transceiver's Observation RX framer.
Dependencies
device | is a pointer to the device settings structure |
enable | = '1' enables SYSREF to OBSRX framer, '0' disables SYSREF to framer |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_enableSysrefToRxFramer | ( | mykonosDevice_t * | device, |
uint8_t | enable | ||
) |
Enables or disables SYSREF to the transceiver's RX framer.
Dependencies
device | is a pointer to the device settings structure |
enable | = '1' enables SYSREF to RX framer, '0' disables SYSREF to framer |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_enableTrackingCals | ( | mykonosDevice_t * | device, |
uint32_t | enableMask | ||
) |
Sets which ARM tracking cals are enabled during the radioOn state.
This command must be called during radioOff state. If called during radioOn, an error will be returned. The enum mykonosTrackingCalibrations_t can be used to OR together to form the enableMask parameter.
enableMask | Bit description |
---|---|
[0] | TRACK_RX1_QEC |
[1] | TRACK_RX2_QEC |
[2] | TRACK_ORX1_QEC |
[3] | TRACK_ORX2_QEC |
[4] | TRACK_TX1_LOL |
[5] | TRACK_TX2_LOL |
[6] | TRACK_TX1_QEC |
[7] | TRACK_TX2_QEC |
[8] | TRACK_TX1_DPD |
[9] | TRACK_TX2_DPD |
[10] | TRACK_TX1_CLGC |
[11] | TRACK_TX2_CLGC |
[12] | TRACK_TX1_VSWR |
[13] | TRACK_TX2_VSWR |
[16] | TRACK_ORX1_QEC_SNLO |
[17] | TRACK_ORX2_QEC_SNLO |
[18] | TRACK_SRX_QEC |
Dependencies
device | Pointer to the device settings structure |
enableMask | A bitmask that selects which cals to run during radioOn state. |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_EN_TRACKING_CALS_ARMSTATE_ERROR | Error: Tracking cals can only be enabled in the radioOff state. |
MYKONOS_ERR_EN_TRACKING_CALS_ARMERROR | ARM returned error when executing this command |
mykonosErr_t MYKONOS_enableTxNco | ( | mykonosDevice_t * | device, |
uint8_t | enable, | ||
int32_t | tx1ToneFreq_kHz, | ||
int32_t | tx2ToneFreq_kHz | ||
) |
Enables/Disables the Tx NCO test tone.
This function enables/disables a digital numerically controlled oscillator in the Mykonos Digital to create a test CW tone on Tx1 and Tx2 RF outputs.
The TxAttenuation is forced in this function to max analog output power, but the digital attenuation is backed off 6dB to make sure the digital filter does not clip and cause spurs in the tx spectrum.
Dependencies
device | Pointer to the Mykonos device's data structure |
enable | 0 = Disable Tx NCO, 1 = Enable Tx NCO on both transmitters |
tx1ToneFreq_kHz | Signed frequency in kHz of the desired Tx1 tone |
tx2ToneFreq_kHz | Signed frequency in kHz of the desired Tx2 tone |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_ENTXNCO_TXPROFILE_INVALID | Can not enable Tx NCO when Tx Profile is not enabled/valid |
MYKONOS_ERR_ENTXNCO_TX1_FREQ_INVALID | Tx1 NCO Tone frequency out of range (-IQrate/2 to IQrate/2) |
MYKONOS_ERR_ENTXNCO_TX2_FREQ_INVALID | Tx2 NCO Tone frequency out of range (-IQrate/2 to IQrate/2) |
mykonosErr_t MYKONOS_getAllTrackCalState | ( | mykonosDevice_t * | device, |
uint32_t * | trackCals | ||
) |
Get the Suspended or Resumed state for tracking calibrations.
This function is used to get the suspend or resume state of all active tracking calibrations and the state is stored in trackCals.
Dependencies
device | Pointer to the device settings structure |
trackCals | pointer to store the tracking calibration state. If the bit is set then the tracking calibration is resumed and if not set then the tracking cal is suspended, the bit field follows: |
trackCals[bit] | Bit description |
---|---|
[0] | TRACK_RX1_QEC |
[1] | TRACK_RX2_QEC |
[2] | TRACK_ORX1_QEC |
[3] | TRACK_ORX2_QEC |
[4] | TRACK_TX1_LOL |
[5] | TRACK_TX2_LOL |
[6] | TRACK_TX1_QEC |
[7] | TRACK_TX2_QEC |
[8] | TRACK_TX1_DPD |
[9] | TRACK_TX2_DPD |
[10] | TRACK_TX1_CLGC |
[11] | TRACK_TX2_CLGC |
[12] | TRACK_TX1_VSWR |
[13] | TRACK_TX2_VSWR |
MYKONOS_ERR_GETSTATEALL_TRACK_NULL_PARAM | Null parameter passed for trackCals |
MYKONOS_ERR_GETSTATEALL_TRACK_ARMERRFLAG | ARM error flag set. |
MYKONOS_ERR_GETSTATEALL_TRACK_ARMERROR | ARM command error. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getApiVersion | ( | mykonosDevice_t * | device, |
uint32_t * | siVer, | ||
uint32_t * | majorVer, | ||
uint32_t * | minorVer, | ||
uint32_t * | buildVer | ||
) |
Get API version number.
This function reads back the version number of the API
device | Pointer to the Mykonos data structure |
siVer | A pointer to the current silicon version number. |
majorVer | A pointer to the current major version number. |
minorVer | A pointer to the current minor version number. |
buildVer | A pointer to the current build version number. |
MYKONOS_ERR_GET_API_VERSION_NULL_PARAM | Null parameter passed to the function. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getArmVersion | ( | mykonosDevice_t * | device, |
uint8_t * | majorVer, | ||
uint8_t * | minorVer, | ||
uint8_t * | rcVer, | ||
mykonosBuild_t * | buildType | ||
) |
Reads back the version of the ARM binary loaded into the Mykonos ARM memory.
This function reads the ARM memory to read back the major.minor.releaseCandidate version for the ARM binary loaded into ARM memory.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
majorVer | The Major version is returned in this parameter |
minorVer | The Minor version is returned in this parameter |
rcVer | The release candidate version (build number) is returned in this parameter |
buildType | The Type of the build [Debug / Test_Object / Release] |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GETARMVER_NULL_PARM | One of the function parameters has a NULL pointer |
mykonosErr_t MYKONOS_getClgcAttenTuningConfig | ( | mykonosDevice_t * | device, |
mykonosClgcAttenTuningConfig_t * | attRangeCfg | ||
) |
Get configuration for CLGC Tx attenuation tuning range.
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
attRangeCfg | Pointer to structure of type mykonosClgcAttenTuningConfig_t which will contain the programmed settings |
MYKONOS_ERR_CLGCATTENTUNCFGGET_NULL_ATTRANGECFGSTRUCT | passed structure is null |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getClgcConfig | ( | mykonosDevice_t * | device | ) |
mykonosErr_t MYKONOS_getClgcStatus | ( | mykonosDevice_t * | device, |
mykonosTxChannels_t | txChannel, | ||
mykonosClgcStatus_t * | clgcStatus | ||
) |
This function reads the CLGC calibration status from the Mykonos ARM processor.
The Closed Loop Gain Control Status is read back from the ARM processor and returned in the function parameter clgcStatus.
A DPD-enabled transceiver is required for this feature to be enabled.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
txChannel | Desired Transmit channel to read back CLGC status for (Valid ENUM values: TX1 or TX2 only) |
clgcStatus | Pointer to a structure to return the status information to |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GETCLGCSTATUS_NULLPARAM | clgcStatus function parameter is a NULL pointer |
MYKONOS_ERR_GETCLGCSTATUS_INV_CH | txChannel parameter is a non supported value. |
MYKONOS_ERR_GETCLGCSTATUS_ARMERRFLAG | ARM reported an error while processing the GET ARM command |
mykonosErr_t MYKONOS_getDacPower | ( | mykonosDevice_t * | device, |
mykonosTxChannels_t | channel, | ||
uint16_t * | channelPower | ||
) |
Obtains an estimate of a TX channel's accumulated power over the sample duration provided in MYKONOS_setupPaProtection(...)
This function uses the 'avgDuration' parameter provided in MYKONOS_setupPaProtection to set the number of samples to accumulate to obtain an estimate for a TX channel specified by the 'channel' parameter. A 12-bit field estimating the channel power is returned in the '*channelPower' pointer. To obtain the dBFS value of the reading: dBFS value = 10*log10(channelPower/MAX_DAC_CODE) where MAX_DAC_CODE = 2^12 = 4096 For example: If channelPower is reading 409 then the channel power in dBFS is -10dBFS.
Dependencies
device | Point to the Mykonos device's data structure |
channel | Select the channel of interest. Only use TX1 (1) or TX2 (2) of mykonosTxChannels_t |
*channelPower | A pointer that stores the selected channels power. Read back is provided as a 12 bit value. |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GET_DAC_PWR_INV_POINTER | Function channelPower parameter is a NULL pointer |
MYKONOS_ERR_SETUP_PA_PROT_INV_TX_CHANNEL | Invalid Tx Channel passed in function channel parameter (TX1 or TX2) |
mykonosErr_t MYKONOS_getDeframerFifoDepth | ( | mykonosDevice_t * | device, |
uint8_t * | fifoDepth, | ||
uint8_t * | readEnLmfcCount | ||
) |
Reads the Mykonos JESD204b Deframer determinstic FIFO depth.
To verify that the deterministic latency FIFO is not close to a underflow or overflow condition, it is recommended to check the FIFO depth. If the FIFO is close to an overflow or underflow condition, it is possible that from power up to powerup, deterministic latency may not be met. If a underflow or overflow occurred, the data would still be correct, but would possibly slip by 1 multiframe (losing deterministic latency). To correct for an overflow/underflow, the BBIC would need to add delay from SYSREF until the first symbol in a multiframe
Dependencies
device | is a pointer to the device settings structure |
fifoDepth | Return value that describes the depth of the Mykonos deterministic latency deframer FIFO. |
readEnLmfcCount | Returns the LMFC count value when the deterministic FIFO read enable was asserted. Counts at the Mykonos internal deframer PCLK frequency. |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_READ_DEFFIFODEPTH_NULL_PARAM | Error: function parameter fifoDepth is a NULL pointer |
MYKONOS_ERR_READ_DEFFIFODEPTH_LMFCCOUNT_NULL_PARAM | Error: function parameter readEnLmfcCount is a NULL pointer |
mykonosErr_t MYKONOS_getDeviceRev | ( | mykonosDevice_t * | device, |
uint8_t * | revision | ||
) |
Reads back the silicon revision for the Mykonos Device.
Dependencies
device | Pointer to Mykonos device data structure containing settings |
revision | Return value of the Mykonos silicon revision |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getDigDcOffsetEn | ( | mykonosDevice_t * | device, |
uint8_t * | enableMask | ||
) |
reads Enable/ Disable channels Digital DC Offset and returns a mask of it. The mask returned will be a combination of the following channel values ( mykonosRxDcOffsettEn_t ).
Channel | Value | Channel description |
---|---|---|
MYK_DC_OFFSET_ALL_OFF | 0x00 | All channels are disabled |
MYK_DC_OFFSET_RX1 | 0x01 | Rx1 is enabled |
MYK_DC_OFFSET_RX2 | 0x02 | Rx2 is enabled |
MYK_DC_OFFSET_SNF | 0x04 | Sniffer is enabled |
MYK_DC_OFFSET_ORX | 0x08 | ORx is enabled |
MYK_DC_OFFSET_AVAILABLE | 0x0F | All channels are enabled |
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
enableMask | pointer to the variable to store Enable mask of channels |
MYKONOS_ERR_DIG_DC_OFFSET_NULL_ENABLE_MASK | enableMask is NULL |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getDigDcOffsetMShift | ( | mykonosDevice_t * | device, |
mykonosDcOffsetChannels_t | channel, | ||
uint8_t * | mShift | ||
) |
retrieves the M-Shift value which is the Corner frequency of Rx notch filter for the given channel. channel can be one of the following ( mykonosDcOffsetChannels_t ).
Channel | Channel description |
---|---|
MYK_DC_OFFSET_RX_CHN | Selects Rx channel |
MYK_DC_OFFSET_ORX_CHN | Selects ORx channel |
MYK_DC_OFFSET_SNF_CHN | Selects Sniffer channel |
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
channel | receive channel to be selected. |
mShift | Pointer to the variable to store mshift value of the given channel |
MYKONOS_ERR_DC_OFFSET_INV_CHAN | channel passed to the function is invalid, refer mykonosDcOffsetChannels_t enum for valid channels. |
MYKONOS_ERR_GET_DIG_DC_OFFSET_NULL_MSHIFT | mShift pointer is NULL |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getDpdActuatorCheck | ( | mykonosDevice_t * | device, |
mykonosDpdActuatorCheck_t * | actCheck | ||
) |
Get configuration for DPD actuator check.
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
actCheck | Pointer to structure of type mykonosDpdActuatorCheck_t which will contain the programmed settings |
MYKONOS_ERR_GETDPDACTCHECK_NULL_ACTSTRUCT | passed structure is null |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getDpdBypassConfig | ( | mykonosDevice_t * | device, |
mykonosDpdBypassConfig_t * | actConfig | ||
) |
Get configuration for bypassing DPD actuator.
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
actConfig | actuator structure of type mykonosDpdBypassConfig_t |
MYKONOS_ERR_GETDPDACT_NULL_ACTSTRUCT | passed structure is null |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getDpdConfig | ( | mykonosDevice_t * | device | ) |
mykonosErr_t MYKONOS_getDpdErrorCounters | ( | mykonosDevice_t * | device, |
mykonosTxChannels_t | txChannel, | ||
mykonosDpdErrorCounters_t * | dpdErrCnt | ||
) |
This function reads the current error counters for all the DPD error codes from mykonosDpdErrors_t.
A DPD-enabled transceiver is required
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
txChannel | Tx channel selection from mykonosTxChannels_t |
dpdErrCnt | pointer to structure of type mykonosDpdErrorCounters_t to store the read back error counters |
MYKONOS_ERR_GETDPD_ERROR_CNT_NULLPARAM | dpdErrCnt is null |
MYKONOS_ERR_GETDPD_ERROR_CNT_INV_CH | invalid selection for getting the error counters tx channel, only valid values are Tx1 and Tx2 |
MYKONOS_ERR_GETDPD_ERROR_CNT_ARMERRFLAG | Arm error while reading the error counters for the DPD status |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getDpdStatus | ( | mykonosDevice_t * | device, |
mykonosTxChannels_t | txChannel, | ||
mykonosDpdStatus_t * | dpdStatus | ||
) |
This function reads the DPD calibration status from the Mykonos ARM processor.
The dpdStatus is read back from the ARM processor and returned in the function parameter dpdStatus.
A DPD-enabled transceiver is required for this feature to be enabled.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
txChannel | Desired Transmit channel to read back DPD status for (Valid ENUM values: TX1 or TX2 only) |
dpdStatus | Pointer to a structure to return the status information to |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GETDPDSTATUS_NULLPARAM | dpdStatus function parameter is a NULL pointer |
MYKONOS_ERR_GETDPDSTATUS_INV_CH | txChannel parameter is a non-supported value. |
MYKONOS_ERR_GETDPDSTATUS_ARMERRFLAG | ARM reported an error while processing the GET ARM command |
mykonosErr_t MYKONOS_getEnabledTrackingCals | ( | mykonosDevice_t * | device, |
uint32_t * | enableMask | ||
) |
Reads back which ARM tracking cals are enabled.
enableMask | Bit description |
---|---|
[0] | TRACK_RX1_QEC |
[1] | TRACK_RX2_QEC |
[2] | TRACK_ORX1_QEC |
[3] | TRACK_ORX2_QEC |
[4] | TRACK_TX1_LOL |
[5] | TRACK_TX2_LOL |
[6] | TRACK_TX1_QEC |
[7] | TRACK_TX2_QEC |
[8] | TRACK_TX1_DPD |
[9] | TRACK_TX2_DPD |
[10] | TRACK_TX1_CLGC |
[11] | TRACK_TX2_CLGC |
[12] | TRACK_TX1_VSWR |
[13] | TRACK_TX2_VSWR |
[16] | TRACK_ORX1_QEC_SNLO |
[17] | TRACK_ORX1_QEC_SNLO |
[18] | TRACK_SRX_QEC |
Dependencies
device | Pointer to the device settings structure |
enableMask | Returned bitmask that shows which tracking cals are enabled to run during radioOn state. See mykonosTrackingCalibrations_t enum of tracking cals. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getInitCalStatus | ( | mykonosDevice_t * | device, |
mykonosInitCalStatus_t * | initCalStatus | ||
) |
Gets the device initialization calibration status.
This function requests the init cal status information from the Mykonos ARM processor. The ARM returns information including a bitmask that describes which calibrations have completed during the last cal of runInitCals, as well as the init cals that have run successfully since loading the ARM. If an ARM error does occur during one of the init calibrations, the initErrCal member returns the object ID of the failing calibration. The initErrCode returns the specific ARM error code that caused that calibration to fail. The calsMinimum structure member describes the minimum set of init calibrations required to complete by the ARM before it will allow the device to move to the radioOn state.
Dependencies
device | A pointer to the device settings structure |
initCalStatus | Pointer to a structure that returns cal status information such as cals completed since last run, and init error codes |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GETINITCALSTATUS_NULL_PARAM | if initCalStatus parameter is a NULL pointer |
MYKONOS_ERR_GETINITCALSTATUS_ARMERROR | if ARM returned an error while requesting the init cal status information |
mykonosErr_t MYKONOS_getObsRxDecPower | ( | mykonosDevice_t * | device, |
uint16_t * | obsRxDecPower_mdBFS | ||
) |
Performs a power measurement in the ObsRx digital data path.
Due to interdependencies between the AGC and power measurement the power measurement duration and where the measurement is taken is variable. The location of the power measurement is given by device->obsRx->obsRxAgcCtrl->obsRxPwrAgc->pmdMeasConfig The number of samples the power measurement uses is given by 8*2^(device->obsRx->obsRxAgcCtrl->obsRxPwrAgc->pmdMeasConfig) at the IQ rate, if measured at RFIR output. This number of samples must be less than the agcGainUpdateCounter. If the receiver is disabled during the power measurement, this function returns a 0 value for rx2DecPower_mdBFS
The resolution of this function is 0.25dB. The dynamic range of this function is 40dB. Signals lower than 40dBFS may not be measured accurately.
Dependencies
device | Pointer to the Mykonos data structure |
obsRxDecPower_mdBFS | Pointer to store the Rx1 decimated power return. Value returned in mdBFS |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getObsRxGain | ( | mykonosDevice_t * | device, |
uint8_t * | gainIndex | ||
) |
Gets the gain index of the currently enabled ObsRx channel.
The ObsRx data path can have multiple RF sources. This function will read back the gain index of the currently enabled RF source. If the ObsRx data path is disabled, an error is returned. If the functions uint8_t *gainIndex parameter is a valid pointer, the gain index is returned at the pointers address. Else, if the uint8_t *gainIndex pointer is NULL, the gainIndex read back is stored in the device data structure.
NOTE: if the observation source is chosen by ORX_MODE pins, it is possible that the readback value will be incorrect if the obsRx channel changes while this function reads the gain.
Dependencies
device | Pointer to the Mykonos device data structure |
gainIndex | Return value of the current gain index for the currently enabled ObsRx channel. |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GETORX1GAIN_INV_POINTER | The ObsRx profile is not valid in the device data structure |
MYKONOS_ERR_GETORX2GAIN_INV_POINTER | The ObsRx profile is not valid in the device data structure |
MYKONOS_ERR_GETSNIFFGAIN_INV_POINTER | The sniffer profile is not valid in the device data structure |
MYKONOS_ERR_GETOBSRXGAIN_CH_DISABLED | The observation receiver is currently disabled, can not read back gain index. |
mykonosErr_t MYKONOS_getObsRxPathSource | ( | mykonosDevice_t * | device, |
mykonosObsRxChannels_t * | obsRxCh | ||
) |
Reads back the currently enabled Observation Rx channel in the radioOn state.
In pin mode, the pin could change asynchronous to reading back the current enable ObsRx path. Calling this function while in radioOff will return OBS_RXOFF since all radio channels are powered down.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
obsRxCh | Parameter to return enum of the current observation receive path powered up |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_PU_GETOBSRXPATH_ARMERROR | ARM returned an error while trying to get the ObsRx Path source |
mykonosErr_t MYKONOS_getObsRxTempGainComp | ( | mykonosDevice_t * | device, |
int16_t * | obsRxTempCompGain_mdB | ||
) |
This function gets the Temperature gain compensation for the observation channel.
Dependencies:
device | is structure pointer to the Mykonos data structure containing the device SPI settings |
obsRxTempCompGain_mdB | Which will be populated with the Temperature Gain Compensation in mdB value for the observation channel. |
MYKONOS_ERR_OBS_RX_TEMP_GAIN_COMP_NULL | obsRxTempCompGain_mdB pointer is null. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getOrxQecStatus | ( | mykonosDevice_t * | device, |
mykonosObsRxChannels_t | orxChannel, | ||
mykonosOrxQecStatus_t * | orxQecStatus | ||
) |
Returns the status of the ORxQEC tracking calibration.
The ORx QEC tracking calibration is run during the radioOn state. The function can be called to read back the status of the ORxQEC external calibration including metrics like error codes, percentage of data collected for current cal, the performance of the cal and the number of times the cal has run and updated the hardware.
device | Pointer to the device settings structure |
orxChannel | The channel whose status is to be read back |
orxQecStatus | Status of the ORxQEC external calibration, as a structure of type mykonosOrxQecStatus_t is returned to this pointer address |
MYKONOS_ERR_GETORXQECSTATUS_NULLPARAM | Function parameter orxQecStatus is a NULL pointer |
MYKONOS_ERR_GETORXQECSTATUS_INV_CH | Channel selection not valid |
MYKONOS_ERR_GETORXQECSTATUS_ARMERRFLAG | ARM command error |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getPaProtectErrorFlagStatus | ( | mykonosDevice_t * | device, |
uint8_t * | errorFlagStatus | ||
) |
Returns PA Protection Error Flag Status.
This function provides a readback of the PA protection Error Flag Status through the '*errorFlagStatus' pointer
Dependencies
device | Point to the Mykonos device's data structure | ||||||||||
errorFlagStatus | Pointer to store the error flag status.
|
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GET_PA_FLAG_STATUS_INV_POINTER | Function errorFlagStatus parameter has NULL pointer |
mykonosErr_t MYKONOS_getPathDelay | ( | mykonosDevice_t * | device, |
mykonosPathDelaySel_t | select, | ||
mykonosPathdelay_t * | pathDelay | ||
) |
This function will read the current path delay settings for the selected calibration.
A DPD-enabled transceiver is required
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
select | path delay status selection from mykonosPathDelaySel_t |
pathDelay | pointer to structure of type mykonosPathdelay_t to store the read back path delay |
MYKONOS_ERR_GET_PATH_DELAY_NULL_PARAM | pathDelay is null |
MYKONOS_ERR_GET_PATH_DELAY_INVALID_SELECTION | invalid selection for getting the path delay, valid selections are given by mykonosPathDelaySel_t |
MYKONOS_ERR_GET_PATH_DELAY_ARMERRFLAG | Arm error while reading path delay for the selected calibration status |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getPendingTrackingCals | ( | mykonosDevice_t * | device, |
uint32_t * | pendingCalMask | ||
) |
Returns the tracking calibration pending and error status.
When in radioOn state, the enabled tracking calibrations will set the pending flag when the particular calibration is ready to be run, but has not completed yet. For Tx tracking cals to complete, the BBIC must set the ObsRx path to the INTERNAL CALS mode. If a tracking calibration had an error, the corresponding error flag will be asserted.
pendingCalMask | bit Description |
---|---|
[0] | Rx1 QEC tracking pending |
[1] | Rx1 QEC tracking error |
[2] | Rx2 QEC tracking pending |
[3] | Rx2 QEC tracking error |
[4] | ORx1 QEC tracking pending |
[5] | ORx1 QEC tracking error |
[6] | ORx2 QEC tracking pending |
[7] | ORx2 QEC tracking error |
[8] | Tx1 LOL tracking pending |
[9] | Tx1 LOL tracking error |
[10] | Tx2 LOL tracking pending |
[11] | Tx2 LOL tracking error |
[12] | Tx1 QEC tracking pending |
[13] | Tx1 QEC tracking error |
[14] | Tx2 QEC tracking pending |
[15] | Tx2 QEC tracking error |
[16] | Tx1 DPD tracking pending |
[17] | Tx1 DPD tracking error |
[18] | Tx2 DPD tracking pending |
[19] | Tx2 DPD tracking error |
[20] | Tx1 CLGC tracking pending |
[21] | Tx1 CLGC tracking error |
[22] | Tx2 CLGC tracking pending |
[23] | Tx2 CLGC tracking error |
[24] | Tx1 VSWR tracking pending |
[25] | Tx1 VSWR tracking error |
[26] | Tx2 VSWR tracking pending |
[27] | Tx2 VSWR tracking error |
Dependencies
device | Pointer to the device settings structure |
pendingCalMask | Bit mask that describes which tracking cals are pending or had errors |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GETPENDTRKCALS_NULL_PARAM | Function parameter pendingCalMask is a NULL pointer |
mykonosErr_t MYKONOS_getProductId | ( | mykonosDevice_t * | device, |
uint8_t * | productId | ||
) |
Reads back the Product ID for the Mykonos Device.
Dependencies
device | Pointer to Mykonos device data structure containing settings |
productId | Return value of the Mykonos product Id |
MYKONOS_ERR_GETPRODUCTID__NULL_PARAM | recovery action for bad parameter check |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getRadioState | ( | mykonosDevice_t * | device, |
uint32_t * | radioStatus | ||
) |
Reads the current ARM radio state.
Currently, *radioStatus only returns data in the lower 8 bits, but is defined as a 32bit status to allow for more information to be returned in the future.
radioStatus | Bitfield |
---|---|
[1:0] | State[1:0], 0=POWERUP, 1=READY, 2=INIT, 3=RADIO ON |
[3:2] | unused |
[4] | TDD_nFDD , 1= TDD, 0=FDD |
[7:5] | unused |
Dependencies
device | Pointer to the device settings structure |
radioStatus | The current ARM radio state is returned in this parameter |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GETRADIOSTATE_NULL_PARAM | Function parameter radioStatus has a NULL pointer |
mykonosErr_t MYKONOS_getRfDcOffsetCnt | ( | mykonosDevice_t * | device, |
mykonosDcOffsetChannels_t | channel, | ||
uint16_t * | measureCount | ||
) |
retrieves the measure count which is the number of samples taken before DC offset correction is applied for the given Rf channel. channel can be one of the following ( mykonosDcOffsetChannels_t ).
Channel | Channel description |
---|---|
MYK_DC_OFFSET_RX_CHN | Selects Rx channel |
MYK_DC_OFFSET_ORX_CHN | Selects ORx channel |
MYK_DC_OFFSET_SNF_CHN | Selects Sniffer channel |
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
channel | receive channel to be selected. |
measureCount | pointer to the variable to store the read value. |
MYKONOS_ERR_DC_OFFSET_INV_CHAN | channel passed to the function is invalid, refer mykonosDcOffsetChannels_t enum for valid channels. |
MYKONOS_ERR_SET_RF_DC_OFFSET_NULL_MEASURECNT | passed pointer of measureCount is NULL |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getRfPllFrequency | ( | mykonosDevice_t * | device, |
mykonosRfPllName_t | pllName, | ||
uint64_t * | rfPllLoFrequency_Hz | ||
) |
Gets the RF PLL local oscillator frequency (RF carrier frequency).
This function is used to get the RF PLL's frequency. It can get the RX PLL, TX PLL Sniffer PLL, and CLKPLL.
Dependencies
device | is structure pointer to the MYKONOS data structure containing settings |
pllName | Name of the PLL for which to read the frequency |
rfPllLoFrequency_Hz | RF LO frequency currently set for the PLL specified |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GET_PLLFREQ_INV_REFCLKDIV | Invalid CLKPLL reference clock divider read from Mykonos device |
MYKONOS_ERR_GET_PLLFREQ_INV_HSDIV | Invalid CLKPLL high speed clock divider read from Mykonos device |
MYKONOS_ERR_GETRFPLL_INV_PLLNAME | Invalid PLL name, can not get PLL frequency. Use PLL name ENUM. |
MYKONOS_ERR_GETRFPLL_ARMERROR | ARM Command to get RF PLL frequency failed |
MYKONOS_ERR_GETRFPLL_NULLPARAM | rfPllLoFrequency_Hz function parameter pointer is NULL |
mykonosErr_t MYKONOS_getRfPllLoopFilter | ( | mykonosDevice_t * | device, |
mykonosRfPllName_t | pllName, | ||
uint16_t * | loopBandwidth_kHz, | ||
uint8_t * | stability | ||
) |
Gets the RF PLL loop filter bandwidth and stability.
This function is used to get the RF PLL loop bandwidth. It can get the RX PLL, TX PLL Sniffer PLL.
Dependencies
device | is structure pointer to the MYKONOS data structure containing settings |
pllName | Name of the PLL for which to read the frequency |
loopBandwidth_kHz | RF PLL loop bandwidth for the PLL specified |
stability | RF PLL loop stability |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GETRFPLL_LF_INV_PLLNAME | Invalid PLL name, can not get PLL frequency. Use PLL name ENUM. |
MYKONOS_ERR_GETRFPLL_LF_ARMERROR | ARM Command to get RF PLL frequency failed |
MYKONOS_ERR_GETRFPLL_LF_NULLPARAM | input parameter is NULL |
mykonosErr_t MYKONOS_getRx1DecPower | ( | mykonosDevice_t * | device, |
uint16_t * | rx1DecPower_mdBFS | ||
) |
Performs a power measurement in the Rx1 digital data path.
Due to interdependencies between the AGC and power measurement the power measurement duration and where the measurement is taken is variable. The location of the power measurement is given by device->rx->rxAgcCtrl->rxPwrAgc->pmdMeasConfig The number of samples the power measurement uses is given by 8*2^(device->rx->rxAgcCtrl->rxPwrAgc->pmdMeasDuration) at the IQ rate, if measured at RFIR output. This number of samples must be less than the agcGainUpdateCounter. If the receiver is disabled during the power measurement, this function returns a 0 value for rx1DecPower_mdBFS
The resolution of this function is 0.25dB. The dynamic range of this function is 40dB. Signals lower than 40dBFS may not be measured accurately.
Dependencies
device | Pointer to the Mykonos data structure |
rx1DecPower_mdBFS | Pointer to store the Rx1 decimated power return. Value returned in mdBFS |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getRx1Gain | ( | mykonosDevice_t * | device, |
uint8_t * | rx1GainIndex | ||
) |
Reads the Rx1 Gain Index for Manual or AGC gain control mode.
This function reads the Rx1 gain index for manual or AGC modes. If the *rx1GainIndex pointer is nonzero, the read back gain index will be returned in the parameter. If the *rx1GainIndex pointer is NULL, the device data structure will be updated with the new read back value
Dependencies
device | Pointer to the Mykonos data structure |
rx1GainIndex | uint8_t Pointer to the Rx1 gain index value |
mykonosErr_t MYKONOS_getRx1TempGainComp | ( | mykonosDevice_t * | device, |
int16_t * | rx1TempCompGain_mdB | ||
) |
This function gets the Temperature gain compensation for Rx1.
Dependencies:
device | is structure pointer to the Mykonos data structure containing the device SPI settings |
rx1TempCompGain_mdB | Which will be populated with the Temperature Gain Compensation in mdB value for Rx1 channel. |
MYKONOS_ERR_RX1_TEMP_GAIN_COMP_NULL | rx1TempCompGain_mdB pointer is null. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getRx2DecPower | ( | mykonosDevice_t * | device, |
uint16_t * | rx2DecPower_mdBFS | ||
) |
Performs a power measurement in the Rx2 digital data path.
Due to interdependencies between the AGC and power measurement the power measurement duration and where the measurement is taken is variable. The location of the power measurement is given by device->rx->rxAgcCtrl->rxPwrAgc->pmdMeasConfig The number of samples the power measurement uses is given by 8*2^(device->rx->rxAgcCtrl->rxPwrAgc->pmdMeasDuration) at the IQ rate, if measured at RFIR output. This number of samples must be less than the agcGainUpdateCounter. If the receiver is disabled during the power measurement, this function returns a 0 value for rx2DecPower_mdBFS
The resolution of this function is 0.25dB. The dynamic range of this function is 40dB. Signals lower than 40dBFS may not be measured accurately.
Dependencies
device | Pointer to the Mykonos data structure |
rx2DecPower_mdBFS | Pointer to store the Rx1 decimated power return. Value returned in mdBFS |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getRx2Gain | ( | mykonosDevice_t * | device, |
uint8_t * | rx2GainIndex | ||
) |
Reads the Rx2 Gain Index for Manual or AGC gain control mode.
This function reads the Rx2 gain index for manual or AGC modes. If the *rx1GainIndex pointer is nonzero, the read back gain index will be returned in the parameter. If the *rx1GainIndex pointer is NULL, the device data structure will be updated with the new read back value
Dependencies
device | Pointer to the Mykonos data structure |
rx2GainIndex | Desired Rx2 gain index |
mykonosErr_t MYKONOS_getRx2TempGainComp | ( | mykonosDevice_t * | device, |
int16_t * | rx2TempCompGain_mdB | ||
) |
This function gets the Temperature gain compensation for Rx2.
Dependencies:
device | is structure pointer to the Mykonos data structure containing the device SPI settings |
rx2TempCompGain_mdB | Which will be populated with the Temperature Gain Compensation in mdB value for Rx2 channel. |
MYKONOS_ERR_RX2_TEMP_GAIN_COMP_NULL | rx2TempCompGain_mdB pointer is null. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getRxQecStatus | ( | mykonosDevice_t * | device, |
mykonosRxChannels_t | rxChannel, | ||
mykonosRxQecStatus_t * | rxQecStatus | ||
) |
Returns the status of the RxQEC tracking calibration.
The Rx QEC tracking calibration is run during the radioOn state. The function can be called to read back the status of the RxQEC external calibration including metrics like error codes, percentage of data collected for current cal, the performance of the cal and the number of times the cal has run and updated the hardware.
device | Pointer to the device settings structure |
rxChannel | The channel (Rx1/Rx2) whose status is to be read back |
rxQecStatus | Status of the RxQEC calibration, as a structure of type mykonosRxQecStatus_t is returned to this pointer address |
MYKONOS_ERR_GETRXQECSTATUS_NULLPARAM | Function parameter rxQecStatus is a NULL pointer |
MYKONOS_ERR_GETRXQECSTATUS_INV_CH | Channel selection not valid |
MYKONOS_ERR_GETRXQECSTATUS_ARMERRFLAG | ARM command error |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getTrackingCalState | ( | mykonosDevice_t * | device, |
mykonosTrackingCalibrations_t | trackingCal, | ||
uint8_t * | trackCalState | ||
) |
Get the Suspended or Resumed state for individual tracking calibration.
Dependencies
device | Pointer to the device settings structure |
trackingCal | Selects the tracking calibration to get the resumed or suspended state. |
trackCalState | pointer to store the tracking calibration state, if set then the selected tracking calibration is resumed and if not set then the tracking cal is suspended |
MYKONOS_ERR_GETSTATE_TRACK_NULL_PARAM | Null parameter passed to trackCalState |
MYKONOS_ERR_GETSTATE_TRACK_ARMERRFLAG | ARM command error flag set. |
MYKONOS_ERR_GETSTATE_TRACK_ARMERROR | ARM command error. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getTx1Attenuation | ( | mykonosDevice_t * | device, |
uint16_t * | tx1Attenuation_mdB | ||
) |
Reads back the Tx1 RF output Attenuation.
This function reads back the TxAttenuation setting currently applied to the transmit chain. The function will work with SPI mode or pin controlled TxAtten mode using the increment/decrement GPIO pins. For the readback value to be valid the Tx data path must be powered up. If the Tx data path is powered down or radioOff state, the last TxAtten setting while the Tx was powered up will be read back.
Dependencies
device | Pointer to the Mykonos device's data structure |
tx1Attenuation_mdB | The readback value of the Tx1 Attenuation in milli-dB (Range: 0 to 41950 mdB) |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GETTX1ATTEN_NULL_PARM | tx1Attenuation_mdB return parameter has NULL pointer |
mykonosErr_t MYKONOS_getTx2Attenuation | ( | mykonosDevice_t * | device, |
uint16_t * | tx2Attenuation_mdB | ||
) |
Reads back the Tx2 RF output Attenuation.
This function reads back the TxAttenuation setting currently applied to the transmit chain. The function will work with SPI mode or pin controlled TxAtten mode using the increment/decrement GPIO pins. For the readback value to be valid the Tx data path must be powered up. If the Tx data path is powered down or radioOff state, the last TxAtten setting while the Tx was powered up will be read back.
Dependencies
device | Pointer to the Mykonos device's data structure |
tx2Attenuation_mdB | The readback value of the Tx2 Attenuation in milli-dB (Range: 0 to 41950 mdB) |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GETTX2ATTEN_NULL_PARM | tx2Attenuation_mdB return parameter pointer is NULL |
mykonosErr_t MYKONOS_getTxFilterOverRangeStatus | ( | mykonosDevice_t * | device, |
uint8_t * | txFilterStatus | ||
) |
Checks the Tx Filter over-range bit assignments for digital clipping in the Tx data path.
Dependencies
txFilterStatus bit-field assignments are: txFilterStatus[0] = TFIR Ch1 Overflow txFilterStatus[1] = HB1 Ch1 Overflow txFilterStatus[2] = HB2 Ch1 Overflow txFilterStatus[3] = QEC Ch1 Overflow txFilterStatus[4] = TFIR Ch2 Overflow txFilterStatus[5] = HB1 Ch2 Overflow txFilterStatus[6] = HB2 Ch2 Overflow txFilterStatus[7] = QEC Ch2 Overflow
device | Pointer to the Mykonos device's data structure |
txFilterStatus | is an 8-bit Tx filter over-range status bit-field |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GET_TXFILTEROVRG_NULL_PARM | Function txFilterStatus parameter pointer is NULL |
mykonosErr_t MYKONOS_getTxLolStatus | ( | mykonosDevice_t * | device, |
mykonosTxChannels_t | txChannel, | ||
mykonosTxLolStatus_t * | txLolStatus | ||
) |
Returns the status of the TxLOL external tracking calibration.
The Tx LOL external tracking calibration is run during the radioOn state. The function can be called to read back the status of the TxLOL external calibration including metrics like error codes, percentage of data collected for current cal, the performance of the cal and the number of times the cal has run and updated the hardware.
device | Pointer to the device settings structure |
txChannel | The channel (Tx1/Tx2) whose status is to be read back |
txLolStatus | Status of the TxLOL external calibration, as a structure of type mykonosTxLolStatus_t is returned to this pointer address |
MYKONOS_ERR_GETTXLOLSTATUS_NULLPARAM | Function parameter mykonosTxLolStatus_t is a NULL pointer |
MYKONOS_ERR_GETTXLOLSTATUS_INV_CH | Channel selection not valid |
MYKONOS_ERR_GETTXLOLSTATUS_ARMERRFLAG | ARM command error |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getTxQecStatus | ( | mykonosDevice_t * | device, |
mykonosTxChannels_t | txChannel, | ||
mykonosTxQecStatus_t * | txQecStatus | ||
) |
Returns the status of the TxQEC tracking calibration.
The Tx QEC tracking calibration is run during the radioOn state. The function can be called to read back the status of the TxQEC calibration including metrics like error codes, percentage of data collected for current cal, the performance of the cal and the number of times the cal has run and updated the hardware.
device | Pointer to the device settings structure |
txChannel | The channel (Tx1/Tx2) whose status is to be read back |
txQecStatus | Status of the TxQEC external calibration, as a structure of type mykonosTxQecStatus_t is returned to this pointer address |
MYKONOS_ERR_GETTXQECSTATUS_NULLPARAM | Function parameter txQecStatus is a NULL pointer |
MYKONOS_ERR_GETTXQECSTATUS_INV_CH | Channel selection not valid |
MYKONOS_ERR_GETTXQECSTATUS_ARMERRFLAG | ARM command error |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_getVswrConfig | ( | mykonosDevice_t * | device | ) |
mykonosErr_t MYKONOS_getVswrStatus | ( | mykonosDevice_t * | device, |
mykonosTxChannels_t | txChannel, | ||
mykonosVswrStatus_t * | vswrStatus | ||
) |
This function reads the VSWR calibration status from the Mykonos ARM processor.
The VSWR Status is read back from the ARM processor and returned in the function parameter vswrStatus.
A DPD-enabled transceiver is required for this feature to be enabled.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
txChannel | Desired Transmit channel to read back VSWR status for (Valid ENUM values: TX1 or TX2 only) |
vswrStatus | Pointer to a structure to return the status information to |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_GETVSWRSTATUS_NULLPARAM | vswrStatus function parameter is a NULL pointer |
MYKONOS_ERR_GETVSWRSTATUS_INV_CH | txChannel parameter is a non supported value. |
MYKONOS_ERR_GETVSWRSTATUS_ARMERRFLAG | ARM reported an error while processing the GET ARM command |
mykonosErr_t MYKONOS_initArm | ( | mykonosDevice_t * | device | ) |
Resets the ARM processor and performs initialization.
Sets ARM Run = 0, Disables parity checks, sets ARM and SPI reg clock selects, resets ARM, and enables ARM SPI register access
Dependencies
device | Pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_INITARM_INV_VCODIV | |
MYKONOS_ERR_INITARM_INV_REGCLK | Could not calculate a valid ARM Register clock divider |
MYKONOS_ERR_INITARM_INV_ARMCLK_PARAM | Could not calculate a valid ARM clock divider |
mykonosErr_t MYKONOS_initDigitalClocks | ( | mykonosDevice_t * | device | ) |
Sets the CLKPLL output frequency.
This code updates the Synth and Loop filter settings based on a VCO frequency LUT. The VCO frequency break points for the Synth LUT can be found in an array called vcoFreqArrayMhz.
Dependencies
device | is structure pointer to the MYKONOS data structure containing settings |
mykonosErr_t MYKONOS_initialize | ( | mykonosDevice_t * | device | ) |
Initializes the Mykonos device based on the desired device settings.
This function initializes the mykonos device, setting up the CLKPLL, digital clocks, JESD204b settings, FIR Filters, digital filtering. It does not load the ARM or perform any of the ARM init calibrations. It also sets the Rx Manual gain indexes and TxAttenuation settings to the initial values found in the device data structure. It leaves the Mykonos in a state ready for multichip sync (which can bring up the JESD204 links), the ARM to be loaded, and the init calibartions run.
Dependencies
device | Pointer to Mykonos device data structure containing settings |
mykonosErr_t MYKONOS_initSubRegisterTables | ( | mykonosDevice_t * | device | ) |
Write indirect registers (Programmable FIRs, Rx gain tables, JESD204B settings). Must be done after Multi Chip Sync.
The BBP should never need to call this function. It is called automatically by the initArm function. This function is a continuation of the MYKONOS_initialize() function. This part of initialization must be done after the BBP has completed Multi chip Sync. These registers include FIR filters, Rx gain tables, and JESD204B framer/deframer config registers.
Dependencies
device | Pointer to the Mykonos device data structure containing settings an error. |
mykonosErr_t MYKONOS_jesd204bIlasCheck | ( | mykonosDevice_t * | device, |
uint16_t * | mismatch | ||
) |
Reads the lane 0 JESD204B deframer configuration and compares it against the ILAS received values.
Dependencies
device | is a pointer to the device settings structure |
mismatch | [15-0] is a bit-encoded word which for mismatch[15] = '0' = no mismatch, '1' = mismatch for one or more parameters mismatch bits [14-0] are aligned with the mykonosJesd204bLane0Config_t structure members starting at '0' = DID. The aligned bit is set to '1' if the configuration parameter does not agree with its corresponding received ILAS value, otherwise '0' if they agree. |
The bit assignments for the 16-bit word are:
mismatch | bit description |
---|---|
[0] | JESD204B DID: device ID |
[1] | JESD204B BID: bank ID |
[2] | JESD204B LID0: lane ID |
[3] | JESD204B L: lanes per data converter |
[4] | JESD204B SCR: scramble setting |
[5] | JESD204B F: octets per frame |
[6] | JESD204B K: frames per multiframe |
[7] | JESD204B M: number of data converters |
[8] | JESD204B N: data converter sample resolution |
[9] | JESD204B CS: number of control bits transferred per sample per frame |
[10] | JESD204B NP: JESD204B word size based on the highest data converter resolution |
[11] | JESD204B S: number of samples per converter per frame |
[12] | JESD204B CF: '0' = control bits appended to each sample, '1' = control bits appended to end of frame |
[13] | JESD204B HD: high density bit, where '0' = samples are contained with single lane, '1' = samples are divided over more than one lane |
[14] | JESD204B FCHK0: configuration checksum OK bit. where '1' = fail, '0' = pass |
[15] | MISMATCH DETECTED BIT: bits 0-14 are ored together to set this bit |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_JESD204B_ILAS_MISMATCH_NULLPARAM | Function parameter mismatch has NULL pointer |
mykonosErr_t MYKONOS_loadAdcProfiles | ( | mykonosDevice_t * | device | ) |
Function called automatically that loads the ADC profiles into the ARM.
User should not need to call this function normally. It is called automatically during MYKONOS_initArm() to load the ADC profiles (tunes the ADC performance).
Rx ADC profile is only loaded if the Rx Profile is valid, ORx ADC profile is only loaded if the ORx Profile is valid. Sniffer ADC profile is only loaded if the Sniffer profile is valid. The Loopback ADC profile is always loaded. If Tx profile is valid, the loopback ADC profile is chosen based on the Tx Primary Signal bandwidth. If no valid Tx Profile, the Rx profile is used to set the Loopback ADC profile. Else, ORx, then sniffer profiles are used to set the loopback ADC profile.
Dependencies
device | Pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_LOAD_ADCPROFILE_INV_VCODIV | Mykonos CLKPLL has invalid VCO divider in the clocks structure |
MYKONOS_ERR_LOAD_ADCPROFILE_MISSING_ORX_PROFILE | When Tx Profile used, a matching ORx Profile must be provided with a valid ADC divider. The ORx digital filters and clock dividers are used with the Loopback Rx path for Tx calibrations. |
MYKONOS_ERR_LOAD_ADCPROFILE_CUSTOM_RXREQUIRED | ADC Profile Lookup table does not have a match for current Rx Profile settings. Custom ADC profile required |
MYKONOS_ERR_LOAD_ADCPROFILE_CUSTOM_ORXREQUIRED | ADC Profile Lookup table does not have a match for current ORx Profile settings. Custom ADC profile required |
MYKONOS_ERR_LOAD_ADCPROFILE_CUSTOM_SNRXREQUIRED | ADC Profile Lookup table does not have a match for current Sniffer Rx Profile settings. Custom ADC profile required |
MYKONOS_ERR_LOAD_ADCPROFILE_CUSTOM_LBREQUIRED | ADC Profile Lookup table does not have a match for Loopback passband BW and ADC Clock frequency settings. Custom ADC profile required |
MYKONOS_ERR_LOAD_ADCPROFILE_RXADCDIV_ZERO | Rx Profile has invalid ADC divider = 0, causing a divide by zero error |
MYKONOS_ERR_LOAD_ADCPROFILE_ORXADCDIV_ZERO | ORx profile has invalid ADC divider = 0, causing a divide by zero error |
MYKONOS_ERR_LOAD_ADCPROFILE_SNRX_ADCDIV_ZERO | Sniffer profile has invalid ADC divider = 0, causing a divide by zero error |
MYKONOS_ERR_LOAD_RXADCPROFILE_ARMMEM_FAILED | Error returned while trying to write Rx ADC profile to ARM memory |
MYKONOS_ERR_LOAD_ORXADCPROFILE_ARMMEM_FAILED | Error returned while trying to write ORx ADC profile to ARM memory |
MYKONOS_ERR_LOAD_SNRXADCPROFILE_ARMMEM_FAILED | Error returned while trying to write Sniffer ADC profile into ARM memory |
MYKONOS_ERR_LOAD_LBADCPROFILE_ARMMEM_FAILED | Error returned while trying to write Loopback ADC profile into ARM memory |
mykonosErr_t MYKONOS_loadArmConcurrent | ( | mykonosDevice_t * | device, |
uint8_t * | binary, | ||
uint32_t | count | ||
) |
Loads binary byte array into ARM program memory. This API function allows user to load the ARM concurrently. This is specially to reduce the system initialization time.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
binary | is a byte array containing ARM program memory data bytes (directly from .bin file) |
count | is the number of bytes in the byte array |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_LOADARMCON_NULL_PARAM | Function parameter binary has a NULL pointer |
MYKONOS_ERR_LOADARMCON_INVALID_BYTECOUNT | Count parameter must be 98304 bytes |
MYKONOS_ERR_ARM_INV_ADDR_PARM | Invalid memory address |
mykonosErr_t MYKONOS_loadArmFromBinary | ( | mykonosDevice_t * | device, |
uint8_t * | binary, | ||
uint32_t | count | ||
) |
Loads binary byte array into ARM program memory.
This function assumes the ARM auto increment bit is set in 0x0D00[2]. Valid memory addresses are: Program Memory (0x01000000 - 0x01017FFF)
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
binary | is a byte array containing ARM program memory data bytes (directly from .bin file) |
count | is the number of bytes in the byte array |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_LOADBIN_NULL_PARAM | Function parameter binary has a NULL pointer |
MYKONOS_ERR_LOADBIN_INVALID_BYTECOUNT | Count parameter must be 98304 bytes |
mykonosErr_t MYKONOS_obsRxInjectPrbsError | ( | mykonosDevice_t * | device | ) |
Initiates a PRBS error injection into the Observation RX data path.
Dependencies
device | is a pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_programFir | ( | mykonosDevice_t * | device, |
mykonosfirName_t | filterToProgram, | ||
mykonosFir_t * | firFilter | ||
) |
Configures one or more FIR filters in the device.
The device stores up to 6 FIR filters (2Rx, 2Obs Rx/Sniffer, and 2Tx). Rx filters can have 24, 48, or 72 taps. Tx filters can have 16, 32, 48, 64, 80, or 96 taps.
Dependencies
device | Pointer to the Mykonos data structure |
filterToProgram | Name of the desired filter to program |
firFilter | Pointer to the filter to write into the device |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_PROGRAMFIR_NULL_PARM | ERROR: firFilter parameter is a NULL pointer |
MYKONOS_ERR_PROGRAMFIR_COEFS_NULL | ERROR: firFilter->coefs is a NULL pointer |
MYKONOS_ERR_PROGRAMFIR_INV_FIRNAME_PARM | ERROR: Invalid FIR filter name in filterToProgram parameter |
MYKONOS_ERR_PROGRAMFIR_INV_NUMTAPS_PARM | ERROR: Invalid number of taps for the filter |
MYKONOS_ERR_RXFIR_INV_GAIN_PARM | ERROR: Rx FIR filter has invalid gain setting |
MYKONOS_ERR_OBSRXFIR_INV_GAIN_PARM | ERROR: OBSRX_A (ORX) FIR filter has invalid gain setting |
MYKONOS_ERR_SRXFIR_INV_GAIN_PARM | ERROR: OBSRX_B (Sniffer) FIR filter has invalid gain setting |
MYKONOS_ERR_TXFIR_INV_GAIN_PARM | ERROR: Tx FIR filter has invalid gain setting |
mykonosErr_t MYKONOS_programRxGainTable | ( | mykonosDevice_t * | device, |
uint8_t * | gainTablePtr, | ||
uint8_t | numGainIndexesInTable, | ||
mykonosGainTable_t | rxChannel | ||
) |
Programs the gain table settings for either Rx1, Rx2, Rx1 + Rx2, ORx, or SnRx receiver types.
The gain table for a receiver type is set with the parameters passed by uint8_t gainTablePtr array. gainTablePtr is a 4 x n array, where there are four (4) elements per index, and the array length (n) is dependent upon receiver type. The (n) value is conveyed by numGainIndexesInTable. All gain tables have a maximum index of 255 when used with this function. The minimum gain index is application dependent.
Where for Rx1, Rx2, and ObsRx: [A, B, C, D]: A = Front End Gain, B = External Control, C = Digital Attenuation/Gain, D = Attenuation/Gain select
Where for SnRx: [A, B, C, D]: A = Front End Gain, B = LNA Bypass, C = Digital Attenuation/Gain, D = Attenuation/Gain select
The gain table starting address changes with each receiver type. This function accounts for this change as well as the difference between byte [B] for {Rx1, Rx2, ObsRx} and SnRx receiver array values and programs the correct registers.
Dependencies
device | Pointer to the Mykonos data structure |
gainTablePtr | Pointer to 4 x n array containing gain table program values |
numGainIndexesInTable | The number of 'n' indices in 4 x n array. A range check is performed to ensure the maximum is not exceeded. |
rxChannel | mykonosGainTable_t enum type to select either Rx1, Rx2, Rx1 + Rx2, ORx, or SnRx gain table for programming. A channel check is performed to ensure a valid selection. |
mykonosErr_t MYKONOS_radioOff | ( | mykonosDevice_t * | device | ) |
Instructs the ARM processor to move the radio state to the off state.
When the ARM moves from the Radio On state to Radio Off (Idle) the ARM tracking calibrations are stopped and the TxEnable/RxEnable, etc GPIO control pins will be ignored. This will also keep the receive and transmit chains powered down until the MYKONOS_radioOn() function is called again.
Dependencies
device | Pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_ARM_RADIOOFF_FAILED | ARM returned error running this command |
mykonosErr_t MYKONOS_radioOn | ( | mykonosDevice_t * | device | ) |
Instructs the ARM processor to move the radio state to the Radio ON state.
When the ARM to the Radio On state, the enabled Rx and Tx signal chains will power up, and the ARM tracking calibrations will begin. To exit this state back to a low power, offline state, call the MYKONOS_radioOff() function.
Dependencies
device | Pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_ARM_RADIOON_FAILED | ARM returned error running this command |
mykonosErr_t MYKONOS_readArmCmdStatus | ( | mykonosDevice_t * | device, |
uint16_t * | errorWord, | ||
uint16_t * | statusWord | ||
) |
Reads the Mykonos ARM 64-bit command status register.
A 64-bit status register consisting of a pending bit and three-bit error type is read one byte at a time for opcodes 0-30. The function parses the pending bits and error bits into two (2) separate 16-bit words containing pending bits, and error bits if the error type > 0 The words are weighted according to each even-numbered opcode from 0-30, where, 0x0001 = opcode '0', 0x0002 = opcode '2', 0x0004 = opcode '4', 0x0008 = opcode '6' and so on.
Dependencies
device | is a pointer to the device settings structure |
errorWord | 16-bit error word comprised of weighted bits according to each opcode number The weighted bit = '1' if error type > 0, '0' if OK |
statusWord | 16-bit pending bits word comprised of weighted bits according to each opcode number |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_READARMCMDSTATUS_NULL_PARM | Function parameters errorWord or statusWord have a NULL pointer |
mykonosErr_t MYKONOS_readArmCmdStatusByte | ( | mykonosDevice_t * | device, |
uint8_t | opCode, | ||
uint8_t * | cmdStatByte | ||
) |
Isolated byte read of the Mykonos ARM 64-bit command status register based on the opcode.
A single byte read is performed on the 64-bit command status register according to the opcode of interest. The pending bit and the error type are extracted from the status register and returned as a single byte in the lower nibble.
Dependencies
device | is a pointer to the device settings structure |
opCode | Valid values are even increments from 0-30. The ARM opCode is used to determine which status register byte to read |
cmdStatByte | returns cmdStatByte[3:1] = error type, cmdStatByte[0] = pending flag for selected opCode |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_READARMCMDSTATUSBYTE_NULL_PARM | Function parameter cmdStatByte has NULL pointer |
MYKONOS_ERR_READARMCMDSTATUS_INV_OPCODE_PARM | ARM opcode is out of range (valid 0-30, even only) |
mykonosErr_t MYKONOS_readArmConfig | ( | mykonosDevice_t * | device, |
uint8_t | objectId, | ||
uint16_t | offset, | ||
uint8_t * | data, | ||
uint8_t | byteCount | ||
) |
Low level helper function used by Mykonos API to read the ARM memory config structures.
Normally this function should not be required to be used directly by the BBIC. This is a helper function used by other Mykonos API commands to read settings from the ARM memory.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
objectId | ARM id of a particular structure or setting in ARM memory |
offset | Byte offset from the start of the objectId's memory location in ARM memory |
data | A byte array containing data to write to the ARM memory buffer. |
byteCount | Number of bytes in the data array (Valid size = 1-255 bytes) |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_READARMCFG_ARMERRFLAG | ARM read config command failed with a nonzero error code |
mykonosErr_t MYKONOS_readArmMem | ( | mykonosDevice_t * | device, |
uint32_t | address, | ||
uint8_t * | returnData, | ||
uint32_t | bytesToRead, | ||
uint8_t | autoIncrement | ||
) |
Read from the Mykonos ARM program or data memory.
Valid memory addresses are: Program Memory (0x01000000 - 0x01017FFF), Data Memory (0x20000000 - 0x2000FFFF)
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
address | The 32bit ARM address to read from. |
returnData | Byte(uint8_t) array containing the data read from the ARM memory. |
bytesToRead | Number of bytes in the returnData array. |
autoIncrement | is boolean flag to enable or disable autoincrement of ARM register address |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_READARMMEM_INV_ADDR_PARM | ARM memory address is out of range |
mykonosErr_t MYKONOS_readDeframerPrbsCounters | ( | mykonosDevice_t * | device, |
uint8_t | counterSelect, | ||
uint32_t * | prbsErrorCount | ||
) |
Reads the deframer PRBS counters.
Dependencies
device | is a pointer to the device settings structure |
counterSelect | selects the PRBS error counter to be read based on values between 0-3 If counterSelect exceeds this value an error is thrown. |
prbsErrorCount | is return value after reading the PRBS error count |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_READ_DEFRAMERPRBS_NULL_PARAM | Function parameter prbsErrorCount has NULL pointer |
MYKONOS_ERR_DEFRAMER_INV_PRBS_CNTR_SEL_PARAM | if counterSelect is out of bounds |
mykonosErr_t MYKONOS_readDeframerStatus | ( | mykonosDevice_t * | device, |
uint8_t * | deframerStatus | ||
) |
Reads the transceiver's deframer status.
Dependencies
deframerStatus | Bit Name | Description |
---|---|---|
[7] | Unused | Unused |
[6] | Deframer IRQ | This bit indicates that the IRQ interrupt was asserted. |
[5] | Deframer SYSREF Received | When this bit is set, it indicates that the SYSREF pulse was received by the deframer IP |
[4] | Deframer Receiver Error | This bit is set when PRBS has received an error. |
[3] | Valid Checksum | This bit is set when the received ILAS checksum is valid. |
[2] | EOF Event | This bit captures the internal status of the framer End of Frame event. Value =1 if framing error during ILAS |
[1] | EOMF Event | This bit captures the internal status of the framer End of Multi-Frame event. Value =1 if framing error during ILAS |
[0] | FS Lost | This bit captures the internal status of the framer Frame Symbol event. Value =1 if framing error during ILAS or user data (invalid replacement characters) |
device | is a pointer to the device settings structure |
deframerStatus | is the deframer status byte read |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_READ_DEFRAMERSTATUS_NULL_PARAM | Function parameter deframerStatus has NULL pointer |
mykonosErr_t MYKONOS_readEventStatus | ( | mykonosDevice_t * | device, |
waitEvent_t | waitEvent, | ||
uint8_t * | eventDone | ||
) |
Performs a readback with no wait for a Mykonos calibration or Pll Lock.
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
waitEvent | the enum value of the event to wait for |
eventDone | Return value: 1= calibration event is complete. 0 = Event is still pending |
mykonosErr_t MYKONOS_readFir | ( | mykonosDevice_t * | device, |
mykonosfirName_t | filterToRead, | ||
mykonosFir_t * | firFilter | ||
) |
Reads the FIR filter programmed into the device.
The device stores up to 6 FIR filters (2Rx, 2Obs Rx/Sniffer, and 2Tx). Rx filters can have 24, 48, or 72 taps. Tx filters can have 16, 32, 48, 64, 80, or 96 taps.
Dependencies
device | Pointer to the Mykonos data structure |
filterToRead | Name of the desired filter to be read |
firFilter | Pointer to the filter to be read from the device |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_READFIR_NULL_PARM | ERROR: firFilter parameter is a NULL pointer |
MYKONOS_ERR_READFIR_COEFS_NULL | ERROR: firFilter->coefs is a NULL pointer |
MYKONOS_ERR_READFIR_INV_FIRNAME_PARM | ERROR: Invalid FIR filter name in filterToRead parameter |
MYKONOS_ERR_READFIR_INV_NUMTAPS_PARM | ERROR: Invalid number of taps for the filter |
MYKONOS_ERR_RXFIR_INV_GAIN_PARM | ERROR: Rx FIR filter has invalid gain setting |
MYKONOS_ERR_OBSRXFIR_INV_GAIN_PARM | ERROR: OBSRX_A (ORX) FIR filter has invalid gain setting |
MYKONOS_ERR_SRXFIR_INV_GAIN_PARM | ERROR: OBSRX_B (Sniffer) FIR filter has invalid gain setting |
MYKONOS_ERR_TXFIR_INV_GAIN_PARM | ERROR: Tx FIR filter has invalid gain setting |
mykonosErr_t MYKONOS_readOrxFramerStatus | ( | mykonosDevice_t * | device, |
uint8_t * | obsFramerStatus | ||
) |
Reads the transceiver's Observation RX framer status.
Dependencies
obsFramerStatus | Description |
---|---|
[7] | SYSREF phase error ? a new SYSREF had different timing than the first that set the LMFC timing. |
[6] | Framer lane FIFO read/write pointer delta has changed. Can help debug issues with deterministic latency. |
[5] | Framer has received the SYSREF and has retimed its LMFC |
[4:2] | Framer ILAS state: 0=CGS, 1= 1st Multframe, 2= 2nd Multiframe, 3= 3rd Multiframe, 4= 4th multiframe, 5= Last multiframe, 6=invalid, 7= ILAS complete |
[1:0] | Framer Tx state: 0=CGS, 1= ILAS, 2 = ADC Data |
device | is a pointer to the device settings structure |
obsFramerStatus | is the OBSRX framer status byte read |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_READ_ORXFRAMERSTATUS_NULL_PARAM | Function parameter obsFramerStatus has NULL pointer |
mykonosErr_t MYKONOS_readRxFramerStatus | ( | mykonosDevice_t * | device, |
uint8_t * | framerStatus | ||
) |
Reads the transceiver's RX framer status.
Dependencies
framerStatus | Description |
---|---|
[7] | SYSREF phase error ? a new SYSREF had different timing than the first that set the LMFC timing. |
[6] | Framer lane FIFO read/write pointer delta has changed. Can help debug issues with deterministic latency. |
[5] | Framer has received the SYSREF and has retimed its LMFC |
[4:2] | Framer ILAS state: 0=CGS, 1= 1st Multframe, 2= 2nd Multiframe, 3= 3rd Multiframe, 4= 4th multiframe, 5= Last multiframe, 6=invalid, 7= ILAS complete |
[1:0] | Framer Tx state: 0=CGS, 1= ILAS, 2 = ADC Data |
device | is a pointer to the device settings structure |
framerStatus | is the RX framer status byte read |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_READ_RXFRAMERSTATUS_NULL_PARAM | Function parameter framerStatus has NULL pointer |
mykonosErr_t MYKONOS_rescheduleTrackingCal | ( | mykonosDevice_t * | device, |
mykonosTrackingCalibrations_t | trackingCal | ||
) |
Reschedules a tracking calibration to run. Can be used to override the tracking calibration timer and force a tracking calibration to run. Can be used to reschedule a tracking calibration after a tracking calibration error has been detected. Only one tracking calibration object can be scheduled per channel per function call.
Dependencies
device | Pointer to the device settings structure |
trackingCal | Selects the tracking calibration to schedule. |
MYKONOS_ERR_RESCHEDULE_TRACK_CAL_INV | Not valid calibration passed |
MYKONOS_ERR_RESCHEDULE_TRACK_ARMERRFLAG | ARM error |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_resetDeframer | ( | mykonosDevice_t * | device | ) |
Resets the JESD204B Deframer.
Dependencies
device | is a pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_resetDevice | ( | mykonosDevice_t * | device | ) |
Performs a hard reset on the MYKONOS DUT (Toggles RESETB pin on device)
Toggles the Mykonos devices RESETB pin. Only resets the device with the SPI chip select indicated in the device->spiSettings structure.
Dependencies
device | Pointer to Mykonos device data structure containing settings |
mykonosErr_t MYKONOS_resetDpd | ( | mykonosDevice_t * | device, |
mykonosTxChannels_t | txChannel, | ||
mykonosDpdResetMode_t | reset | ||
) |
This function resets the DPD model.
This function allows the user to reset the DPD actuator and prior model in radioOn or radioOff mode. The reset can restore prior model if the parameter passed is set to 2: this resets DPD first and then restores the previously loaded model into ARM memory for use with subsequent iterations of DPD.
If reset is 1 then the reset function just reset the DPD actuator and not use any model.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
txChannel | Desired Transmit channel to be reseted (Valid ENUM values: TX1, TX2 or TX1_TX2) |
reset | is the required reset condition that is needed, the available options are given by the enum mykonosDpdResetMode_t |
MYKONOS_ERR_RESETDPD_INV_TXCHANNEL | Tx channel is not valid (Valid ENUM values: TX1, TX2 or TX1_TX2) |
MYKONOS_ERR_RESETDPD_WRONG_PARAM | ERROR: reset parameter is not valid (Valid values: MYK_DPD_RESET_FULL, MYK_DPD_RESET_PRIOR or MYK_DPD_RESET_CORRELATOR) |
MYKONOS_ERR_RESETDPD_ARMERRFLAG | ERROR: ARM command flag error set |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_resetExtTxLolChannel | ( | mykonosDevice_t * | device, |
mykonosTxChannels_t | channelSel | ||
) |
Performs reset to the External Tx LO Leakage tracking calibration channel estimate.
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
channelSel | Enum selects the channel to reset |
MYKONOS_ERR_RESET_TXLOL_INV_PARAM | Selected channel is not valid |
MYKONOS_ERR_RESET_TXLOL_ARMERROR | ARM error |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_resetRxAgc | ( | mykonosDevice_t * | device | ) |
This function resets the AGC state machine.
Calling this function resets all state machines within the gain control and maximum gain.
Dependencies:
device | is structure pointer to the Mykonos data structure containing the device SPI settings |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_restoreDpdModel | ( | mykonosDevice_t * | device, |
mykonosTxChannels_t | txChannel, | ||
uint8_t * | modelDataBuffer, | ||
uint32_t | modelNumberBytes | ||
) |
This function will allow loading of the DPD model file.
This function writes a copy of the user's DPD model to ARM memory and instructs the ARM to install that DPD model into hardware. Note that initializing the device will over write DPD model data. Note that the DPD model being restored must match the PA for which it is configured. Restoring a DPD model to a different PA than for which it is configured will not yield the desired performance. The user is responsible to insure the DPD model matches the PA configuration.
device | Structure pointer to the Mykonos data structure containing settings |
txChannel | Desired transmit channel to which to write the DPD model file (Valid ENUM type mykonosTxChannels_t: TX1 or TX2 or TX1_TX2) |
modelDataBuffer | Pointer to the user buffer containing the history/model data to be loaded to a txChannel Valid sizes: 182 bytes for a single model load to either TX1 or TX2. 364 bytes for a dual model load to both TX1_TX2, where the TX1 model data will occupy the first 182 bytes and TX2 model data will occupy the second 182 bytes. |
modelNumberBytes | Total buffer size of the user history/model data buffer. Allowed sizes are 182 bytes for TX1 or TX2 and 364 bytes for TX1_TX2. |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_RESTDPDMOD_WRONGBUFFERSIZE | User suppled modelNumberBytes size is incorrect. TX1 or TX2 = 182, TX1_TX2 = 364 |
MYKONOS_ERR_RESTDPDMOD_INVALID_TXCHANNEL | User supplied txChannel does not match TX1 or TX2 or TX1_TX2 |
MYKONOS_ERR_RESTDPDMOD_ARMERRFLAG | ARM returned error for Set ARM Command |
mykonosErr_t MYKONOS_runInitCals | ( | mykonosDevice_t * | device, |
uint32_t | calMask | ||
) |
Runs the Mykonos initialization calibrations.
Dependencies
ENUM mykonosInitCalibrations_t can be used to OR together to generate the calMask parameter.
calMask Bit | Calibration |
---|---|
0 | Tx BB Filter |
1 | ADC Tuner |
2 | TIA 3dB Corner |
3 | DC Offset |
4 | Tx Attenuation Delay |
5 | Rx Gain Delay |
6 | Flash Cal |
7 | Path Delay |
8 | Tx LO Leakage Internal |
9 | Tx LO Leakage External |
10 | Tx QEC Init |
11 | LoopBack Rx LO Delay |
12 | LoopBack Rx Rx QEC Init |
13 | Rx LO Delay |
14 | Rx QEC Init |
15 | DPD Init |
16 | Tx CLGC (Closed Loop Gain Control) |
17 | Tx VSWR Init |
[31-18] | Ignored - Future space for new calibrations |
device | A pointer to the device settings structure |
calMask | A bitmask that informs the Mykonos ARM processor which calibrations to run |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_rxInjectPrbsError | ( | mykonosDevice_t * | device | ) |
Injects a PRBS error into the RX data path.
Dependencies
device | is a pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_saveDpdModel | ( | mykonosDevice_t * | device, |
mykonosTxChannels_t | txChannel, | ||
uint8_t * | modelDataBuffer, | ||
uint32_t | modelNumberBytes | ||
) |
This function called during RadioOff, will allow retrieval of the DPD model file.
This function reads a copy of the DPD model from ARM memory to user memory specified by the modelDataBuffer pointer. The user must provide the correct buffer size with the modelNumberBytes argument.
device | is structure pointer to the Mykonos data structure containing settings |
txChannel | Desired Transmit channel to read back DPD status for (Valid ENUM type mykonosTxChannels_t: TX1 or TX2 or TX1_TX2) |
modelDataBuffer | a pointer to the user buffer where the model data is to be written. Valid sizes: 182 bytes for a single model load to either TX1 or TX2. 364 bytes for a dual model load to both TX1_TX2, where the TX1 model data will occupy the first 182 bytes and TX2 model data will occupy the second 182 bytes. |
modelNumberBytes | is the total buffer size of the user model data buffer. Allowed sizes are 182 bytes for TX1 or TX2 and 364 bytes for TX1_TX2. |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_SAVEDPDMODEL_ARMSTATE_ERROR | ARM is not in the RadioOff state, call MYKONOS_radioOff() |
MYKONOS_ERR_SAVEDPDMODEL_BUFFERSIZE_ERROR | suppled modelNumberBytes size is incorrect. TX1 or TX2 = 182, TX1_TX2 = 364 |
MYKONOS_ERR_SAVEDPDMODEL_INVALID_TXCHANNEL_ERROR | supplied txChannel does not match TX1 or TX2 or TX1_TX2 |
mykonosErr_t MYKONOS_sendArmCommand | ( | mykonosDevice_t * | device, |
uint8_t | opCode, | ||
uint8_t * | extendedData, | ||
uint8_t | extendedDataNumBytes | ||
) |
Sends a command to the Mykonos ARM processor.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
opCode | Value (0-30, even only) indicating the desired function to run in the ARM. |
extendedData | A byte array containing extended data to write to the ARM command interface. |
extendedDataNumBytes | Number of bytes in the extendedData array (Valid size = 0-4 bytes) |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_ARMCMD_NULL_PARM | Function parameter extendedData is NULL and extendedDataNumBytes is positive |
MYKONOS_ERR_ARMCMD_INV_OPCODE_PARM | ARM opcode is out of range (valid 0-30, even only) |
MYKONOS_ERR_ARMCMD_INV_NUMBYTES_PARM | Number of extended bytes parameter is out of range (valid 0-4) |
MYKONOS_ERR_TIMEDOUT_ARMMAILBOXBUSY | ARM control interface is busy, command could not be executed by ARM |
mykonosErr_t MYKONOS_setAllTrackCalState | ( | mykonosDevice_t * | device, |
uint32_t | trackCals | ||
) |
Suspend or resume tracking calibrations in RADIO_ON.
This function is used to suspend or resume active tracking calibrations based on the passed mask trackingCals.
trackCals[bit] | Bit description |
---|---|
[0] | TRACK_RX1_QEC |
[1] | TRACK_RX2_QEC |
[2] | TRACK_ORX1_QEC |
[3] | TRACK_ORX2_QEC |
[4] | TRACK_TX1_LOL |
[5] | TRACK_TX2_LOL |
[6] | TRACK_TX1_QEC |
[7] | TRACK_TX2_QEC |
[8] | TRACK_TX1_DPD |
[9] | TRACK_TX2_DPD |
[10] | TRACK_TX1_CLGC |
[11] | TRACK_TX2_CLGC |
[12] | TRACK_TX1_VSWR |
[13] | TRACK_TX2_VSWR |
Dependencies
device | Pointer to the device settings structure |
trackCals | Selects the tracking calibrations to suspend or resume during the radio ON state. mykonosTrackingCalibrations_t enumerated types are or'd together to form the tracking calibration mask word. If the bit is high the calibration will resume, if the bit is low the calibration will be suspended. |
MYKONOS_ERR_SETSTATEALL_TRACK_CAL_INV | Not valid calibration mask passed for trackCals |
MYKONOS_ERR_SETSTATEALL_TRACK_ARMERRFLAG | ARM error |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setClgcAttenTuningConfig | ( | mykonosDevice_t * | device, |
mykonosClgcAttenTuningConfig_t * | attRangeCfg | ||
) |
CLGC feature to set the TX attenuation tuning range to a relative range around a nominal value.
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
attRangeCfg | Pointer to structure of type mykonosClgcAttenTuningConfig_t which contains the settings to be programmed |
MYKONOS_ERR_CFGCLGC_TXORX_PROFILE_INV | Tx and ObsRx profiles must be valid to use the CLGC feature |
MYKONOS_ERR_CLGCATTENTUNCFG_NULL_ATTRANGECFGSTRUCT | Passed structure is null |
MYKONOS_ERR_CLGCATTENTUNCFG_INVALID_MODE | Invalid mode in attRangeCfg member, for valid modes mykonosClgcAttenTuningMode_t |
MYKONOS_ERR_CLGCATTENTUNCFG_INVALID_PRESET | Invalid AttenTuningPreset in attRangeCfg member, valid range is from 0 to 839 (0 to 41.95dB) |
MYKONOS_ERR_CLGCATTENTUNCFG_INVALID_RANGE | Invalid AttenTuningRange in attRangeCfg member, valid range is from 0 to 420 (0 to 21dB) |
MYKONOS_ERR_CLGCATTENTUNCFG_INVALID_TX1_SETTINGS | Invalid Tx1 AttenTuningRange and AttenTuningPreset combination |
MYKONOS_ERR_CLGCATTENTUNCFG_INVALID_TX2_SETTINGS | Invalid Tx2 AttenTuningRange and AttenTuningPreset combination |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setClgcGain | ( | mykonosDevice_t * | device, |
mykonosTxChannels_t | txChannel, | ||
int16_t | gain | ||
) |
This function updates the CLGC desired gain parameter.
This function can be called in either Radio On or Off state.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
txChannel | Desired Transmit channel to set the (Valid ENUM values: TX1 or TX2 only) |
gain | Total gain and attenuation (dB * 100) for the selected channel txChannel |
MYKONOS_ERR_SETCLGCGAIN_INV_TXCHANNEL | ERROR: Tx channel is not valid (Valid ENUM values: TX1 or TX2 only) |
MYKONOS_ERR_SETCLGCGAIN_TRACK_ARMERRFLAG | ERROR: ARM command flag error set |
MYKONOS_ERR_SETCLGCGAIN_INV_DESIREDGAIN | ERROR: CLGC gain parameter is out of range, valid range is from -10000 to 10000. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setDefaultObsRxPath | ( | mykonosDevice_t * | device, |
mykonosObsRxChannels_t | defaultObsRxCh | ||
) |
Sets the default Obs Rx channel to enter when device moves from radioOff to radioOn.
By default, the observation receiver remains powered down when the device moves into the radioOn state. If the BBIC prefers a particular ObsRx channel to be enabled, this function can be called in radioOff to set the default channel to power up when the device moves to radioOn.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
defaultObsRxCh | is mykonosObsRxChannels_t enum type which selects the desired observation receive path to power up |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_SETDEFOBSRXPATH_NULL_OBSRX_STRUCT | Observation profile not valid, device->obsRx structure is NULL |
MYKONOS_ERR_SETDEFOBSRXPATH_NULL_DEF_OBSRX_STRUCT | Invalid defaultObsRxCh function parameter |
mykonosErr_t MYKONOS_setDigDcOffsetEn | ( | mykonosDevice_t * | device, |
uint8_t | enableMask | ||
) |
Enable/ Disable Digital DC Offset channels using the channel mask. The mask can be a combination of the following channel values ( mykonosRxDcOffsettEn_t ).
Channel | Value | Channel description |
---|---|---|
MYK_DC_OFFSET_ALL_OFF | 0x00 | Disable all the channels |
MYK_DC_OFFSET_RX1 | 0x01 | Enables Rx1 |
MYK_DC_OFFSET_RX2 | 0x02 | Enables Rx1 |
MYK_DC_OFFSET_SNF | 0x04 | Enables Sniffer |
MYK_DC_OFFSET_ORX | 0x08 | Enables ORx |
MYK_DC_OFFSET_AVAILABLE | 0x0F | Enables all the channels |
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
enableMask | with bits of channels to be enabled. |
MYKONOS_ERR_DIG_DC_OFFSET_INV_ENABLE_MASK | enable mask passed to the function is invalid, refer mykonosRxDcOffsettEn_t enum. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setDigDcOffsetMShift | ( | mykonosDevice_t * | device, |
mykonosDcOffsetChannels_t | channel, | ||
uint8_t | mShift | ||
) |
Sets M-Shift value which is the Corner frequency of Rx notch filter for the given channel. channel can be one of the following ( mykonosDcOffsetChannels_t ).
Channel | Channel description |
---|---|
MYK_DC_OFFSET_RX_CHN | Selects Rx channel |
MYK_DC_OFFSET_ORX_CHN | Selects ORx channel |
MYK_DC_OFFSET_SNF_CHN | Selects Sniffer channel |
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
channel | receive channel to be selected. |
mShift | value to be configured for the given channel |
MYKONOS_ERR_DC_OFFSET_INV_CHAN | channel passed to the function is invalid, refer mykonosDcOffsetChannels_t enum for valid channels. |
MYKONOS_ERR_SET_DIG_DC_OFFSET_INV_MSHIFT | mShift value passed is invalid. |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setDpdActState | ( | mykonosDevice_t * | device, |
mykonosTxChannels_t | txChannel, | ||
uint8_t | actState | ||
) |
This function sets the state of the DPD actuator.
This function can be called in either Radio On or Off state.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
txChannel | Desired Transmit channel to set the Actuator State (Valid ENUM values: TX1, TX2 or TX1_TX2) |
actState | Desired actuator state for the DPD, valid states are 0-disable and 1-enable |
MYKONOS_ERR_SETDPDACT_INV_TXCHANNEL | ERROR: Tx channel is not valid (Valid ENUM values: TX1, TX2 or TX1_TX2) |
MYKONOS_ERR_SETDPDACT_INV_STATE | ERROR: Invalid Actuator state, valid states are 0-disable and 1-enable. |
MYKONOS_ERR_SETDPDACT_ARMERRFLAG | ERROR: ARM command flag error set |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setDpdActuatorCheck | ( | mykonosDevice_t * | device, |
mykonosDpdActuatorCheck_t * | actCheck | ||
) |
DPD feature to set the actuator gain difference check. If the gain before and after the actuator exceeds the value actCheck->actuatorGainCheckLevel an error will be issued and the actuator will reset depending on the actCheck->actuatorGainCheckMode.
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
actCheck | Pointer to structure of type mykonosDpdActuatorCheck_t which contains the settings to be programmed |
MYKONOS_ERR_SETDPDACTCHECK_NULL_ACTSTRUCT | passed structure is null |
MYKONOS_ERR_SETDPDACTCHECK_INV_ACTMODE | invalid mode in actCheck->actuatorGainCheckMode for valid modes mykonosDpdResetMode_t |
MYKONOS_ERR_SETDPDACTCHECK_INV_LEVEL | actCheck->actuatorGainCheckLevel outside the range, valid range is from 0 to 3000 (0 to 30dB) |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setDpdBypassConfig | ( | mykonosDevice_t * | device, |
mykonosDpdBypassConfig_t * | actConfig | ||
) |
DPD feature to set the bypassing actuator when Tx signal power is below a programmable threshold given in mykonosDpdBypassConfig_t lowPowerActuatorBypassLevel.
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
actConfig | Pointer to actuator structure of type mykonosDpdBypassConfig_t which contains the settings to be programmed |
MYKONOS_ERR_SETDPDACT_NULL_ACTSTRUCT | passed structure is null |
MYKONOS_ERR_SETDPDACT_INV_ACTMODE | invalid mode in actConfig->lowPowerActuatorBypassMode for valid modes mykonosDpdResetMode_t |
MYKONOS_ERR_SETDPDACT_INV_LEVEL | actConfig->lowPowerActuatorBypassLevel outside the range, valid range is 0 to 6000 (0 to 60dB) |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setObsRxAgcMinMaxGainIndex | ( | mykonosDevice_t * | device, |
mykonosObsRxChannels_t | obsRxChannelSelect, | ||
uint8_t | maxGainIndex, | ||
uint8_t | minGainIndex | ||
) |
This function sets the min/max gain indexes for AGC in the observation channel.
Allows to change min/max gain index on runtime.
Dependencies:
device | is structure pointer to the Mykonos data structure containing the device SPI settings |
obsRxChannelSelect | Observation channel for setting the max and min gain index settings |
maxGainIndex | Max gain index setting |
minGainIndex | Min gain index setting |
MYKONOS_ERR_SET_ORX_MAX_GAIN_INDEX_CHANNEL | Wrong read back channel. |
MYKONOS_ERR_SET_ORX_MAX_GAIN_INDEX | Max gain index bigger than max gain index loaded table. |
MYKONOS_ERR_SET_ORX_MIN_GAIN_INDEX | Min gain index lower than min gain index loaded table. |
MYKONOS_ERR_AGC_MIN_MAX_ORX_CHANNEL | Wrong observation channel selected |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setObsRxFramerDataSource | ( | mykonosDevice_t * | device, |
uint8_t | dataSource | ||
) |
Select data to inject into the ObsRx framer input (ADC data or Loopback data from deframer output)
This function allows inputting deframed data (IQ samples) from the Tx data path into the Obs Rx framer. For this to work correctly, the IQ data rate of the Tx data path must match the ORx IQ data rate. Framer/Deframer JESD204 config parameters can vary as long as the Obs Rx and Tx IQ rates match.
Dependencies
device | A pointer to the device settings structure |
dataSource | 0 = ADC data at ObsRx Framer input, 1 = Deframed Tx JESD204 IQ samples input into Obs Rx framer |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setObsRxGainControlMode | ( | mykonosDevice_t * | device, |
mykonosGainMode_t | mode | ||
) |
Configures the ObsRx gain control mode.
Dependencies:
device | is structure pointer to the Mykonos data structure containing settings |
mode | is a mykonosGainMode_t enumerated gain control mode type |
When the mode enumerated type is passed, the ObsRx gain mode is set to this value and the ObsRX agcType mykonosAgcCfg_t structure member is updated with the new value
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_INV_ORX_GAIN_MODE_PARM | Invalid Observation Rx Gain control mode selected (use mykonosGainMode_t ENUM values) |
mykonosErr_t MYKONOS_setObsRxManualGain | ( | mykonosDevice_t * | device, |
mykonosObsRxChannels_t | obsRxCh, | ||
uint8_t | gainIndex | ||
) |
Sets the Rx gain of the ObsRx channel.
The ObsRx channel can have different RF inputs (ORx1/ORx2/SnRx A,B,C) This function sets the ObsRx gain index independently for ORx1/ORx2, or SnRx. SnRx A, B, and C share the same gain index. Please note that ORx1/ORx2 share a gain table, as does SnRx A, B, and C. The maximum index is 255 and the minimum index is application specific.
Dependencies
device | Pointer to the Mykonos device data structure |
obsRxCh | is an enum type mykonosObsRxChannels_t to identify the desired RF input for gain change |
gainIndex | Desired manual gain table index to set |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_SETORXGAIN_INV_ORX1GAIN | Invalid gain requested for ORx1: outside gain table min/max index |
MYKONOS_ERR_SETORXGAIN_INV_ORX2GAIN | Invalid gain requested for ORx2: outside gain table min/max index |
MYKONOS_ERR_SETORXGAIN_INV_SNRXGAIN | Invalid gain requested for Sniffer: outside gain table min/max index |
MYKONOS_ERR_SETORXGAIN_INV_CHANNEL | Function parameter obsRxCh has an invalid enum value |
mykonosErr_t MYKONOS_setObsRxPathSource | ( | mykonosDevice_t * | device, |
mykonosObsRxChannels_t | obsRxCh | ||
) |
Powers up or down the Observation Rx signal chain in the radioOn state.
When the ARM radio control is in ARM command mode, this function allows the user to selectively power up or down the desired ObsRx data path. If this function is called when the ARM is expecting GPIO pin control of the ObsRx path source, an error will be returned.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
obsRxCh | is mykonosObsRxChannels_t enum type which selects the desired observation receive path to power up |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_PU_OBSRXPATH_INV_PARAM | Invalid obsRxCh function parameter |
MYKONOS_ERR_PU_OBSRXPATH_ARMERROR | ARM returned an error while trying to set the ObsRx Path source |
mykonosErr_t MYKONOS_setObsRxTempGainComp | ( | mykonosDevice_t * | device, |
int16_t | obsRxTempCompGain_mdB | ||
) |
This function sets the Temperature gain compensation for the observation channel.
The temperature gain compensation control allow for a +3000mdB to -3000mdB digital gain in the data path. The resolution of the temperature compensation gain is 250mdB.
Dependencies:
device | is structure pointer to the Mykonos data structure containing the device SPI settings |
obsRxTempCompGain_mdB | gain compensation for observation channel, the range is from -3000mdB to +3000mdB in steps of 250mdB |
MYKONOS_ERR_OBS_RX_TEMP_GAIN_COMP_RANGE | The temp gain compensation is outside range (-3000mdB to 3000mdB) |
MYKONOS_ERR_OBS_RX_TEMP_GAIN_COMP_STEP | Not valid temp gain compensation, step size is 250mdB |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setPathDelay | ( | mykonosDevice_t * | device, |
mykonosPathdelay_t * | pathDelay | ||
) |
This function will configure the path delay settings for all the features: DPD, VSWR and CLGC.
A DPD device is required.
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
pathDelay | pointer to structure of type mykonosPathdelay_t to be programmed |
MYKONOS_ERR_SET_PATH_DELAY_NULL_PARAM | pathDelay is null |
MYKONOS_ERR_SET_PATH_DELAY_PARAM_OUT_OF_RANGE | path delay valid range is from 0 to 4095 at 1/16 sample resolution of ORx sample rate |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setRadioControlPinMode | ( | mykonosDevice_t * | device | ) |
Configures the Radio power up/down control for Rx and Tx paths to be controlled by pins (TX1/2_ENABLE, RX1/2_ENABLE, and GPIO pins) or an API function call.
The BBP should not have to call this as it will automatically be setup at the end of the MYKONOS_loadArmFromBinary() function call. If the BBP wishes to change the radio power up/down control method this function can be called again to change the configuration while the ARM is in the radioOff state.
Dependencies
device | is a pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_SET_RADIOCTRL_PINS_ARMERROR | ARM returned an error and did not accept the command. |
mykonosErr_t MYKONOS_setRfDcOffsetCnt | ( | mykonosDevice_t * | device, |
mykonosDcOffsetChannels_t | channel, | ||
uint16_t | measureCount | ||
) |
Sets the measure count which is the number of samples taken before DC offset correction is applied for the given RF channel. This value should be changed after ARM initialization. channel can be one of the following ( mykonosDcOffsetChannels_t ).
Channel | Channel description |
---|---|
MYK_DC_OFFSET_RX_CHN | Selects Rx channel |
MYK_DC_OFFSET_ORX_CHN | Selects ORx channel |
MYK_DC_OFFSET_SNF_CHN | Selects Sniffer channel |
The total duration 'tCount' is calculated as, [tCount = (measureCount * 1024) / IQ data rate of the channel]. There is a minimum limit for the value of measureCount, the value passed should satisfy the condition 'tCount > 800us'.
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
channel | Receive channel to be selected. |
measureCount | Value to be configured for the selected channel which is the number of samples taken before DC offset correction is applied. |
MYKONOS_ERR_DC_OFFSET_INV_CHAN | channel passed to the function is invalid, refer mykonosDcOffsetChannels_t enum for valid channels. |
MYKONOS_ERR_SET_RF_DC_OFFSET_INV_MEASURECNT | measurement count value passed is invalid |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_SET_RF_DC_OFFSET_MEASURECNT_MIN_LIMIT | The measureCount value passed is less than the minimum limit allowed. |
mykonosErr_t MYKONOS_setRfPllFrequency | ( | mykonosDevice_t * | device, |
mykonosRfPllName_t | pllName, | ||
uint64_t | rfPllLoFrequency_Hz | ||
) |
Sets the RF PLL local oscillator frequency (RF carrier frequency).
Dependencies
device | is structure pointer to the MYKONOS data structure containing settings |
pllName | Name of the PLL to configure |
rfPllLoFrequency_Hz | Desired RF LO frequency |
mykonosErr_t MYKONOS_setRfPllLoopFilter | ( | mykonosDevice_t * | device, |
mykonosRfPllName_t | pllName, | ||
uint16_t | loopBandwidth_kHz, | ||
uint8_t | stability | ||
) |
Sets the RF PLL loop filter bandwith.
Dependencies
device | is structure pointer to the MYKONOS data structure containing settings |
pllName | Name of the PLL to configure.RX_PLL and TX_PLL can be configured.SNIFFER_PLL can not be configured. |
loopBandwidth_kHz | Desired RF pll bandwith to be set. The valid values range of loopBandwidth_kHz for Rx and Tx is 50 to 750.For SRX valid values lies from 500 to 750. |
stability | PLL Loop stability to be set.The valid values range of stability is from 3 to 15. |
mykonosErr_t MYKONOS_setRx1ManualGain | ( | mykonosDevice_t * | device, |
uint8_t | gainIndex | ||
) |
Sets the Rx1 Manual Gain Index.
If the value passed in the gainIndex parameter is within range of the gain table minimum and maximum indexes, the Rx1 gain index will be updated in the device data structure and written to the transceiver. Else, an error will be returned. The maximum index is 255 and the minimum index is application specific.
Dependencies
device | Pointer to the Mykonos data structure |
gainIndex | Desired Rx1 gain index |
mykonosErr_t MYKONOS_setRx1TempGainComp | ( | mykonosDevice_t * | device, |
int16_t | rx1TempCompGain_mdB | ||
) |
This function sets the Temperature gain compensation for Rx1 channel.
The temperature gain compensation control allow for a +3000mdB to -3000mdB digital gain in the data path. The resolution of the temperature compensation gain is 250mdB.
Dependencies:
device | is structure pointer to the Mykonos data structure containing the device SPI settings |
rx1TempCompGain_mdB | gain compensation for Rx1, the range is from -3000mdB to +3000mdB in steps of 250mdB |
MYKONOS_ERR_RX1_TEMP_GAIN_COMP_RANGE | The temp gain compensation is outside range (-3000mdB to 3000mdB) |
MYKONOS_ERR_RX1_TEMP_GAIN_COMP_STEP | Not valid temp gain compensation, step size is 250mdB |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setRx2ManualGain | ( | mykonosDevice_t * | device, |
uint8_t | gainIndex | ||
) |
Sets the Rx2 Manual Gain index.
If the value passed in the gainIndex parameter is within range of the gain table minimum and maximum indexes, the Rx2 gain index will be updated in the device data structure and written to the transceiver. Else, an error will be returned. The maximum index is 255 and the minimum index is application specific.
Dependencies
device | Pointer to the Mykonos data structure |
gainIndex | Desired Rx2 gain index |
mykonosErr_t MYKONOS_setRx2TempGainComp | ( | mykonosDevice_t * | device, |
int16_t | rx2TempCompGain_mdB | ||
) |
This function sets the Temperature gain compensation for Rx2 channel.
The temperature gain compensation control allow for a +3000mdB to -3000mdB digital gain in the data path. The resolution of the temperature compensation gain is 250mdB.
Dependencies:
device | is structure pointer to the Mykonos data structure containing the device SPI settings |
rx2TempCompGain_mdB | gain compensation for Rx1, the range is from -3000mdB to +3000mdB in steps of 250mdB |
MYKONOS_ERR_RX2_TEMP_GAIN_COMP_RANGE | The temp gain compensation is outside range (-3000mdB to 3000mdB) |
MYKONOS_ERR_RX2_TEMP_GAIN_COMP_STEP | Not valid temp gain compensation, step size is 250mdB |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setRxAgcMinMaxGainIndex | ( | mykonosDevice_t * | device, |
mykonosRxChannels_t | rxChannelSelect, | ||
uint8_t | maxGainIndex, | ||
uint8_t | minGainIndex | ||
) |
This function sets the min/max gain indexes for AGC in the main RX channel.
Allows to change min/max gain index on runtime. If RX1_RX2 selected, then the maxGainIndex/minGainIndex value will be applied to both channels. If only Rx1 selected, then only Rx1 min/max gain indices will be updated, along with their device data structure values. If only Rx2 selected, then only Rx2 min/max gain indices will be updated, along with their device data structure values.
Dependencies:
device | is structure pointer to the Mykonos data structure containing the device SPI settings |
rxChannelSelect | RX channel for setting the max and min gain index settings |
maxGainIndex | Max gain index setting |
minGainIndex | Min gain index setting |
MYKONOS_ERR_SET_RX_MAX_GAIN_INDEX | Max gain index bigger than max gain index loaded table. |
MYKONOS_ERR_SET_RX_MIN_GAIN_INDEX | Min gain index lower than min gain index loaded table. |
MYKONOS_ERR_AGC_MIN_MAX_CHANNEL | Wrong RX channel selected |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setRxFramerDataSource | ( | mykonosDevice_t * | device, |
uint8_t | dataSource | ||
) |
Select data to inject into the Rx framer input (ADC data or Loopback data from deframer output)
This function allows inputting deframed data (IQ samples) from the Tx data path into the Rx framer. For this to work correctly, the IQ data rate of the Tx data path must match the Rx IQ data rate. Framer/Deframer JESD204 config parameters can vary as long as the Rx and Tx IQ rates match.
Dependencies
device | A pointer to the device settings structure |
dataSource | 0 = ADC data at Rx Framer input, 1 = Deframed Tx JESD204 IQ samples input into Rx framer |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setRxGainControlMode | ( | mykonosDevice_t * | device, |
mykonosGainMode_t | mode | ||
) |
Configures the Rx gain control mode.
Dependencies:
device | is structure pointer to the Mykonos data structure containing settings |
mode | is a mykonosGainMode_t enumerated gain control mode type where: Manual Gain = MGC, Automatic Gain Control = AGC, and hybrid mode = HYBRID |
When the mode enumerated type is passed, the Rx1 and Rx2 gain mode is set to this value and the Rx gainMode structure member is updated with the new value
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_INV_RX_GAIN_MODE_PARM | Invalid AGC mode pass in function mode paramter |
mykonosErr_t MYKONOS_setRxPfirSyncClk | ( | mykonosDevice_t * | device | ) |
Sets the digital Rx PFIR SYNC clock divider.
This function is a helper function. It is called automatically in MYKONOS_initialize() and should not need to be called by the BBIC.
This function sets the digital clock divider that is used to synchronize the Rx/ORx/Sniffer PFIRs each time the channels power up. The Sync clock must be set equal to or slower than the slowest Rx/ORx/Sniffer PFIR processing clock.
Dependencies
device | Pointer to the Mykonos data structure |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_RXFIR_TAPSEXCEEDED | ERROR: the number of Rx FIR taps exceeds the number of taps accommodated by the FIR processing clock |
MYKONOS_ERR_ORXFIR_TAPSEXCEEDED | ERROR: the number of ORx FIR Taps exceeds the number of taps accommodated by the FIR processing clock |
MYKONOS_ERR_SNRXFIR_TAPSEXCEEDED | ERROR: the number of sniffer FIR taps exceeds the number of taps accommodated by the FIR processing clock |
Calculate Rx SYNC Clock divider for Rx PFIR. Same Rx SYNC Clock is used for Rx, ORx, and Sniffer PFIRs, and must be slow enough to handle the slowest PFIR rate.
mykonosErr_t MYKONOS_setSnifferChannel | ( | mykonosDevice_t * | device, |
mykonosSnifferChannel_t | snifferChannel | ||
) |
Selects the Sniffer RF input to use for the observation receiver when in ObsRx pin mode and ORX_MODE = SNIFFER(4)
This function is only valid when using the ObsRx Pin mode. In pin mode, 3 GPIO pins select an Observation Rx source. See mykonosObsRxChannels_t enum values less than 7. When the ORX_MODE GPIO pins are set to 4 for Sniffer, Sniffer inputs A, B, and C can be chosen by calling this function. This function can be called any time after the ARM is loaded and running. It can be called in radioOn or radioOff state.
Dependencies
device | Pointer to the device settings structure |
snifferChannel | Desired channel to set. This channel will be enabled when ORX_MODE = SNIFFER. |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_SET_ARMGPIO_PINS_ARMERROR | ARM returned an error |
mykonosErr_t MYKONOS_setSpiSettings | ( | mykonosDevice_t * | device | ) |
Sets the Mykonos device SPI settings (3wire/4wire, MSBFirst, etc).
This function will use the settings in the device->spiSettings structure to set SPI stream mode, address auto increment direction, MSBFirst/LSBfirst, and 3wire/4wire mode. The Mykonos device always uses SPI MODE 0 (CPHA=0, CPOL=0). This function will update your device->spiSettings to set CHPA=0 and CPOL=0 and longInstructionWord =1 to use a 16bit instruction word.
Dependencies
device | Pointer to Mykonos device data structure containing settings |
mykonosErr_t MYKONOS_setTrackingCalState | ( | mykonosDevice_t * | device, |
mykonosTrackingCalibrations_t | trackingCal, | ||
uint8_t | trackCalState | ||
) |
Suspend or resume individual tracking calibration.
Dependencies
device | Pointer to the device settings structure |
trackingCal | Selects the tracking calibration to resume or suspend. |
trackCalState | if set then the selected tracking calibration will be resumed and if not set then the tracking cal will be suspended |
MYKONOS_ERR_SETSTATE_TRACK_CAL_INV | Not valid calibration passed |
MYKONOS_ERR_SETSTATE_TRACK_ARMERRFLAG | ARM error |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_setTx1Attenuation | ( | mykonosDevice_t * | device, |
uint16_t | tx1Attenuation_mdB | ||
) |
Sets the Tx1 RF output Attenuation.
Dependencies
device | Pointer to the Mykonos device's data structure |
tx1Attenuation_mdB | The desired TxAttenuation in milli-dB (Range: 0 to 41950 mdB) |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_SETTX1ATTEN_INV_PARM | tx1Attenuation_mdB parameter is out of range (0 - 41950) |
MYKONOS_ERR_SETTX1ATTEN_INV_STEPSIZE_PARM | device->tx->txAttenStepSize is not a valid enum value |
mykonosErr_t MYKONOS_setTx2Attenuation | ( | mykonosDevice_t * | device, |
uint16_t | tx2Attenuation_mdB | ||
) |
Sets the Tx2 RF output Attenuation (Step size is 0.05dB.)
Dependencies
device | Pointer to the Mykonos device's data structure |
tx2Attenuation_mdB | The desired TxAttenuation in milli-dB (Range: 0 to 41950 mdB) |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_SETTX2ATTEN_INV_PARM | tx2Attenuation_mdB parameter is out of range (0 - 41950) |
MYKONOS_ERR_SETTX2ATTEN_INV_STEPSIZE_PARM | device->tx->txAttenStepSize is not a valid enum value |
mykonosErr_t MYKONOS_setTxPfirSyncClk | ( | mykonosDevice_t * | device | ) |
Sets the digital Tx PFIR SYNC clock divider.
This function is a helper function. It is called automatically in MYKONOS_initialize() and should not need to be called by the BBIC.
This function sets the digital clock divider that is used to synchronize the Tx PFIR each time the Tx channel power up. The Sync clock must be set equal to or slower than the FIR processing clock.
Dependencies
device | Pointer to the Mykonos data structure |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_TXFIR_INV_NUMTAPS_PARM | Invalid number of Tx FIR coefficients |
MYKONOS_ERR_TXFIR_INV_NUMROWS | Invalid number of PFIR coefficient rows |
MYKONOS_ERR_TXFIR_TAPSEXCEEDED | Too many Tx PFIR taps for the IQ sample rate. FIR processing clock can not run fast enough to handle the number of taps |
mykonosErr_t MYKONOS_setupDeserializers | ( | mykonosDevice_t * | device | ) |
Sets up the JESD204B Deserializers.
This function enables the necessary deserializer lanes, sets the deserializer clocks PN inversion settings, and EQ settings based on the info found in the device data structure.
Dependencies
device | Pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_INITDES_INV_TXPROFILE | Tx Profile is not valid in data structure - can not setup deserializer |
MYKONOS_ERR_INITDES_INV_VCODIV_PARM | Mykonos CLKPLL VCO divider is invalid |
MYKONOS_ERR_DESER_INV_M_PARM | Invalid M (valid 2 or 4) |
MYKONOS_ERR_DESER_INV_L_PARM | Invalid L (valid 1,2,4) |
MYKONOS_ERR_DESER_INV_HSCLK_PARM | Invalid HSCLK, must be 6.144G or less after CLKPLL VCO divider - verify CLKPLL config |
MYKONOS_ERR_DESER_INV_LANERATE_PARM | Invalid lanerate, must be between 614.4 Mbps to 6144 Mbps |
MYKONOS_ERR_DESER_INV_LANEEN_PARM | Invalid deserializerLanesEnabled (valid 0-15 in 1,2,4 lane combinations) |
MYKONOS_ERR_DESER_INV_EQ_PARM | Invalid EQ parameter (valid 0-4) |
MYKONOS_ERR_DESER_INV_LANEPN_PARM | Invalid PN invert setting, (valid 0-15, invert bit per lane) |
MYKONOS_ERR_DES_HS_AND_LANE_RATE_NOT_INTEGER_MULT | Invalid clock settings, HSCLK is not an integer multiple of lane rate |
mykonosErr_t MYKONOS_setupJesd204bDeframer | ( | mykonosDevice_t * | device | ) |
Sets up the JESD204B Deframer.
Dependencies
device | Pointer to device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_DEFRAMER_INV_M_PARM | Invalid M parameter in deframer structure |
MYKONOS_ERR_DEFRAMER_INV_BANKID_PARM | Invalid BankId parameter in deframer structure (Valid 0-15) |
MYKONOS_ERR_ERR_DEFRAMER_INV_LANEID_PARM | Invalid Lane0Id parameter in deframer structure (Valid 0-31) |
MYKONOS_ERR_DEFRAMER_INV_K_PARAM | Invalid K parameter in deframer structure (valid 1-32 with other constraints) |
MYKONOS_ERR_DEFRAMER_INV_FK_PARAM | Invalid F*K parameter (Valid F*K > 20, F*K must be divisible by 4), K must be <= 32 |
MYKONOS_ERR_DEFRAMER_INV_K_OFFSET_PARAM | Invalid K offset parameter in deframer structure (must be less than K) |
mykonosErr_t MYKONOS_setupJesd204bFramer | ( | mykonosDevice_t * | device | ) |
Sets up the JESD204B Framer.
Dependencies
device | Pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_FRAMER_INV_REAL_IF_DATA_PARM | Invalid framer M, M can only = 1 in real IF mode |
MYKONOS_ERR_FRAMER_INV_M_PARM | Invalid framer M (valid 1,2,4) |
MYKONOS_ERR_FRAMER_INV_BANKID_PARM | Invalid BankId (valid 0-15) |
MYKONOS_ERR_FRAMER_INV_LANEID_PARM | Invalid Lane0Id (valid 0-31) |
MYKONOS_ERR_RXFRAMER_INV_FK_PARAM | |
MYKONOS_ERR_FRAMER_INV_K_OFFSET_PARAM |
mykonosErr_t MYKONOS_setupJesd204bObsRxFramer | ( | mykonosDevice_t * | device | ) |
Sets up the JESD204B OBSRX Framer.
Dependencies
device | Pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_OBSRX_FRAMER_INV_REAL_IF_DATA_PARM | M parameter can only be 1 when real IF data mode is enabled |
MYKONOS_ERR_OBSRX_FRAMER_INV_M_PARM | ObsRx Framer M parameter can only be 1 or 2 |
MYKONOS_ERR_OBSRX_FRAMER_INV_BANKID_PARM | Invalid BankId (0-15) |
MYKONOS_ERR_OBSRX_FRAMER_INV_LANEID_PARM | Invalid lane0Id (0-31) |
MYKONOS_ERR_OBSRXFRAMER_INV_FK_PARAM | Invalid F*K value (F * K must be > 20 and divisible by 4) |
MYKONOS_ERR_OBSRX_FRAMER_INV_K_OFFSET_PARAM | Invalid K offset, must be less than K |
mykonosErr_t MYKONOS_setupObsRxAgc | ( | mykonosDevice_t * | device | ) |
Sets up the device ObsRx Automatic Gain Control (AGC) registers.
Three data structures (of types mykonosAgcCfg_t, mykonosPeakDetAgcCfg_t, mykonosPowerMeasAgcCfg_t) must be instantiated prior to calling this function. Valid ranges for data structure members must also be provided.
Dependencies:
device | is structure pointer to the Mykonos data structure containing settings The pointer to the Mykonos AGC data structure containing settings is checked for a null pointer to ensure it has been initialized. If not an error is thrown. |
Returns | MYKONOS_ERR=pass, !MYKONOS_ERR=fail |
MYKONOS_ERR_INV_AGC_OBSRX_STRUCT_INIT | |
MYKONOS_ERR_INV_AGC_OBSRX_PEAK_STRUCT_INIT | |
MYKONOS_ERR_INV_AGC_OBSRX_PWR_STRUCT_INIT | |
MYKONOS_ERR_INV_AGC_OBSRX_MAX_GAIN_INDEX | |
MYKONOS_ERR_INV_AGC_OBSRX_MIN_GAIN_INDEX | |
MYKONOS_ERR_INV_AGC_OBSRX_SELECT | |
MYKONOS_ERR_INV_AGC_OBSRX_GAIN_UPDATE_TIME_PARM | |
MYKONOS_ERR_INV_AGC_OBSRX_PEAK_WAIT_TIME_PARM | |
MYKONOS_ERR_INV_AGC_OBSRX_SLOW_LOOP_SETTLING_DELAY | |
MYKONOS_ERR_INV_AGC_OBSRX_PMD_MEAS_DURATION | |
MYKONOS_ERR_INV_AGC_OBSRX_PMD_MEAS_CONFIG | |
MYKONOS_ERR_INV_AGC_OBSRX_LOW_THS_PREV_GAIN_INC | |
MYKONOS_ERR_INV_AGC_OBSRX_PEAK_THRESH_MODE | |
MYKONOS_ERR_INV_AGC_OBSRX_RESET_ON_RX_ENABLE | |
MYKONOS_ERR_INV_AGC_OBSRX_ENABLE_SYNC_PULSE_GAIN_COUNTER | |
MYKONOS_ERR_INV_AGC_OBSRX_PMD_LOWER_HIGH_THRESH | |
MYKONOS_ERR_INV_AGC_OBSRX_PMD_UPPER_LOW_THRESH | |
MYKONOS_ERR_INV_AGC_OBSRX_PMD_LOWER_LOW_THRESH | |
MYKONOS_ERR_INV_AGC_OBSRX_PMD_UPPER_HIGH_THRESH | |
MYKONOS_ERR_INV_AGC_OBSRX_PMD_UPPER_HIGH_GAIN_STEP | |
MYKONOS_ERR_INV_AGC_OBSRX_PMD_LOWER_LOW_GAIN_STEP | |
MYKONOS_ERR_INV_AGC_OBSRX_PMD_UPPER_LOW_GAIN_STEP | |
MYKONOS_ERR_INV_AGC_OBSRX_PMD_LOWER_HIGH_GAIN_STEP | |
MYKONOS_ERR_INV_AGC_OBSRX_PKDET_FAST_ATTACK_VALUE | |
MYKONOS_ERR_INV_AGC_OBSRX_APD_HIGH_THRESH_PARM | |
MYKONOS_ERR_INV_AGC_OBSRX_APD_LOW_THRESH_PARM | |
MYKONOS_ERR_INV_AGC_OBSRX_HB2_HIGH_THRESH_PARM | |
MYKONOS_ERR_INV_AGC_OBSRX_HB2_LOW_THRESH_PARM | |
MYKONOS_ERR_INV_AGC_OBSRX_HB2_VERY_LOW_THRESH_PARM | |
MYKONOS_ERR_INV_AGC_OBSRX_APD_HIGH_GAIN_STEP_PARM | |
MYKONOS_ERR_INV_AGC_OBSRX_APD_LOW_GAIN_STEP_PARM | |
MYKONOS_ERR_INV_AGC_OBSRX_HB2_HIGH_GAIN_STEP_PARM | |
MYKONOS_ERR_INV_AGC_OBSRX_HB2_LOW_GAIN_STEP_PARM | |
MYKONOS_ERR_INV_AGC_OBSRX_HB2_VERY_LOW_GAIN_STEP_PARM | |
MYKONOS_ERR_INV_AGC_OBSRX_HB2_OVLD_ENABLE | |
MYKONOS_ERR_INV_AGC_OBSRX_HB2_OVLD_DUR_CNT | |
MYKONOS_ERR_INV_AGC_OBSRX_HB2_OVLD_THRESH_CNT |
mykonosErr_t MYKONOS_setupPaProtection | ( | mykonosDevice_t * | device, |
uint16_t | powerThreshold, | ||
uint8_t | attenStepSize, | ||
uint8_t | avgDuration, | ||
uint8_t | stickyFlagEnable, | ||
uint8_t | txAttenControlEnable | ||
) |
Writes Mykonos device registers with settings for the PA Protection block.
This function writes register settings for the Mykonos PA Protection Block. This function does not enable the PA Protection functionality. Note that independent control of PA protection for both Tx channels is not possible. The PA Protection block allows for error flags to go high if the accumulated TX power in the data path exceeds a programmable threshold level based on samples taken in a programmable duration.
Dependencies
device | Pointer to the Mykonos device's data structure |
powerThreshold | PA Protection Threshold sets the power level that, if detected in the TX data path, raises the PA error flags. The range is 0 to 4096. To calculate the required setting for the power threshold: powerThreshold = MAX_DAC_CODE * (10^((txPowerThresh_dBFS/10))) For example: If the required dBFS for the threshold is -10 dBFS, then the powerThreshold passed should be 409. |
attenStepSize | Attenuation Step Size sets the size of the attenuation step when Tx Atten Control is Enabled. The range is 0 to 128 with a resolution is 0.2dB/LSB. |
avgDuration | Averaging Duration for the TX data path power measurement. The range is 0 to 14 specified in number of cycles of the TX IQ Rate. |
stickyFlagEnable | "1" Enables the PA Error Flags to stay high after being triggered, even if the power decreases below threshold. "0" disables this functionality. |
txAttenControlEnable | "1" Enables autonomous attenuation changes in response to PA error flags. "0" disables this functionality. |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_SETUP_PA_PROT_INV_AVG_DURATION | avgDuration parameter invalid (valid 0-15) |
MYKONOS_ERR_SETUP_PA_PROT_INV_ATTEN_STEP | attenStepSize function parameter invalid (valid 0-127) |
mykonosErr_t MYKONOS_setupRxAgc | ( | mykonosDevice_t * | device | ) |
Sets up the device Rx Automatic Gain Control (AGC) registers.
Three data structures (mykonosAgcCfg_t, mykonosPeakDetAgcCfg_t, mykonosPowerMeasAgcCfg_t) must be instantiated prior to calling this function. Valid ranges for data structure members must also be provided.
Dependencies:
device | is structure pointer to the Mykonos data structure containing settings The pointer to the Mykonos AGC data structure containing settings is checked for a null pointer to ensure it has been initialized. If not an error is thrown. |
Returns | MYKONOS_ERR=pass, !MYKONOS_ERR=fail |
MYKONOS_ERR_INV_AGC_RX_STRUCT_INIT | |
MYKONOS_ERR_INV_AGC_RX_PEAK_STRUCT_INIT | |
MYKONOS_ERR_INV_AGC_RX_PWR_STRUCT_INIT | |
MYKONOS_ERR_INV_AGC_RX1_MAX_GAIN_INDEX | |
MYKONOS_ERR_INV_AGC_RX1_MIN_GAIN_INDEX | |
MYKONOS_ERR_INV_AGC_RX2_MAX_GAIN_INDEX | |
MYKONOS_ERR_INV_AGC_RX2_MIN_GAIN_INDEX | |
MYKONOS_ERR_INV_AGC_RX_GAIN_UPDATE_TIME_PARM | |
MYKONOS_ERR_INV_AGC_RX_PEAK_WAIT_TIME_PARM | |
MYKONOS_ERR_INV_AGC_RX_SLOW_LOOP_SETTLING_DELAY | |
MYKONOS_ERR_INV_AGC_PMD_MEAS_DURATION | |
MYKONOS_ERR_INV_AGC_PMD_MEAS_CONFIG | |
MYKONOS_ERR_INV_AGC_RX_LOW_THS_PREV_GAIN_INC | |
MYKONOS_ERR_INV_AGC_RX_PEAK_THRESH_MODE | |
MYKONOS_ERR_INV_AGC_RX_RESET_ON_RX_ENABLE | |
MYKONOS_ERR_INV_AGC_RX_ENABLE_SYNC_PULSE_GAIN_COUNTER | |
MYKONOS_ERR_INV_AGC_RX_PMD_LOWER_HIGH_THRESH | |
MYKONOS_ERR_INV_AGC_RX_PMD_UPPER_LOW_THRESH | |
MYKONOS_ERR_INV_AGC_RX_PMD_LOWER_LOW_THRESH | |
MYKONOS_ERR_INV_AGC_RX_PMD_UPPER_HIGH_THRESH | |
MYKONOS_ERR_INV_AGC_RX_PMD_UPPER_HIGH_GAIN_STEP | |
MYKONOS_ERR_INV_AGC_RX_PMD_LOWER_LOW_GAIN_STEP | |
MYKONOS_ERR_INV_AGC_RX_PMD_UPPER_LOW_GAIN_STEP | |
MYKONOS_ERR_INV_AGC_RX_PMD_UPPER_LOW_GAIN_STEP | |
MYKONOS_ERR_INV_AGC_RX_PKDET_FAST_ATTACK_VALUE | |
MYKONOS_ERR_INV_AGC_RX_APD_HIGH_THRESH_PARM | |
MYKONOS_ERR_INV_AGC_RX_APD_LOW_THRESH_PARM | |
MYKONOS_ERR_INV_AGC_RX_HB2_HIGH_THRESH_PARM | |
MYKONOS_ERR_INV_AGC_RX_HB2_LOW_THRESH_PARM | |
MYKONOS_ERR_INV_AGC_RX_HB2_VERY_LOW_THRESH_PARM | |
MYKONOS_ERR_INV_AGC_RX_APD_HIGH_GAIN_STEP_PARM | |
MYKONOS_ERR_INV_AGC_RX_APD_LOW_GAIN_STEP_PARM | |
MYKONOS_ERR_INV_AGC_RX_HB2_HIGH_GAIN_STEP_PARM | |
MYKONOS_ERR_INV_AGC_RX_HB2_LOW_GAIN_STEP_PARM | |
MYKONOS_ERR_INV_AGC_RX_HB2_VERY_LOW_GAIN_STEP_PARM | |
MYKONOS_ERR_INV_AGC_RX_HB2_OVLD_ENABLE | |
MYKONOS_ERR_INV_AGC_RX_HB2_OVLD_DUR_CNT | |
MYKONOS_ERR_INV_AGC_RX_HB2_OVLD_THRESH_CNT |
mykonosErr_t MYKONOS_setupSerializers | ( | mykonosDevice_t * | device | ) |
Sets up the JESD204B Serializers.
This function uses the Rx framer and ObsRx framer structures to setup the 4 serializer lanes that are shared between the two framers. If the Rx profile is valid the serializer amplitude and preEmphasis are used from the Rx framer. If only the ObsRx profile is valid, the obsRx framer settings are used.
Dependencies
device | Pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_INITSER_INV_VCODIV_PARM | Mykonos CLKPLL has invalid VCO divider, verify CLKPLL config |
MYKONOS_ERR_SER_LANE_CONFLICT_PARM | When both Rx and ObsRx framers are enabled, framers can not share the same physical lane. |
MYKONOS_ERR_SER_INV_REAL_IF_DATA_PARM | Rx Framer M can only = 1 when Real IF mode is enabled |
MYKONOS_ERR_SER_INV_M_PARM | Invalid Rx Framer M (valid 1,2,4) |
MYKONOS_ERR_SER_INV_LANEEN_PARM | Invalid Rx framer serializerLanesEnabled (valid 0-15) |
MYKONOS_ERR_SER_INV_AMP_PARM | Invalid Rx serializer amplitude (valid 0-31) |
MYKONOS_ERR_SER_INV_PREEMP_PARM | Invalid Rx serializer pre-emphesis (valid 0-7) |
MYKONOS_ERR_SER_INV_LANEPN_PARM | Invalid Rx serializer PN invert setting (valid 0-15) |
MYKONOS_ERR_SER_INV_L_PARM | Invalid Rx serializer lanes enabled (must use 1, 2 or 4 lanes) |
MYKONOS_ERR_SER_INV_LANERATE_PARM | Invalid Rx serializer lane rate (valid 614.4Mbps - 6144Mbps) |
MYKONOS_ERR_SER_INV_REAL_IF_DATA_PARM | |
MYKONOS_ERR_SER_INV_LANEEN_PARM | |
MYKONOS_ERR_SER_INV_AMP_PARM | |
MYKONOS_ERR_SER_INV_PREEMP_PARM | |
MYKONOS_ERR_SER_INV_LANEPN_PARM | |
MYKONOS_ERR_SER_INV_L_PARM | |
MYKONOS_ERR_SER_INV_LANERATE_PARM | |
MYKONOS_ERR_SER_LANE_RATE_CONFLICT_PARM | Necessary lane rates for Rx and ObsRx framer can not be obtained with possible divider settings |
MYKONOS_ERR_HS_AND_LANE_RATE_NOT_INTEGER_MULT | HSCLK is not an integer multiple of the lane clock rate |
MYKONOS_ERR_SER_INV_TXSER_DIV_PARM | No valid Tx serializer divider to obtain desired lane rates |
MYKONOS_ERR_INITSER_INV_PROFILE | Rx/ObsRx and sniffer profiles are not valid - can not config serializers |
MYKONOS_ERR_INV_RXFRAMER_PCLKDIV_PARM | Invalid Rx framer PCLK divider |
MYKONOS_ERR_INV_OBSRXFRAMER_PCLKDIV_PARM | Invalid ORx/Sniffer framer PCLK divider |
mykonosErr_t MYKONOS_verifyArmChecksum | ( | mykonosDevice_t * | device | ) |
Verifies the ARM checksum value.
The checksum which is written into the .hex file is verified with the calculated checksum in the Mykonos ARM after the hex file has been loaded
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_verifyDeviceDataStructure | ( | mykonosDevice_t * | device | ) |
Verifies the integrity of the Mykonos device data structure.
The Mykonos device data structure has many pointers to other structures. The main purpose of this function to verify that the necessary pointers within the device data structure have non zero pointers. The focus is on the Rx/Tx/ObsRx profiles and FIR filters where if a channel is disabled, it may be valid for some pointers to be NULL. This function updates device->profileValid to remember which profile pointers are valid. profileValid[3:0] = {SnifferProfileValid, ObsRxProfileValid, RxProfileValid, TxProfileValid};
Dependencies
device | Pointer to Mykonos device data structure containing settings |
mykonosErr_t MYKONOS_verifyProfiles | ( | mykonosDevice_t * | device | ) |
Verifies the init structure profiles are valid combinations.
This function checks that the Rx/Tx/ORx/Sniffer profiles have valid clock rates in order to operate together. Rx/Tx and ORx/Sniffer share a common high speed digital clock. If an invalid combination of profiles is detected, an error will be returned. If a profile in the init structure is unused, the user should zero out all members of that particular profile structure. If a Rx/Tx/ORx/Sniffer profile has an IQ rate = 0, it is assumed that the profile is disabled.
This function uses mykVerifyTxProfile() and mykVerifyRxProfile() as helper functions.
Dependencies
device | Structure pointer to Mykonos device data structure |
MYKONOS_ERR_PROFILES_HSDIGCLK | profiles loaded are not valid |
MYKONOS_ERR_OK | Function completed successfully |
mykonosErr_t MYKONOS_waitArmCmdStatus | ( | mykonosDevice_t * | device, |
uint8_t | opCode, | ||
uint32_t | timeoutMs, | ||
uint8_t * | cmdStatByte | ||
) |
Mykonos ARM command status wait function polls command status until opcode completes.
Dependencies
device | is a pointer to the device settings structure |
opCode | Valid values are even increments from 0-30. The ARM opCode is used to determine which pending bit to wait for |
timeoutMs | conveys the time-out period in milliseconds |
cmdStatByte | returns cmdStatByte[3:1] = error type, cmdStatByte[0] = pending flag for selected opCode |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_ARMCMDSTATUS_NULL_PARM | Function parameter cmdStatByte has NULL pointer |
MYKONOS_ERR_ARMCMDSTATUS_INV_OPCODE_PARM | Invalid ARM opcode (valid 0-30, even numbers only) |
MYKONOS_ERR_ARMCMDSTATUS_ARMERROR | ARM Mailbox error flag for requested opcode returned a nonzero error flag |
MYKONOS_ERR_WAITARMCMDSTATUS_TIMEOUT | Timeout occurred before ARM command completed |
mykonosErr_t MYKONOS_waitForEvent | ( | mykonosDevice_t * | device, |
waitEvent_t | waitEvent, | ||
uint32_t | timeout_us | ||
) |
Performs a blocking wait for a Mykonos calibration or Pll Lock.
Dependencies
device | Pointer to the Mykonos device data structure containing settings |
waitEvent | the enum value of the event to wait for |
timeout_us | If timeout_us time has passed, function will return with an error. |
mykonosErr_t MYKONOS_waitInitCals | ( | mykonosDevice_t * | device, |
uint32_t | timeoutMs, | ||
uint8_t * | errorFlag, | ||
uint8_t * | errorCode | ||
) |
Blocking waits for the Mykonos initialization calibrations to complete.
The *errorFlag and *errorCode parameters are optional. If the pointers are set to null, no values will be returned. If the function returns an error that the init calibration failed, use the MYKONOS_getInitCalStatus() function to get more detailed information about why the init cal failed.
Dependencies
device | A pointer to the device settings structure |
timeoutMs | A timeout value in Ms to wait for the calibrations to complete |
errorFlag | A 3bit error flag that helps identify what went wrong in the ARM. 0=No Error |
errorCode | The value represents the init calibration object ID that caused a failure. |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_WAIT_INITCALS_ARMERROR | ARM returned error unrelated to init cals |
mykonosErr_t MYKONOS_writeArmConfig | ( | mykonosDevice_t * | device, |
uint8_t | objectId, | ||
uint16_t | offset, | ||
uint8_t * | data, | ||
uint8_t | byteCount | ||
) |
Low level helper function used by Mykonos API to write the ARM memory config structures.
Normally this function should not be required to be used directly by the BBIC. This is a helper function used by other Mykonos API commands to write settings into the ARM memory.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
objectId | ARM id of a particular structure or setting in ARM memory |
offset | Byte offset from the start of the objectId's memory location in ARM memory |
data | A byte array containing data to write to the ARM memory buffer. |
byteCount | Number of bytes in the data array (Valid size = 1-255 bytes) |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_WRITEARMCFG_ARMERRFLAG | ARM write config command failed with a nonzero error code |
mykonosErr_t MYKONOS_writeArmMem | ( | mykonosDevice_t * | device, |
uint32_t | address, | ||
uint8_t * | data, | ||
uint32_t | byteCount | ||
) |
Write to the Mykonos ARM program or data memory.
Valid memory addresses are: Program Memory (0x01000000 - 0x01017FFF), Data Memory (0x20000000 - 0x2000FFFF)
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
address | The 32bit ARM address to write to. |
data | Byte(uint8_t) array containing the data to write to the ARM memory. |
byteCount | Number of bytes in the data array. |
MYKONOS_ERR_OK | Function completed successfully |
MYKONOS_ERR_WRITEARMMEM_NULL_PARM | Function parameter data has NULL pointer when byteCount is >0 |
MYKONOS_ERR_WRITEARMMEM_INV_ADDR_PARM | ARM memory address is out of range of valid ARM memory |
mykonosErr_t MYKONOS_writeArmProfile | ( | mykonosDevice_t * | device | ) |
Mykonos ARM configuration write.
Dependencies
device | is a pointer to the device settings structure |
MYKONOS_ERR_OK | Function completed successfully |