no-OS
|
Contains macro definitions and function prototypes for mykonos_gpio.c. More...
Go to the source code of this file.
Functions | |
mykonosGpioErr_t | MYKONOS_setGpioDrv (mykonosDevice_t *device, uint32_t gpioDrv) |
This function sets the drive strength for the required GPIOs. More... | |
mykonosGpioErr_t | MYKONOS_getGpioDrv (mykonosDevice_t *device, uint32_t *gpioDrv) |
This function gets the GPIOs drive strength. More... | |
mykonosGpioErr_t | MYKONOS_setGpioSlewRate (mykonosDevice_t *device, mykonosGpioSelect_t gpioSelect, mykonosGpioSlewRate_t slewRate) |
This function sets the slew rate for the required GPIOs. More... | |
mykonosGpioErr_t | MYKONOS_getGpioSlewRate (mykonosDevice_t *device, mykonosGpioSelect_t gpioSelect, mykonosGpioSlewRate_t *slewRate) |
This function gets the GPIO slew rate setting. More... | |
mykonosGpioErr_t | MYKONOS_setCmosDrv (mykonosDevice_t *device, mykonosCmosPadDrvStr_t spiDrv) |
This function sets the CMOS output driver. More... | |
mykonosGpioErr_t | MYKONOS_getCmosDrv (mykonosDevice_t *device, mykonosCmosPadDrvStr_t *spiDrv) |
This function gets the programmed CMOS output driver. More... | |
mykonosGpioErr_t | MYKONOS_setGpioMonitorOut (mykonosDevice_t *device, uint8_t monitorIndex, uint8_t monitorMask) |
This API function configures the monitor output function for the GPIOs. More... | |
mykonosGpioErr_t | MYKONOS_getGpioMonitorOut (mykonosDevice_t *device, uint8_t *monitorIndex, uint8_t *monitorMask) |
This API function reads the GPIO monitor index from Mykonos. More... | |
mykonosGpioErr_t | MYKONOS_setRx1GainCtrlPin (mykonosDevice_t *device, uint8_t incStep, uint8_t decStep, mykonosGpioSelect_t rx1GainIncPin, mykonosGpioSelect_t rx1GainDecPin, uint8_t enable) |
This API function configures the GPIO inputs for controlling RX gain. More... | |
mykonosGpioErr_t | MYKONOS_setRx2GainCtrlPin (mykonosDevice_t *device, uint8_t incStep, uint8_t decStep, mykonosGpioSelect_t rx2GainIncPin, mykonosGpioSelect_t rx2GainDecPin, uint8_t enable) |
This API function configures the GPIO inputs for controlling RX gain. More... | |
mykonosGpioErr_t | MYKONOS_getRx1GainCtrlPin (mykonosDevice_t *device, uint8_t *incStep, uint8_t *decStep, mykonosGpioSelect_t *rx1GainIncPin, mykonosGpioSelect_t *rx1GainDecPin, uint8_t *enable) |
This API function returns the configuration RX1 gain Pin control. More... | |
mykonosGpioErr_t | MYKONOS_getRx2GainCtrlPin (mykonosDevice_t *device, uint8_t *incStep, uint8_t *decStep, mykonosGpioSelect_t *rx2GainIncPin, mykonosGpioSelect_t *rx2GainDecPin, uint8_t *enable) |
This API function returns the configuration RX2 gain Pin control. More... | |
mykonosGpioErr_t | MYKONOS_setRxHybridGainChangePin (mykonosDevice_t *device, mykonosGpioSelect_t rx1GainChangePin, mykonosGpioSelect_t rx2GainChangePin) |
This API function set the pins for hybrid gain control. More... | |
mykonosGpioErr_t | MYKONOS_getRxHybridGainChangePin (mykonosDevice_t *device, mykonosGpioSelect_t *rx1GainChangePin, mykonosGpioSelect_t *rx2GainChangePin) |
This API function gets the pin configuration for hybrid gain control of RX1 and RX2. More... | |
mykonosGpioErr_t | MYKONOS_setObsRxHybridGainChangePin (mykonosDevice_t *device, mykonosGpioSelect_t obsRxGainChangePin) |
This API function set the pins for hybrid gain control. More... | |
mykonosGpioErr_t | MYKONOS_getObsRxHybridGainChangePin (mykonosDevice_t *device, mykonosGpioSelect_t *obsRxGainChangePin) |
This API function gets the pin configuration for hybrid gain control of observation channel. More... | |
mykonosGpioErr_t | MYKONOS_setRxAgcEnSyncPin (mykonosDevice_t *device, mykonosGpioSelect_t rx1AgcSyncPin, mykonosGpioSelect_t rx2AgcSyncPin) |
This API function set the pins for sync AGC gain control. More... | |
mykonosGpioErr_t | MYKONOS_getRxAgcEnSyncPin (mykonosDevice_t *device, mykonosGpioSelect_t *rx1AgcSyncPin, mykonosGpioSelect_t *rx2AgcSyncPin) |
This API function gets the GPIO pin configuration for AGC gain sync control of RX1 and RX2. More... | |
mykonosGpioErr_t | MYKONOS_setObsRxAgcEnSyncPin (mykonosDevice_t *device, mykonosGpioSelect_t obsRxAgcSyncPin) |
This API function set the pins for AGC gain Sync control. More... | |
mykonosGpioErr_t | MYKONOS_getObsRxAgcEnSyncPin (mykonosDevice_t *device, mykonosGpioSelect_t *obsRxAgcSyncPin) |
This API function gets the pin configuration for AGC Sync gain control of observation channel. More... | |
mykonosGpioErr_t | MYKONOS_setTx1AttenCtrlPin (mykonosDevice_t *device, uint8_t stepSize, mykonosGpioSelect_t tx1AttenIncPin, mykonosGpioSelect_t tx1AttenDecPin, uint8_t enable, uint8_t useTx1ForTx2) |
This API function configures the GPIO inputs for controlling Tx attenuation settings. More... | |
mykonosGpioErr_t | MYKONOS_setTx2AttenCtrlPin (mykonosDevice_t *device, uint8_t stepSize, mykonosGpioSelect_t tx2AttenIncPin, mykonosGpioSelect_t tx2AttenDecPin, uint8_t enable) |
This API function configures the GPIO inputs for controlling Tx attenuation settings. More... | |
mykonosGpioErr_t | MYKONOS_getTx1AttenCtrlPin (mykonosDevice_t *device, uint8_t *stepSize, mykonosGpioSelect_t *tx1AttenIncPin, mykonosGpioSelect_t *tx1AttenDecPin, uint8_t *enable, uint8_t *useTx1ForTx2) |
This API function returns the configuration TX1 attenuation Pin control. More... | |
mykonosGpioErr_t | MYKONOS_getTx2AttenCtrlPin (mykonosDevice_t *device, uint8_t *stepSize, mykonosGpioSelect_t *tx2AttenIncPin, mykonosGpioSelect_t *tx2AttenDecPin, uint8_t *enable, uint8_t *useTx1ForTx2) |
This API function returns the configuration TX2 attenuation Pin control. More... | |
mykonosGpioErr_t | MYKONOS_spi2GpioSetup (mykonosDevice_t *device, uint8_t enable, uint8_t updateTxAttenPinSelect) |
This API function configures and enables the secondary SPI port. More... | |
mykonosGpioErr_t | MYKONOS_setGpioPinLevel (mykonosDevice_t *device, uint32_t gpioPinLevel) |
Sets the Mykonos low voltage GPIO output pins level. More... | |
mykonosGpioErr_t | MYKONOS_getGpioPinLevel (mykonosDevice_t *device, uint32_t *gpioPinLevel) |
Reads the Mykonos low voltage GPIO pin levels and returns their contents in a single 32-bit word. More... | |
mykonosGpioErr_t | MYKONOS_getGpioSetLevel (mykonosDevice_t *device, uint32_t *gpioPinSetLevel) |
Reads the Mykonos GPIO pin output levels for BITBANG mode. More... | |
mykonosGpioErr_t | MYKONOS_setRxGainCompensation (mykonosDevice_t *device, mykonosGainComp_t *gainComp, uint8_t enable) |
Gain compensation enable and setup function. More... | |
mykonosGpioErr_t | MYKONOS_getRxGainCompensation (mykonosDevice_t *device, mykonosGainComp_t *gainComp, uint8_t *enabled) |
Get gain compensation setup and enabled function. More... | |
mykonosGpioErr_t | MYKONOS_setObsRxGainCompensation (mykonosDevice_t *device, mykonosObsRxGainComp_t *gainComp, uint8_t enable) |
Gain compensation enable and setup function for the observation channel. More... | |
mykonosGpioErr_t | MYKONOS_getObsRxGainCompensation (mykonosDevice_t *device, mykonosObsRxGainComp_t *gainComp, uint8_t *enabled) |
Get gain compensation setup and enabled function for the observation channel. More... | |
mykonosGpioErr_t | MYKONOS_setRxSlicerCtrl (mykonosDevice_t *device, uint8_t slicerStep, mykonosRxSlicer_t rx1Pins, mykonosRxSlicer_t rx2Pins, uint8_t enable) |
Slicer control over GPIO inputs. More... | |
mykonosGpioErr_t | MYKONOS_getRxSlicerCtrl (mykonosDevice_t *device, uint8_t *slicerStep, mykonosRxSlicer_t *rx1Pins, mykonosRxSlicer_t *rx2Pins, uint8_t *enable) |
This function will get the programmed Slicer control for Rx1 and Rx2 channels. More... | |
mykonosGpioErr_t | MYKONOS_setObsRxSlicerCtrl (mykonosDevice_t *device, uint8_t slicerStep, mykonosObsRxSlicer_t obsRxPins, uint8_t enable) |
Slicer control over GPIO inputs for the observation channel. More... | |
mykonosGpioErr_t | MYKONOS_getObsRxSlicerCtrl (mykonosDevice_t *device, uint8_t *slicerStep, mykonosObsRxSlicer_t *obsRxPins, uint8_t *enable) |
This function will get the programmed Slicer control for observation channel. More... | |
mykonosGpioErr_t | MYKONOS_setFloatPointFrmt (mykonosDevice_t *device, mykonosFloatPntFrmt_t *floatFrmt) |
Floating point formatter enable and setup function. More... | |
mykonosGpioErr_t | MYKONOS_getFloatPointFrmt (mykonosDevice_t *device, mykonosFloatPntFrmt_t *floatFrmt) |
Floating point formatter setup function. More... | |
mykonosGpioErr_t | MYKONOS_setRxEnFloatPntFrmt (mykonosDevice_t *device, uint8_t rx1Att, uint8_t rx2Att, uint8_t enable) |
Floating point formatter enable/disable Rx1 and Rx2 function. More... | |
mykonosGpioErr_t | MYKONOS_getRxEnFloatPntFrmt (mykonosDevice_t *device, uint8_t *rx1Att, uint8_t *rx2Att, uint8_t *enable) |
Floating point formatter setup function. More... | |
mykonosGpioErr_t | MYKONOS_setOrxEnFloatPntFrmt (mykonosDevice_t *device, uint8_t orxAtt, uint8_t enable) |
Floating point formatter enable function for ORx channel. More... | |
mykonosGpioErr_t | MYKONOS_getOrxEnFloatPntFrmt (mykonosDevice_t *device, uint8_t *orxAtt, uint8_t *enable) |
Floating point formatter enable and setup function. More... | |
mykonosGpioErr_t | MYKONOS_configGpInterrupt (mykonosDevice_t *device, uint16_t gpMask) |
Sets the General Purpose (GP) interrupt register bit mask to enable interrupt sources to assert the GP Interrupt pin. More... | |
mykonosGpioErr_t | MYKONOS_readGpInterruptStatus (mykonosDevice_t *device, uint16_t *status) |
Reads the General Purpose (GP) interrupt status to determine what caused the GP Interrupt pin to assert. More... | |
mykonosGpioErr_t | MYKONOS_setArmGpioPins (mykonosDevice_t *device) |
Sets the input and output GPIO pin selections for ARM related signals. More... | |
mykonosGpioErr_t | MYKONOS_setupAuxAdcs (mykonosDevice_t *device, uint8_t adcDecimation, uint8_t enable) |
Sets up the auxiliary ADC. More... | |
mykonosGpioErr_t | MYKONOS_setAuxAdcChannel (mykonosDevice_t *device, mykonosAuxAdcChannels_t auxAdcChannel) |
Sets the selected channel of the auxiliary ADC. More... | |
mykonosGpioErr_t | MYKONOS_readAuxAdc (mykonosDevice_t *device, uint16_t *adcCode) |
Reads from the selected channel of the auxiliary ADC. More... | |
mykonosGpioErr_t | MYKONOS_setupAuxDacs (mykonosDevice_t *device) |
Sets up the 10 AuxDACs on the Mykonos device. More... | |
mykonosGpioErr_t | MYKONOS_writeAuxDac (mykonosDevice_t *device, uint8_t auxDacIndex, uint16_t auxDacCode) |
Writes the current AuxDAC code for a particular AuxDAC. More... | |
mykonosGpioErr_t | MYKONOS_setupGpio3v3 (mykonosDevice_t *device) |
Sets the Mykonos 3.3 VDC GPIO configuration registers. More... | |
mykonosGpioErr_t | MYKONOS_setGpio3v3PinLevel (mykonosDevice_t *device, uint16_t gpio3v3PinLevel) |
If the GPIO3v3 pins are setup for BITBANG mode, this function sets the output pin levels per pin. More... | |
mykonosGpioErr_t | MYKONOS_getGpio3v3SetLevel (mykonosDevice_t *device, uint16_t *gpio3v3SetLevel) |
Reads the Mykonos 3.3 VDC GPIO pin output levels for BITBANG mode. More... | |
mykonosGpioErr_t | MYKONOS_getGpio3v3PinLevel (mykonosDevice_t *device, uint16_t *gpio3v3PinLevel) |
Reads the Mykonos 3.3 VDC GPIO pin levels for BITBANG mode. More... | |
mykonosGpioErr_t | MYKONOS_setGpio3v3Oe (mykonosDevice_t *device, uint16_t gpio3v3OutEn) |
This function sets the Pin direction control for the Mykonos 3.3 VDC GPIO. More... | |
mykonosGpioErr_t | MYKONOS_getGpio3v3Oe (mykonosDevice_t *device, uint16_t *gpio3v3OutEn) |
Reads the Mykonos 3.3 VDC GPIO pin direction. More... | |
mykonosGpioErr_t | MYKONOS_setGpio3v3SourceCtrl (mykonosDevice_t *device, uint16_t gpio3v3SrcCtrl) |
Sets the Mykonos GPIO 3.3 VDC source control for different GPIO fucntionality. More... | |
mykonosGpioErr_t | MYKONOS_getGpio3v3SourceCtrl (mykonosDevice_t *device, uint16_t *gpio3v3SrcCtrl) |
Reads the Mykonos 3v3 GPIO source control for different GPIO functionality. More... | |
mykonosGpioErr_t | MYKONOS_setupGpio (mykonosDevice_t *device) |
Sets the Mykonos low voltage GPIO configuration registers. More... | |
mykonosGpioErr_t | MYKONOS_setGpioOe (mykonosDevice_t *device, uint32_t gpioOutEn, uint32_t gpioUsedMask) |
Sets the Mykonos low voltage GPIO output pins direction. More... | |
mykonosGpioErr_t | MYKONOS_getGpioOe (mykonosDevice_t *device, uint32_t *gpioOutEn) |
Gets the Mykonos low voltage GPIO output pins direction. More... | |
mykonosGpioErr_t | MYKONOS_setGpioSourceCtrl (mykonosDevice_t *device, uint32_t gpioSrcCtrl) |
Sets the Mykonos GPIO source control for different GPIO functionality. More... | |
mykonosGpioErr_t | MYKONOS_getGpioSourceCtrl (mykonosDevice_t *device, uint32_t *gpioSrcCtrl) |
Reads the Mykonos GPIO source control for different GPIO functionality. More... | |
mykonosGpioErr_t | MYKONOS_setupTempSensor (mykonosDevice_t *device, mykonosTempSensorConfig_t *tempSensor) |
Sets up the Temperature Sensor. More... | |
mykonosGpioErr_t | MYKONOS_getTempSensorConfig (mykonosDevice_t *device, mykonosTempSensorConfig_t *tempSensor) |
Reads from the Temperature Sensor registers and populates device data structure. More... | |
mykonosGpioErr_t | MYKONOS_startTempMeasurement (mykonosDevice_t *device) |
Initiates temperature measurement. More... | |
mykonosGpioErr_t | MYKONOS_readTempSensor (mykonosDevice_t *device, mykonosTempSensorStatus_t *tempStatus) |
Reads temperature code and statuses from the Temperature Sensor registers. More... | |
const char * | getGpioMykonosErrorMessage (mykonosGpioErr_t errorCode) |
Helper function for return of character string based on 32-bit mykonosGpioErr_t enum value. More... | |
Contains macro definitions and function prototypes for mykonos_gpio.c.
Mykonos API version: 1.5.2.3566
const char* getGpioMykonosErrorMessage | ( | mykonosGpioErr_t | errorCode | ) |
Helper function for return of character string based on 32-bit mykonosGpioErr_t enum value.
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. 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 |
mykonosGpioErr_t MYKONOS_configGpInterrupt | ( | mykonosDevice_t * | device, |
uint16_t | gpMask | ||
) |
Sets the General Purpose (GP) interrupt register bit mask to enable interrupt sources to assert the GP Interrupt pin.
Mykonos has a single output pin called General Purpose Interrupt that asserts to a logic high level when certain events occur. The events that cause the GP Interrupt pin to assert are user selectable by setting the gpMask parameter in this function. Device default is mask = x1FF = ignore all events. The ARM Error interrupt can not be ignored and can always assert the GP interrupt pin.
gpMask | Bit description |
---|---|
[0] | TXPLL LOCK - 0 = allow PLL unlocking to assert GP Interrupt pin, 1 = ignore TXPLL LOCK |
[1] | RXPLL LOCK - 0 = allow PLL unlocking to assert GP Interrupt pin, 1 = ignore RXPLL LOCK |
[2] | SNIFFER PLL LOCK - 0 = allow PLL unlocking to assert GP Interrupt pin, 1 = ignore SNIFFER PLL LOCK |
[3] | CALIBRATION PLL LOCK - 0 = allow PLL unlocking to assert GP Interrupt pin, 1 = ignore CALIBRATION PLL LOCK |
[4] | CLKPLL LOCK - 0 = allow PLL unlocking to assert GP Interrupt pin, 1 = ignore CLKPLL LOCK |
[5] | 0 = Allow JESD204 deframer interrupt to assert GP Interrupt pin, 1 = ignore JESD204 deframer interrupt |
[6] | Tx1 PA protection - 0 = allow Tx1 PA protection event to assert GP Interrupt pin, 1 = ignore Tx1 PA protection |
[7] | Tx2 PA protection - 0 = allow Tx2 PA protection event to assert GP Interrupt pin, 1 = ignore Tx2 PA protection |
[8] | Mykonos ARM Watchdog - 0 = allow Mykonos ARM Watchdog timeout to assert GP Interrupt pin, 1 = ignore Watchdog timeout event |
[15-9] | Reserved for future use |
Dependencies
device | Pointer to the device settings structure |
gpMask | Value is passed to enable one or more general purpose interrupt sources (1=ignore source, 0 = enable source interrupt to GP Interrupt pin) |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_INV_GP_INT_MASK_PARM | if invalid interrupt mask is passed |
mykonosGpioErr_t MYKONOS_getCmosDrv | ( | mykonosDevice_t * | device, |
mykonosCmosPadDrvStr_t * | cmosDrv | ||
) |
This function gets the programmed CMOS output driver.
Dependencies
device | is a pointer to the device settings structure |
cmosDrv | will be the programmed drive for the CMOS output driver |
MYKONOS_ERR_CMOS_DRV_NULL_PARAM | Null parameter passed to the function |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_getFloatPointFrmt | ( | mykonosDevice_t * | device, |
mykonosFloatPntFrmt_t * | floatFrmt | ||
) |
Floating point formatter setup function.
The floating point formatter block is a function that works in conjunction with the gain compensating block, as the gain compensation requires increased dynamic range which increases the bit-width in the digital data-path.
Dependencies
device | is a pointer to the device settings structure |
floatFrmt | which is a mykonosFloatPntFrmt_t structure. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_FLOATFRMT_NULL_STRUCT | floating point formatter structure floatFrmt not initialized |
mykonosGpioErr_t MYKONOS_getGpio3v3Oe | ( | mykonosDevice_t * | device, |
uint16_t * | gpio3v3OutEn | ||
) |
Reads the Mykonos 3.3 VDC GPIO pin direction.
Dependencies
device | is a pointer to the device settings structure |
gpio3v3OutEn | is a unit16_t pointer which will contain the output enable parameter, this will be a bit field, if a bit is set then the corresponding GPIO pin is an output, if the bit is not set then the corresponding pin is an input |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_GPIO3V3OUTEN_NULL_PARM | gpio3v3OutEn pointer is NULL in function parameter |
mykonosGpioErr_t MYKONOS_getGpio3v3PinLevel | ( | mykonosDevice_t * | device, |
uint16_t * | gpio3v3PinLevel | ||
) |
Reads the Mykonos 3.3 VDC GPIO pin levels for BITBANG mode.
Note: this function is only capable of reading back pin levels for the 3.3v pins set to be inputs. Any pins set to be a GPIO output will read back as zero.
Dependencies
device | is a pointer to the device settings structure |
gpio3v3PinLevel | is a unit16_t pointer which contains the level of each GPIO3V3 pin that is defined as an input |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_GETGPIO3V3SPI_NULL_PARM | gpio3v3PinLevel pointer is NULL in function parameter |
mykonosGpioErr_t MYKONOS_getGpio3v3SetLevel | ( | mykonosDevice_t * | device, |
uint16_t * | gpio3v3SetLevel | ||
) |
Reads the Mykonos 3.3 VDC GPIO pin output levels for BITBANG mode.
This function allows reading the value that the 3.3v GPIO output pins are set to drive out the pins.
Dependencies
device | is a pointer to the device settings structure |
gpio3v3SetLevel | is a unit16_t pointer which contains the level of each GPIO3V3 pin (bit per pin) |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_GETGPIO3V3OUT_NULL_PARM | gpio3v3SetLevel pointer is NULL in function parameter |
mykonosGpioErr_t MYKONOS_getGpio3v3SourceCtrl | ( | mykonosDevice_t * | device, |
uint16_t * | gpio3v3SrcCtrl | ||
) |
Reads the Mykonos 3v3 GPIO source control for different GPIO functionality.
Dependencies
device | is a pointer to the device settings structure |
gpio3v3SrcCtrl | nibble based source control, this is a 12 bit containing 3 nibbles that will be set the source control. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_getGpioDrv | ( | mykonosDevice_t * | device, |
uint32_t * | gpioDrv | ||
) |
This function gets the GPIOs drive strength.
This function will get the programmed drive strength for all the GPIOs
Dependencies
device | is a pointer to the device settings structure. |
gpioDrv | will contain the current GPIOs drive strength setting. |
MYKONOS_ERR_GETGPIODRV_NULL_PARAM | null parameter passed to the function. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_getGpioMonitorOut | ( | mykonosDevice_t * | device, |
uint8_t * | monitorIndex, | ||
uint8_t * | monitorMask | ||
) |
This API function reads the GPIO monitor index from Mykonos.
The monitor outputs are grouped in two set of nibbles, the user can set individual nibbles for having the monitor output function, this nibbles will output the monitor output as per the index set.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
monitorIndex | which will be the index at which the outputs are set to. |
monitorMask | which will be enable the monitor function. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_GETGPIOMON_INDEX_NULL_PARM | if the monitorIndex is null. |
MYKONOS_ERR_GETGPIOMON_MONITORMASK_NULL_PARM | if the monitorMask is null. |
mykonosGpioErr_t MYKONOS_getGpioOe | ( | mykonosDevice_t * | device, |
uint32_t * | gpioOutEn | ||
) |
Gets the Mykonos low voltage GPIO output pins direction.
This function will get the GPIO direction currently set in the device, the direction can be either output or input. The return gpioOutEn function parameter returns a bit per GPIO pin. 1 = output from the Mykonos Device, 0 = input into the Mykonos device.
Dependencies
device | is a pointer to the device settings structure |
*gpioOutEn | a pointer to the data to be returned with the output enable reading |
gpioOutEn[bit] | GPIO[bit] direction |
---|---|
0 | input |
1 | output |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_GETGPIO_OE_NULL_PARM | gpioOutEn function parameter is NULL |
mykonosGpioErr_t MYKONOS_getGpioPinLevel | ( | mykonosDevice_t * | device, |
uint32_t * | gpioPinLevel | ||
) |
Reads the Mykonos low voltage GPIO pin levels and returns their contents in a single 32-bit word.
The GPIO pins that are set to be inputs in BITBANG mode will read back and be returned in the gpioPinLevel parameter. The return value is a bit per pin. GPIO 0 returns on bit 0 of the gpioPinLevel parameter. A logic low level returns a 0, a logic high level returns a 1.
Dependencies
device | is a pointer to the device settings structure |
gpioPinLevel | Input Gpio pin levels read back on the pins assigned as inputs (bit per pin) |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_READGPIOSPI_NULL_PARM | The pointer passed for gpioPinLevel parameter is NULL |
mykonosGpioErr_t MYKONOS_getGpioSetLevel | ( | mykonosDevice_t * | device, |
uint32_t * | gpioPinSetLevel | ||
) |
Reads the Mykonos GPIO pin output levels for BITBANG mode.
This function allows reading the value that the GPIO output pins are set to drive out the pins.
Dependencies
device | is a pointer to the device settings structure |
gpioPinSetLevel | is a unit32_t pointer which contains the level of each GPIO pin (bit per pin) |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_GETGPIOSETLEVEL_NULL_PARM | gpioPinSetLevel pointer is NULL in function parameter |
mykonosGpioErr_t MYKONOS_getGpioSlewRate | ( | mykonosDevice_t * | device, |
mykonosGpioSelect_t | gpioSelect, | ||
mykonosGpioSlewRate_t * | slewRate | ||
) |
This function gets the GPIO slew rate setting.
This function will get the programmed slew rate for the GPIO given by slewRateGpio.
Dependencies
device | is a pointer to the device settings structure. |
gpioSelect | GPIO selection for getting the slew rate setting. |
slewRate | will contain the GPIO slew rate setting. |
MYKONOS_ERR_GPIO_GETSLEW_NULL_PARAM | null parameter passed to the function. |
MYKONOS_ERR_GPIO_SLEW_RATE_INV_PARAM | GPIO out of range- valid GPIOs are in the range 0x00000 to 0x7FFFF. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_getGpioSourceCtrl | ( | mykonosDevice_t * | device, |
uint32_t * | gpioSrcCtrl | ||
) |
Reads the Mykonos GPIO source control for different GPIO functionality.
Dependencies
device | is a pointer to the device settings structure |
gpioSrcCtrl | nibble based source control, this is a 32 bit containing 5 nibbles that will be set the source control. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_getObsRxAgcEnSyncPin | ( | mykonosDevice_t * | device, |
mykonosGpioSelect_t * | obsRxAgcSyncPin | ||
) |
This API function gets the pin configuration for AGC Sync gain control of observation channel.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
obsRxAgcSyncPin | Will return the GPIO pin used for observation channel AGC gain sync control, |
MYKONOS_ERR_GPIO_AGC_SYNC_ORX_PIN_NULL_PARM | if a null value has been passed to obsRxAgcSyncPin |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_getObsRxGainCompensation | ( | mykonosDevice_t * | device, |
mykonosObsRxGainComp_t * | gainComp, | ||
uint8_t * | enabled | ||
) |
Get gain compensation setup and enabled function for the observation channel.
The gain compensation block is a function that compensates for the attenuation in the internal attenuator for the observation channels. This function will get the current setup and the enable state of the block.
Dependencies
device | is a pointer to the device settings structure |
gainComp | pointer to a mykonosObsRxGainComp_t structure, will held the current device gain compensation settings. |
enabled | pointer this parameter will contain the enable state of the gain compensation block. enabled = 1 disabled = 0 |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_OBS_RX_GAINCOMP_NULL_STRUCT | observation channel gain compensation structure gainComp is not initialised |
MYKONOS_ERR_OBS_RX_GAINCOMP_EN_NULL_PARAM | enabled is null pointer for the parameter passed |
mykonosGpioErr_t MYKONOS_getObsRxHybridGainChangePin | ( | mykonosDevice_t * | device, |
mykonosGpioSelect_t * | obsRxGainChangePin | ||
) |
This API function gets the pin configuration for hybrid gain control of observation channel.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
obsRxGainChangePin | Will return the GPIO pin used for observation channel in hybrid gain control. |
MYKONOS_ERR_GPIO_HYBRID_ORX_PIN_NULL_PARM | if a null value has been passed to obsRxGainChangePin |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_getObsRxSlicerCtrl | ( | mykonosDevice_t * | device, |
uint8_t * | slicerStep, | ||
mykonosObsRxSlicer_t * | obsRxPins, | ||
uint8_t * | enable | ||
) |
This function will get the programmed Slicer control for observation channel.
Dependencies
device | is a pointer to the device settings structure |
slicerStep | will contain the configured step size |
obsRxPins | will contain the configured GPIO combination |
enable | will contain the programmed enable setting |
MYKONOS_ERR_SLICER_OBS_RXPIN_NULL_PARM | obsRxPins is null pointer for the passed parameter |
MYKONOS_ERR_SLICER_OBS_RX_STEP_NULL_PARM | slicerStep is null pointer for the passed parameter |
MYKONOS_ERR_SLICER_OBS_RX_EN_NULL_PARM,enable | is null pointer for the passed parameter |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_getOrxEnFloatPntFrmt | ( | mykonosDevice_t * | device, |
uint8_t * | orxAtt, | ||
uint8_t * | enable | ||
) |
Floating point formatter enable and setup function.
The floating point formatter block is a function that works in conjunction with the gain compensating block, as the gain compensation requires increased dynamic range (total gain range on AD9371 is 42dB) which increases the bitwidth in the digital datapath.
Dependencies
device | is a pointer to the device settings structure |
orxAtt | this parameter sets the integer data attenuation for the ORx channel in 6dB steps to enable the entire data range to be represented in the selected floating point format. |
enable | this parameter enables or disables the gain compensation block. enable = 1 disable = 0 |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_FLOATFRMT_NULL_ORXATT | null pointer passed for orxAtt |
MYKONOS_ERR_FLOATFRMT_NULL_ORXENABLE | null pointer passed for enable |
mykonosGpioErr_t MYKONOS_getRx1GainCtrlPin | ( | mykonosDevice_t * | device, |
uint8_t * | incStep, | ||
uint8_t * | decStep, | ||
mykonosGpioSelect_t * | rx1GainIncPin, | ||
mykonosGpioSelect_t * | rx1GainDecPin, | ||
uint8_t * | enable | ||
) |
This API function returns the configuration RX1 gain Pin control.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
incStep | will contain the step that is used for increment. |
decStep | will contain the step that is used for decrement. |
rx1GainIncPin | this will have the pin used for increment. |
rx1GainDecPin | this will have the pin used for decrement. |
enable | will contain the enable status for this channel if it is set to 1 then this function is enable for this channel, if it is 0 it is not enable |
MYKONOS_ERR_GETRX1PIN_INCSTEP_NULL_PARM | if a null value has been passed to incStep |
MYKONOS_ERR_GETRX1PIN_DECSTEP_NULL_PARM | if a null value has been passed to decStep |
MYKONOS_ERR_GETRX1PIN_INCPIN_NULL_PARM | if a null value has been passed to rx1GainIncPin |
MYKONOS_ERR_GETRX1PIN_DECPIN_NULL_PARM | if a null value has been passed to rx1GainDecPin |
MYKONOS_ERR_GETRX1PIN_EN_NULL_PARM | if a null value has been passed to enable |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_getRx2GainCtrlPin | ( | mykonosDevice_t * | device, |
uint8_t * | incStep, | ||
uint8_t * | decStep, | ||
mykonosGpioSelect_t * | rx2GainIncPin, | ||
mykonosGpioSelect_t * | rx2GainDecPin, | ||
uint8_t * | enable | ||
) |
This API function returns the configuration RX2 gain Pin control.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
incStep | will contain the step that is used for increment. |
decStep | will contain the step that is used for decrement. |
rx2GainIncPin | this will have the pin used for increment. |
rx2GainDecPin | this will have the pin used for decrement. |
enable | will contain the enable status for this channel if it is set to 1 then this function is enable for this channel, if it is 0 it is not enable |
MYKONOS_ERR_GETRX2PIN_INCSTEP_NULL_PARM | if a null value has been passed to incStep |
MYKONOS_ERR_GETRX2PIN_DECSTEP_NULL_PARM | if a null value has been passed to decStep |
MYKONOS_ERR_GETRX2PIN_INCPIN_NULL_PARM | if a null value has been passed to rx1GainIncPin |
MYKONOS_ERR_GETRX2PIN_DECPIN_NULL_PARM | if a null value has been passed to rx1GainDecPin |
MYKONOS_ERR_GETRX2PIN_EN_NULL_PARM | if a null value has been passed to enable |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_getRxAgcEnSyncPin | ( | mykonosDevice_t * | device, |
mykonosGpioSelect_t * | rx1AgcSyncPin, | ||
mykonosGpioSelect_t * | rx2AgcSyncPin | ||
) |
This API function gets the GPIO pin configuration for AGC gain sync control of RX1 and RX2.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
rx1AgcSyncPin | Will return the GPIO pin used for RX1 channel AGC gain sync control, |
rx2AgcSyncPin | Will return the GPIO pin used for RX2 channel AGC gain sync control, |
MYKONOS_ERR_GPIO_AGC_SYNC_RX1_PIN_NULL_PARM | if a null value has been passed to rx1AgcSyncPin |
MYKONOS_ERR_GPIO_AGC_SYNC_RX2_PIN_NULL_PARM | if a null value has been passed to rx2AgcSyncPin |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_getRxEnFloatPntFrmt | ( | mykonosDevice_t * | device, |
uint8_t * | rx1Att, | ||
uint8_t * | rx2Att, | ||
uint8_t * | enable | ||
) |
Floating point formatter setup function.
The floating point formatter block is a function that works in conjunction with the gain compensating block, as the gain compensation requires increased dynamic range (total gain range on AD9371 is 42dB) which increases the bitwidth in the digital datapath.
Dependencies
device | is a pointer to the device settings structure |
rx1Att | this parameter sets the integer data attenuation for the Rx1 channel in 6dB steps to enable the entire data range to be represented in the selected floating point format. |
rx2Att | this parameter sets the integer data attenuation for the Rx2 channel in 6dB steps to enable the entire data range to be represented in the selected floating point format. |
enable | this parameter enables or disables the gain compensation block. enable = 1 disable = 0 |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_FLOATFRMT_NULL_RX1ATT | null pointer passed for rx1 attenuation in MYKONOS_setRxEnFloatPntFrmt() |
MYKONOS_ERR_FLOATFRMT_NULL_RX2ATT | null pointer passed for rx2 attenuation in MYKONOS_setRxEnFloatPntFrmt() |
MYKONOS_ERR_FLOATFRMT_NULL_ENABLE | null pointer passed for enable in MYKONOS_setRxEnFloatPntFrmt() |
mykonosGpioErr_t MYKONOS_getRxGainCompensation | ( | mykonosDevice_t * | device, |
mykonosGainComp_t * | gainComp, | ||
uint8_t * | enabled | ||
) |
Get gain compensation setup and enabled function.
The gain compensation block is a function that compensates for the attenuation in the internal attenuator for the Rx channels. This function will get the current setup and the enable state of the block.
Dependencies
device | is a pointer to the device settings structure |
gainComp | pointer to a mykonosGainComp_t structure, will held the current device gain compensation settings. |
enabled | pointer this parameter will contain the enable state of the gain compensation block. enabled = 1 disabled = 0 |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_GAINCOMP_NULL_STRUCT | gain compensation structure gainComp is not initialised |
MYKONOS_ERR_GAINCOMP_EN_NULL_PARM | enable is null pointer for the passed parameter |
mykonosGpioErr_t MYKONOS_getRxHybridGainChangePin | ( | mykonosDevice_t * | device, |
mykonosGpioSelect_t * | rx1GainChangePin, | ||
mykonosGpioSelect_t * | rx2GainChangePin | ||
) |
This API function gets the pin configuration for hybrid gain control of RX1 and RX2.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
rx1GainChangePin | Will return the GPIO pin used for Rx1 in hybrid gain control. |
rx2GainChangePin | Will return the GPIO pin used for Rx2 in hybrid gain control. |
MYKONOS_ERR_GPIO_HYBRID_RX1_PIN_NULL_PARM | if a null value has been passed to rx1GainChangePin |
MYKONOS_ERR_GPIO_HYBRID_RX2_PIN_NULL_PARM | if a null value has been passed to rx2GainChangePin |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_getRxSlicerCtrl | ( | mykonosDevice_t * | device, |
uint8_t * | slicerStep, | ||
mykonosRxSlicer_t * | rx1Pins, | ||
mykonosRxSlicer_t * | rx2Pins, | ||
uint8_t * | enable | ||
) |
This function will get the programmed Slicer control for Rx1 and Rx2 channels.
The user can control the slicer position via 3 GPIO inputs per channel. There are various configurations for the GPIO pins, this configurations are enumerated in the mykonosRxSlicer_t.
Dependencies
device | is a pointer to the device settings structure |
slicerStep | will contain the configured step size |
rx1Pins | will contain the configured GPIO combination for Rx1 |
rx2Pins | will contain the configured GPIO combination for Rx2 |
enable | will contain the programmed enable setting |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_SLICER_RX1PIN_NULL_PARM | rx1Pins is null pointer for the passed parameter |
MYKONOS_ERR_SLICER_RX2PIN_NULL_PARM | rx1Pins is null pointer for the passed parameter |
MYKONOS_ERR_SLICER_STEP_NULL_PARM | slicerStep is null pointer for the passed parameter |
MYKONOS_ERR_SLICER_EN_NULL_PARM | enable is null pointer for the passed parameter |
mykonosGpioErr_t MYKONOS_getTempSensorConfig | ( | mykonosDevice_t * | device, |
mykonosTempSensorConfig_t * | tempSensor | ||
) |
Reads from the Temperature Sensor registers and populates device data structure.
After this function is executed, the tempSensor parameter holds updated values from the device registers.
Dependencies
device | is a pointer to the device settings structure |
tempSensor | is a pointer to the mykonosTempSensorConfig_t which holds the configuration settings for the tempSensor |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_GETTEMPSENSORCONFIG_NULL_PARAM | Function parameter tempSensor is a NULL pointer |
mykonosGpioErr_t MYKONOS_getTx1AttenCtrlPin | ( | mykonosDevice_t * | device, |
uint8_t * | stepSize, | ||
mykonosGpioSelect_t * | tx1AttenIncPin, | ||
mykonosGpioSelect_t * | tx1AttenDecPin, | ||
uint8_t * | enable, | ||
uint8_t * | useTx1ForTx2 | ||
) |
This API function returns the configuration TX1 attenuation Pin control.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
stepSize | will contain the step that is used for increment and decrement. |
tx1AttenIncPin | this will have the pin used for increment. |
tx1AttenDecPin | this will have the pin used for decrement. |
enable | will contain the enable status for this channel if it is set to 1 then this function is enable for this channel, if it is 0 it is not enable |
useTx1ForTx2 | is used to return if TX1 settings are used for TX2 channel. |
MYKONOS_ERR_GETTX1PIN_STEP_NULL_PARM | if a null value has been passed to stepSize |
MYKONOS_ERR_GETTX1PIN_INC_NULL_PARM | if a null value has been passed to tx1AttenIncPin |
MYKONOS_ERR_GETTX1PIN_DEC_NULL_PARM | if a null value has been passed to tx1AttenDecPin |
MYKONOS_ERR_GETTX1PIN_EN_NULL_PARM | if a null value has been passed to enable |
MYKONOS_ERR_GETTX1PIN_TX1TX2_NULL_PARM | if a null value has been passed to useTx1ForTx2 |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_getTx2AttenCtrlPin | ( | mykonosDevice_t * | device, |
uint8_t * | stepSize, | ||
mykonosGpioSelect_t * | tx2AttenIncPin, | ||
mykonosGpioSelect_t * | tx2AttenDecPin, | ||
uint8_t * | enable, | ||
uint8_t * | useTx1ForTx2 | ||
) |
This API function returns the configuration TX2 attenuation Pin control.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
stepSize | will contain the step that is used for increment and decrement. |
tx2AttenIncPin | this will have the pin used for increment. |
tx2AttenDecPin | this will have the pin used for decrement. |
enable | will contain the enable status for this channel if it is set to 1 then this function is enable for this channel, if it is 0 it is not enable |
useTx1ForTx2 | is used to return if TX1 settings are used for TX2 channel. |
MYKONOS_ERR_GETTX2PIN_STEP_NULL_PARM | if a null value has been passed to stepSize |
MYKONOS_ERR_GETTX2PIN_STEP_NULL_PARM | if a null value has been passed to tx1AttenIncPin |
MYKONOS_ERR_GETTX2PIN_DEC_NULL_PARM | if a null value has been passed to tx1AttenDecPin |
MYKONOS_ERR_GETTX2PIN_EN_NULL_PARM | if a null value has been passed to enable |
MYKONOS_ERR_GETTX2PIN_TX1TX2_NULL_PARM | if a null value has been passed to useTx1ForTx2 |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_readAuxAdc | ( | mykonosDevice_t * | device, |
uint16_t * | adcCode | ||
) |
Reads from the selected channel of the auxiliary ADC.
Before using this function to read back the AuxADC value of the currently selected AuxADC, make sure that at least 1 conversion time of the ADC has passed since setting the AuxADC channel.
Dependencies
device | is a pointer to the device settings structure |
adcCode | is a pointer for return of the 12bit ADC read value |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_READAUXADC_NULL_PARAM | Function parameter adcCode is a NULL pointer |
mykonosGpioErr_t MYKONOS_readGpInterruptStatus | ( | mykonosDevice_t * | device, |
uint16_t * | status | ||
) |
Reads the General Purpose (GP) interrupt status to determine what caused the GP Interrupt pin to assert.
When the BBIC detects a rising edge on the General Purpose Interrupt pin, this function allows the BBIC to determine the source of the interrupt. The value returned in the status parameter will show one or more sources for the interrupt based on the following table.
The PLL unlock bits are not sticky. They will follow the current status of the PLLs. If the PLL relocks, the status bit will clear as well. The GP Interrupt pin is the logical OR of all the sources. When all the status bits are low, the GP Interrupt pin will be low. The status word readback will show the current value for all interrupt sources, even if they are disabled by the masked. However, the GP Interrupt pin will only assert for the enabled sources.
status | Bit description |
---|---|
[0] | 1 = TXPLL UNLOCK |
[1] | 1 = RXPLL UNLOCK |
[2] | 1 = SNIFFER PLL UNLOCK |
[3] | 1 = CALIBRATION PLL UNLOCK |
[4] | 1 = CLK PLL UNLOCK |
[5] | 1 = JESD204 deframer interrupt occurred |
[6] | 1 = Tx1 PA protection event |
[7] | 1 = Tx2 PA protection event |
[8] | 1 = Mykonos ARM Watchdog timeout |
[9] | 1 = ARM interrupt occurred |
[15-10] | Reserved for future use |
Dependencies
device | Pointer to the device settings structure |
status | parameter to return the IRQ source(s) that caused the GP Interrpt pin to assert. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_GP_INT_STATUS_NULL_PARAM | if null *status pointer is passed |
mykonosGpioErr_t MYKONOS_readTempSensor | ( | mykonosDevice_t * | device, |
mykonosTempSensorStatus_t * | tempStatus | ||
) |
Reads temperature code and statuses from the Temperature Sensor registers.
This function reads the temperature sensor's statuses and temperature code. Allow at least one computation period to elapse. The temperature sensor computation period is as 6 times the AuxADC conversion time. AuxADC conversion time = (1/40Mhz) * (256 * 2^(tempDecimation))
Before using this function to read back the temperature, make sure that temperature sensor is setup using the MYKONOS_setupTempSensor() function.
Dependencies
device | is a pointer to the device settings structure |
tempStatus | is a pointer to the mykonosTempSensorStatus_t structure which will be updated with the temp sensor readings |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_READTEMPSENSOR_NULL_PARAM | Function parameter tempSensor is a NULL pointer |
MYKONOS_ERR_READTEMPSENSOR_NOT_LOCKED | temperature sensor reading is not locked |
mykonosGpioErr_t MYKONOS_setArmGpioPins | ( | mykonosDevice_t * | device | ) |
Sets the input and output GPIO pin selections for ARM related signals.
The BBP should not have to call this as it will automatically be setup during the MYKONOS_loadArmFromBinary() function call. If the BBP wishes to change the GPIO assignments 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_GPIO_OK | Function completed successfully |
MYKONOS_ERR_SET_ARMGPIO_INV_POINTER | device->auxIo->armGpio pointer is null |
MYKONOS_ERR_SET_ARMGPIO_PINS_INV_SIGNALID | Invalid ARM GPIO pin signal ID |
MYKONOS_ERR_SET_ARMGPIO_PINS_INV_GPIOPIN | Invalid GPIO pin selected for ARM output (valid 0-15 + output enable in bit[4]) |
MYKONOS_ERR_SET_ARMGPIO_PINS_ARMERROR | ARM returned error setting GPIO pins |
mykonosGpioErr_t MYKONOS_setAuxAdcChannel | ( | mykonosDevice_t * | device, |
mykonosAuxAdcChannels_t | auxAdcChannel | ||
) |
Sets the selected channel of the auxiliary ADC.
After setting the AuxADC channel, wait at least 1 AuxADC conversion time before reading back the AuxADC value.
Dependencies
device | is a pointer to the device settings structure |
auxAdcChannel | desired Aux ADC input(0-4 and 16 = temperature sensor) |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_INV_AUX_ADC_CHAN_PARM | Invalid AuxADC channel (valid 0-4 and 16) |
mykonosGpioErr_t MYKONOS_setCmosDrv | ( | mykonosDevice_t * | device, |
mykonosCmosPadDrvStr_t | cmosDrv | ||
) |
This function sets the CMOS output driver.
This function sets the CMOS output driver to increase pad drive strength for the SPI_DIO and GP_INTERRUPT pads according to the following settings of the enumeration type mykonosCmosPadDrvStr_t
Dependencies
device | is a pointer to the device settings structure |
cmosDrv | drive for the CMOS output driver |
MYKONOS_ERR_CMOS_DRV_INV_PARAM | invalid drive strength, valid settings are given by mykonosCmosPadDrvStr_t |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setFloatPointFrmt | ( | mykonosDevice_t * | device, |
mykonosFloatPntFrmt_t * | floatFrmt | ||
) |
Floating point formatter enable and setup function.
The floating point formatter block is a function that works in conjunction with the gain compensating block, as the gain compensation requires increased dynamic range (total gain range on AD9371 is 42dB) which increases the bitwidth in the digital datapath.
Dependencies
device | is a pointer to the device settings structure |
floatFrmt | which is a mykonosFloatPntFrmt_t structure. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_FLOATFRMT_SET_NULL_STRUCT | floating point formatter structure floatFrmt not initialized |
MYKONOS_ERR_FLOATFRMT_INV_ROUND_MODE | floating point formatter structure floatFrmt.roundMode not valid parameter |
MYKONOS_ERR_FLOATFRMT_INV_DATA_FORMAT | floating point formatter structure floatFrmt.dataFormat not valid parameter |
MYKONOS_ERR_FLOATFRMT_INV_ENC_NAN | floating point formatter structure floatFrmt.encNan not valid parameter |
MYKONOS_ERR_FLOATFRMT_INV_EXP_BITS | floating point formatter structure floatFrmt.expBits not valid parameter |
MYKONOS_ERR_FLOATFRMT_INV_LEADING | floating point formatter structure floatFrmt.leading not valid parameter |
mykonosGpioErr_t MYKONOS_setGpio3v3Oe | ( | mykonosDevice_t * | device, |
uint16_t | gpio3v3OutEn | ||
) |
This function sets the Pin direction control for the Mykonos 3.3 VDC GPIO.
The bits in gpio3v3OutEn are used to configure each corresponding pin as an input or an output. If the bit is set, the pin is configured as an output, and if it is clear the pin is configured as an input. For example, setting gpio3v3OutEn = 0x02 will configure GPIO_3p3_2 as an output and the rest pins as inputs.
Dependencies
device | is a pointer to the device settings structure |
gpio3v3OutEn | Bit per pin to set the level of each GPIO3v3 output pin |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setGpio3v3PinLevel | ( | mykonosDevice_t * | device, |
uint16_t | gpio3v3PinLevel | ||
) |
If the GPIO3v3 pins are setup for BITBANG mode, this function sets the output pin levels per pin.
Dependencies
device | is a pointer to the device settings structure |
gpio3v3PinLevel | Bit per pin to set the level of each GPIO3v3 output pin |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setGpio3v3SourceCtrl | ( | mykonosDevice_t * | device, |
uint16_t | gpio3v3SrcCtrl | ||
) |
Sets the Mykonos GPIO 3.3 VDC source control for different GPIO fucntionality.
This function will only affect the GPIO pins that have their OE direction set to output.
Dependencies
device | is a pointer to the device settings structure |
gpio3v3SrcCtrl | nibble based source control, this is a 12 bit containing 3 nibbles that will be set the source control. |
MYKONOS_ERR_SET_GPIO_3V3_INV_SRC_CTRL | gpio3v3 members have invalid value for the GPIO3v3 source control mode. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setGpioDrv | ( | mykonosDevice_t * | device, |
uint32_t | gpioDrv | ||
) |
This function sets the drive strength for the required GPIOs.
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.
This function will set the required drive strength, the settings for GPIO drive strength are normal drive and double drive.
GPIO pins that can be assigned independent drive strength are: -MYKGPIO0 to MYKGPIO7 and MYKGPIO18
The rest of GPIOs are paired as: -MYKGPIO17 and MYKGPIO16 -MYKGPIO8 and MYKGPIO15 -MYKGPIO14 and MYKGPIO13 -MYKGPIO10 and MYKGPIO9 -MYKGPIO12 and MYKGPIO11
This means that if it is required to double the drive strength for MYKGPIO17 then the drive strength will also be doubled for MYKGPIO16.
If the particular bitfield for gpioDrv is set then the drive strength will be doubled. Note that multiple GPIOs can be set at a time.
Dependencies
device | is a pointer to the device settings structure |
gpioDrv | GPIO drive strength setup, valid range is from 0x00000 to 0x7FFFF. |
MYKONOS_ERR_GPIO_DRV_INV_PARAM | GPIO out of range- valid GPIOs are in the range 0x00000 to 0x7FFFF. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setGpioMonitorOut | ( | mykonosDevice_t * | device, |
uint8_t | monitorIndex, | ||
uint8_t | monitorMask | ||
) |
This API function configures the monitor output function for the GPIOs.
The monitor outputs are grouped in set of nibbles, the user can set individual nibbles for having the monitor output function across the available GPIO. In order to enable the GPIO monitor function the function setupGpio has to be run and the structure should have the proper setup:
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
monitorIndex | which will be the index at which the outputs are going to be set. see table in documentation |
monitorMask | which GPIO outputs are going to active, the available GPIO bit 0 will represent MYKGPIO0 and bit 7 will represent MYKGPIO7. |
MYKONOS_ERR_MONITOR_OUT_INDEX_RANGE | if GPIO Monitor output index is not in table |
MYKONOS_ERR_EN_MONITOR_OUT_NOT_ENABLED | if GPIO source control not set for Monitor output |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setGpioOe | ( | mykonosDevice_t * | device, |
uint32_t | gpioOutEn, | ||
uint32_t | gpioUsedMask | ||
) |
Sets the Mykonos low voltage GPIO output pins direction.
This function will set the GPIO direction given by the passed parameter, the direction can be either output or input. The gpioUsedMask parameter allows the function to only affect the GPIO pins of interest.
Dependencies
device | is a pointer to the device settings structure |
gpioOutEn | (valid range 0 - 0x07FFFF), bit per GPIO pin, the direction is |
gpioOutEn[bit] | GPIO[bit] direction |
---|---|
0 | input |
1 | output |
gpioUsedMask | Mask used to control which Oe bits are set/cleared. If mask bit =1, that bit will be modified by gpioOutEn bit |
MYKONOS_ERR_GPIO_OE_INV_PARAM | If the Output enable parameter is invalid |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setGpioPinLevel | ( | mykonosDevice_t * | device, |
uint32_t | gpioPinLevel | ||
) |
Sets the Mykonos low voltage GPIO output pins level.
This function will only affect the GPIO pins that have their OE direction set to output and that have the correct source control for the nibbles in GPIO_BITBANG_MODE
Dependencies
device | is a pointer to the device settings structure |
gpioPinLevel | bit per GPIO pin, level to output for each GPIO pin. 0 = low output, 1= high output |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setGpioSlewRate | ( | mykonosDevice_t * | device, |
mykonosGpioSelect_t | gpioSelect, | ||
mykonosGpioSlewRate_t | slewRate | ||
) |
This function sets the slew rate for the required GPIOs.
This function will set the required slew rate, the settings for GPIO slew rate are given by the enumeration type mykonosGpioSlewRate_t.
GPIO pins that can be assigned independent slew rate are: -MYKGPIO0 to MYKGPIO7 and MYKGPIO18
The rest of GPIOs are paired as: -MYKGPIO17 and MYKGPIO16 -MYKGPIO8 and MYKGPIO15 -MYKGPIO14 and MYKGPIO13 -MYKGPIO10 and MYKGPIO9 -MYKGPIO12 and MYKGPIO11
This means that if it is required to set the slew rate for MYKGPIO17 then the same slew rate will be applied for MYKGPIO16.
If the particular bitfield for gpioSelect is set then slewRate will be set for that GPIO. Note that multiple GPIOs can be set at a time.
Dependencies
device | is a pointer to the device settings structure |
gpioSelect | GPIO for which the slew rate will be changed, valid range 0x00000 to 0x7FFFF. |
slewRate | slew rate setting, valid slew rate settings are given by the enumeration type mykonosGpioSlewRate_t |
MYKONOS_ERR_GPIO_SLEW_RATE_INV_PARAM | GPIO out of range- valid GPIOs are in the range 0x00000 to 0x7FFFF. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setGpioSourceCtrl | ( | mykonosDevice_t * | device, |
uint32_t | gpioSrcCtrl | ||
) |
Sets the Mykonos GPIO source control for different GPIO functionality.
This function will only affect the GPIO pins that have their OE direction set to output.
Dependencies
device | is a pointer to the device settings structure |
gpioSrcCtrl | nibble based source control, this is a 32 bit containing 5 nibbles that will be set the source control. |
MYKONOS_ERR_GPIO_SRC_PARAM_INV | If the source control parameter is invalid |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setObsRxAgcEnSyncPin | ( | mykonosDevice_t * | device, |
mykonosGpioSelect_t | obsRxAgcSyncPin | ||
) |
This API function set the pins for AGC gain Sync control.
In order to call this function the gain mode should be set to AGC mode. The AGC gain sync will be controlled with the selected GPIO pin: A pulse on the 'obsRxGainChangePin' in hybrid pin control will enable the AGC gain change for observation channel
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
obsRxAgcSyncPin | GPIO pin that will be used for AGC sync gain control, the available pins for observation channel are: MYKGPIO6 MYKGPIO10 MYKGPIO17 MYKGPIONAN for none selected |
MYKONOS_ERR_OBS_GAIN_CONTROL_NOT_AGC | if the observation gain control mode is not set to AGC |
MYKONOS_ERR_GPIO_AGC_SYNC_ORX_PIN | if invalid pin has been passed for ORX AGC sync gain control. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setObsRxGainCompensation | ( | mykonosDevice_t * | device, |
mykonosObsRxGainComp_t * | gainComp, | ||
uint8_t | enable | ||
) |
Gain compensation enable and setup function for the observation channel.
The gain compensation block is a function that compensates for the attenuation in the internal attenuator for the observation channels.
Dependencies
device | is a pointer to the device settings structure |
gainComp | is a pointer to the mykonosObsRxGainComp_t structure. |
enable | enables or disables the gain compensation block. enable = 1 disable = 0 |
MYKONOS_ERR_OBS_RX_GAINCOMP_SET_NULL_STRUCT | gain compensation structure gainComp is not initialised |
MYKONOS_ERR_OBS_RX_GAINCOMP_INV_OFFSET | gain compensation structure gainComp->obsRxOffset is invalid |
MYKONOS_ERR_OBS_RX_GAINCOMP_INV_STEP | gain compensation structure gainComp->compStep is invalid |
MYKONOS_ERR_OBS_RX_GAINCOMP_INV_EN | enable is not valid |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setObsRxHybridGainChangePin | ( | mykonosDevice_t * | device, |
mykonosGpioSelect_t | obsRxGainChangePin | ||
) |
This API function set the pins for hybrid gain control.
In order to call this function the gain mode should be set to Hybrid. The AGC gain change will be controlled with the selected GPIO pin: A pulse on the 'obsRxGainChangePin' in hybrid pin control will enable the AGC gain change for observation channel
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
obsRxGainChangePin | GPIO pin that will be used for hybrid gain change control, the available pins for observation channel hybrid control are: MYKGPIO6 MYKGPIO10 MYKGPIO17 MYKGPIONAN for none selected |
MYKONOS_ERR_AGC_OBS_NOT_IN_HYBRID | if the observation gain mode is not set to Hybrid |
MYKONOS_ERR_GPIO_HYBRID_ORX_PIN | if invalid pin has been passed for ORX hybrid gain control. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setObsRxSlicerCtrl | ( | mykonosDevice_t * | device, |
uint8_t | slicerStep, | ||
mykonosObsRxSlicer_t | obsRxPins, | ||
uint8_t | enable | ||
) |
Slicer control over GPIO inputs for the observation channel.
The user can control the slicer position via 3 GPIO inputs for the observation channel. There are various configurations for the GPIO pins, this configurations are enumerated in the mykonosObsRxSlicer_t.
Dependencies
device | is a pointer to the device settings structure | ||||||||||
slicerStep | configures the step size of the slicer when external pin contol mode is enabled. Slicer gain in this mode is determined by multiplying the step size by the input bit code from the BBP. Step sizes are as follows:
| ||||||||||
obsRxPins | observation slicer inputs can take values from one of the following combinations that are specified in mykonosObsRxSlicer_t enum: -GPIO_18, GPIO_17 and GPIO_16 -GPIO_16, GPIO_15 and GPIO_14 | ||||||||||
enable | enables the external pin control mode so the BBP can control the slicer setting. enable = 1 disable = 0 |
MYKONOS_ERR_SLICER_INV_OBS_RX_SEL | invalid observation channel GPIO pin selection for Slicer control |
MYKONOS_ERR_SLICER_OBS_RX_STEP_OUT_OF_RANGE | slicer step is out of range |
MYKONOS_ERR_SLICER_OBS_RX_EN_INV | invalid enable |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setOrxEnFloatPntFrmt | ( | mykonosDevice_t * | device, |
uint8_t | orxAtt, | ||
uint8_t | enable | ||
) |
Floating point formatter enable function for ORx channel.
The floating point formatter block is a function that works in conjunction with the gain compensating block, as the gain compensation requires increased dynamic range which increases the bit-width in the digital data-path.
Dependencies
device | is a pointer to the device settings structure |
orxAtt | this parameter sets the integer data attenuation for the ORx channel in 6dB steps to enable the entire data range to be represented in the selected floating point format. |
enable | this parameter enables or disables the gain compensation block. enable = 1 disable = 0 |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_FLOATFRMT_INV_ORXATT | not valid Orx attenuation parameter passed in MYKONOS_setOrxEnFloatPntFrmt() |
MYKONOS_ERR_FLOATFRMT_INV_ORXEN | not valid enable parameter passed in MYKONOS_setOrxEnFloatPntFrmt() |
mykonosGpioErr_t MYKONOS_setRx1GainCtrlPin | ( | mykonosDevice_t * | device, |
uint8_t | incStep, | ||
uint8_t | decStep, | ||
mykonosGpioSelect_t | rx1GainIncPin, | ||
mykonosGpioSelect_t | rx1GainDecPin, | ||
uint8_t | enable | ||
) |
This API function configures the GPIO inputs for controlling RX gain.
This API function configures the GPIO input pin and step size to allow the BBP to control gain changes in Rx1 signal chain. A high pulse on the 'rx1GainIncPin' in pin control mode will increment the gain by the value set in incStep'. A high pulse on the 'rx1GainDecPin' in pin control mode will decrement the gain by the value set in 'decStep'. Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
incStep | This sets the change (increase) in gain index that is applied when the increment gain pin (in MGC pin control mode) is pulsed. |
decStep | This configures the decrement in gain index that should be applied when the decrement gain pin (in MGC pin control mode) is pulsed. |
rx1GainIncPin | mykonosGpioSelect_t These bits select the GPIO used as the enable for the Rx1 Manual Increment gain input according to the following: MYKGPIO0 or MYKGPIO10 |
rx1GainDecPin | mykonosGpioSelect_t These bits select the GPIO used as the enable for the Rx1 Manual Decrement gain input according to the following: MYKGPIO1 or MYKGPIO11 |
enable | 0 = Disable the gain pin control for Rx1 1 = enable the gain pin control for Rx1 |
MYKONOS_ERR_MGCRX1_STEP_INV_PARAM | if an invalid step size has been passed |
MYKONOS_ERR_MGCRX1_GPIO_INCPIN_INV_PARAM | if invalid increment pin has been passed |
MYKONOS_ERR_MGCRX1_GPIO_DECPIN_INV_PARAM | if invalid decrement pin has been passed |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setRx2GainCtrlPin | ( | mykonosDevice_t * | device, |
uint8_t | incStep, | ||
uint8_t | decStep, | ||
mykonosGpioSelect_t | rx2GainIncPin, | ||
mykonosGpioSelect_t | rx2GainDecPin, | ||
uint8_t | enable | ||
) |
This API function configures the GPIO inputs for controlling RX gain.
This API function configures the GPIO input pin and step size to allow the BBP to control gain changes in Rx2 signal chain. A high pulse on the 'rx2GainIncPin' in pin control mode will increment the gain by the value set in incStep'. A high pulse on the 'rx2GainDecPin' in pin control mode will decrement the gain by the value set in 'decStep'.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
incStep | This sets the change (increase) in gain index that is applied when the increment gain pin (in MGC pin control mode) is pulsed. |
decStep | This configures the decrement in gain index that should be applied when the decrement gain pin (in MGC pin control mode) is pulsed. |
rx2GainIncPin | mykonosGpioSelect_t These bits select the GPIO used as the enable for the Rx2 Manual Increment gain input according to the following: MYKGPIO3 or MYKGPIO13 |
rx2GainDecPin | mykonosGpioSelect_t These bits select the GPIO used as the enable for the Rx2 Manual Decrement gain input according to the following: MYKGPIO4 or MYKGPIO14 |
enable | 0 = Disable the gain pin control for Rx2 1 = enable the gain pin control for Rx2 |
MYKONOS_ERR_MGCRX2_STEP_INV_PARAM | if an invalid step size is passed |
MYKONOS_ERR_MGCRX2_GPIO_INCPIN_INV_PARAM | if invalid increment pin has been passed |
MYKONOS_ERR_MGCRX2_GPIO_DECPIN_INV_PARAM | if invalid decrement pin has been passed |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setRxAgcEnSyncPin | ( | mykonosDevice_t * | device, |
mykonosGpioSelect_t | rx1AgcSyncPin, | ||
mykonosGpioSelect_t | rx2AgcSyncPin | ||
) |
This API function set the pins for sync AGC gain control.
In order to call this function the RX gain control should be set to AGC mode. The AGC gain sync will be controlled with the selected GPIO pin: A pulse on the 'rx1AgcSyncPin' in hybrid pin control will enable the AGC gain sync for RX1 A pulse on the 'rx2AgcSyncPin' in hybrid pin control will enable the AGC gain sync for RX2
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
rx1AgcSyncPin | GPIO pin that will be used for AGC sync gain control, the available pins for RX1 channel are: MYKGPIO1 MYKGPIO10 MYKGPIO11 MYKGPIONAN for no GPIO selected |
rx2AgcSyncPin | GPIO pin that will be used for AGC sync gain control, the available pins for RX2 channel are: MYKGPIO4 MYKGPIO10 MYKGPIO13 MYKGPIONAN for no GPIO selected |
MYKONOS_ERR_GAIN_CONTROL_NOT_AGC | if the RX gain control mode is not set to AGC. |
MYKONOS_ERR_GPIO_AGC_SYNC_RX1_PIN | if invalid pin has been passed for RX1 AGC sync gain control. |
MYKONOS_ERR_GPIO_AGC_SYNC_RX2_PIN | if invalid pin has been passed for RX2 AGC sync gain control. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setRxEnFloatPntFrmt | ( | mykonosDevice_t * | device, |
uint8_t | rx1Att, | ||
uint8_t | rx2Att, | ||
uint8_t | enable | ||
) |
Floating point formatter enable/disable Rx1 and Rx2 function.
The floating point formatter block is a function that works in conjunction with the gain compensating block, as the gain compensation requires increased dynamic range which increases the bit-width in the digital data-path.
Dependencies
device | is a pointer to the device settings structure |
rx1Att | this parameter sets the integer data attenuation for the Rx1 channel in 6dB steps to enable the entire data range to be represented in the selected floating point format. |
rx2Att | this parameter sets the integer data attenuation for the Rx2 channel in 6dB steps to enable the entire data range to be represented in the selected floating point format. |
enable | this parameter enables or disables the gain compensation block. enable = 1 disable = 0 |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_FLOATFRMT_SET_INV_RX1ATT | not valid rx1 attenuation parameter passed in MYKONOS_setRxEnFloatPntFrmt() |
MYKONOS_ERR_FLOATFRMT_SET_INV_RX2ATT | not valid rx2 attenuation parameter passed in MYKONOS_setRxEnFloatPntFrmt() |
MYKONOS_ERR_FLOATFRMT_SET_INV_EN | not valid enable parameter passed in MYKONOS_setRxEnFloatPntFrmt() |
mykonosGpioErr_t MYKONOS_setRxGainCompensation | ( | mykonosDevice_t * | device, |
mykonosGainComp_t * | gainComp, | ||
uint8_t | enable | ||
) |
Gain compensation enable and setup function.
The gain compensation block is a function that compensates for the attenuation in the internal attenuator for the Rx channels.
Dependencies
device | is a pointer to the device settings structure |
gainComp | which is a mykonosGainComp_t structure. |
enable | this parameter enables or disables the gain compensation block. enable = 1 disable = 0 |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_GAINCOMP_SET_NULL_STRUCT | gain compensation structure gainComp is not initialised |
MYKONOS_ERR_GAINCOMP_INV_RX1_OFFSET | gain compensation structure gainComp->rx1Offset is invalid |
MYKONOS_ERR_GAINCOMP_INV_RX2_OFFSET | gain compensation structure gainComp->rx2Offset is invalid |
MYKONOS_ERR_GAINCOMP_INV_STEP | gain compensation structure gainComp->compStep is invalid |
MYKONOS_ERR_GAINCOMP_INV_EN | enable is not valid |
mykonosGpioErr_t MYKONOS_setRxHybridGainChangePin | ( | mykonosDevice_t * | device, |
mykonosGpioSelect_t | rx1GainChangePin, | ||
mykonosGpioSelect_t | rx2GainChangePin | ||
) |
This API function set the pins for hybrid gain control.
In order to call this function the gain mode should be set to Hybrid. The AGC gain change will be controlled with the selected GPIO pin: A pulse on the 'rx1GainChangePin' in hybrid pin control will enable the AGC gain change for RX1 A pulse on the 'rx2GainChangePin' in hybrid pin control will enable the AGC gain change for RX2
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
rx1GainChangePin | GPIO pin that will be used for hybrid gain change control, the available pins for RX1 channel hybrid control are: MYKGPIO1 MYKGPIO10 MYKGPIO11 MYKGPIONAN for no GPIO selected |
rx2GainChangePin | GPIO pin that will be used for hybrid gain change control, the available pins for RX2 channel hybrid control are: MYKGPIO4 MYKGPIO10 MYKGPIO13 MYKGPIONAN for no GPIO selected |
MYKONOS_ERR_GAIN_CONTROL_NOT_HYBRID | if gain control is not hybrid |
MYKONOS_ERR_GPIO_HYBRID_RX1_PIN | if invalid pin has been passed for RX1 hybrid gain control. |
MYKONOS_ERR_GPIO_HYBRID_RX2_PIN | if invalid pin has been passed for RX2 hybrid gain control. |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setRxSlicerCtrl | ( | mykonosDevice_t * | device, |
uint8_t | slicerStep, | ||
mykonosRxSlicer_t | rx1Pins, | ||
mykonosRxSlicer_t | rx2Pins, | ||
uint8_t | enable | ||
) |
Slicer control over GPIO inputs.
The user can control the slicer position via 3 GPIO inputs per channel. There are various configurations for the GPIO pins, this configurations are enumerated in the mykonosRxSlicer_t.
Dependencies
device | is a pointer to the device settings structure | ||||||||||
slicerStep | configures the step size of the slicer when external pin contol mode is enabled. Slicer gain in this mode is determined by multiplying the step size by the input bit code from the BBP. Step sizes are as follows:
| ||||||||||
rx1Pins | Rx1 slicer inputs can take values from one of the following combinations that are specified in mykonosRxSlicer_t enum: -GPIO_2, GPIO_1, and GPIO_0 -GPIO_7, GPIO_6, and GPIO_5 -GPIO_10, GPIO_9, and GPIO_8 | ||||||||||
rx2Pins | Rx2 slicer inputs can take values from one of the following combinations that are specified in mykonosRxSlicer_t enum: -GPIO_7, GPIO_6, and GPIO_5 -GPIO_13, GPIO_12, and GPIO_11 | ||||||||||
enable | this parameter enables the external pin control mode so the BBP can control the slicer setting. enable = 1 disable = 0 |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_SLICER_INV_RX1_SEL | invalid RX1 GPIO pin selection for Slicer control |
MYKONOS_ERR_SLICER_INV_RX2_SEL | invalid RX2 GPIO pin selection for Slicer control |
MYKONOS_ERR_SLICER_STEP_OUT_OF_RANGE | slicer step is out of range |
MYKONOS_ERR_SLICER_EN_INV | invalid enable |
mykonosGpioErr_t MYKONOS_setTx1AttenCtrlPin | ( | mykonosDevice_t * | device, |
uint8_t | stepSize, | ||
mykonosGpioSelect_t | tx1AttenIncPin, | ||
mykonosGpioSelect_t | tx1AttenDecPin, | ||
uint8_t | enable, | ||
uint8_t | useTx1ForTx2 | ||
) |
This API function configures the GPIO inputs for controlling Tx attenuation settings.
This allows to control the TX attenuation using GPIO inputs. When a low to high transition is applied to the configure GPIO input the attenuation will change by the desire step. The stepSize parameter will set the attenuation change applied.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
stepSize | the step that will increase or decrease the Tx1 channel attenuation. This parameter sets the change in Tx attenuation for each increment or decrement signal received in incr/decr mode. Step of 1 changes attenuation by 0.05dB. |
tx1AttenIncPin | This parameter is the GPIO pin configuration that will be controlling the increment of Tx attenuation. Available pins are: Tx1 increment: MYKGPIO4 or MYKGPIO12 |
tx1AttenDecPin | This parameter is the GPIO pin configuration that will be controlling the decrement of Tx attenuation. Available pins are: Tx1 decrement: MYKGPIO5 or MYKGPIO13 |
enable | 0 = Disable the attenuation pin control for Tx1 1 = enable the attenuation pin control for Tx1 |
useTx1ForTx2 | is used to return if TX1 settings are used for TX2 channel. |
MYKONOS_ERR_TPCTX1_GPIO_STEP_INV_PARAM | if an invalid step size is passed |
MYKONOS_ERR_TPCTX1_GPIO_INCPIN_INV_PARAM | if an invalid channel for TX is passed |
MYKONOS_ERR_TPCTX1_GPIO_DECPIN_INV_PARAM | if an invalid channel for TX is passed |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setTx2AttenCtrlPin | ( | mykonosDevice_t * | device, |
uint8_t | stepSize, | ||
mykonosGpioSelect_t | tx2AttenIncPin, | ||
mykonosGpioSelect_t | tx2AttenDecPin, | ||
uint8_t | enable | ||
) |
This API function configures the GPIO inputs for controlling Tx attenuation settings.
This allows to control the TX attenuation using GPIO inputs. when a low to high transition is applied to the configure GPIO input the attenuation will change by the desire step. The stepSize parameter will set the attenuation change applied.
Dependencies
device | is structure pointer to the Mykonos data structure containing settings |
stepSize | the step that will increase or decrease the Tx2 channel attenuation. This parameter sets the change in Tx attenuation for each increment or decrement signal received in incr/decr mode. Step of 1 changes attenuation by 0.05dB. |
tx2AttenIncPin | This parameter is the GPIO pin configuration that will be controlling the increment of Tx attenuation. Available pins are: Tx2 increment: MYKGPIO6 or MYKGPIO14 |
tx2AttenDecPin | This parameter is the GPIO pin configuration that will be controlling the decrement of Tx attenuation. Available pins are: Tx2 decrement: MYKGPIO7 or MYKGPIO15 |
enable | 0 = Disable the attenuation pin control for Tx2 1 = enable the attenuation pin control for Tx2 |
MYKONOS_ERR_TPCTX2_GPIO_STEP_INV_PARAM | if an invalid step size is passed |
MYKONOS_ERR_TPCTX2_GPIO_INCPIN_INV_PARAM | if an invalid channel for TX is passed |
MYKONOS_ERR_TPCTX2_GPIO_INCPIN_INV_PARAM | if an invalid channel for TX is passed |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_setupAuxAdcs | ( | mykonosDevice_t * | device, |
uint8_t | adcDecimation, | ||
uint8_t | enable | ||
) |
Sets up the auxiliary ADC.
This function configures the AuxADC with the requested decimation. The AuxADC clock is set as close as possible to 40MHz. The AuxADC conversion time = (1/40Mhz) * decimation, where the decimation ranges from 256 AuxADC clock cycles to 32768 AuxADc clock cycles.
Note: The AuxADC is intended for relative measurements. Two back to back measurements can allow a delta measurement with 12bit resolution. If absolute measurements are required, an accurate reference should be first measured on AuxADC0 input and used to calibrate the offset/gain error of the AuxADC. The reference would need to be measured before each measurement to account for measurement variations caused by the transmitter/receiver transients as other circuits in the device are being powered up/down.
Dependencies
device | Pointer to the device settings structure |
adcDecimation | ADC decimation factor (0-7). Decimates by 256 * 2^(adcDecimation) ADC clock cycles. |
enable | Stop/run ADC (0/1) |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_SETUPAUXADC_INV_VCODIV | CLKPLL VCO divider is invalid - Check CLKPLL setup |
MYKONOS_ERR_INV_AUX_ADC_DEC_PARM | AuxADC decimation out of range (valid 0-7) |
mykonosGpioErr_t MYKONOS_setupAuxDacs | ( | mykonosDevice_t * | device | ) |
Sets up the 10 AuxDACs on the Mykonos device.
This function uses the configuration in the Mykonos device data structure AuxIO substructure to setup which of the ten AuxDACs are enabled, their slope, Vref(mid point) and their initial DAC code.
This function can be called any time after MYKONOS_initialize() to reconfigure, enable, disable the different AuxDAC outputs. The AuxDACs are used in manual control mode. After calling this setup function, it is possible to change a particular AuxDAC code by calling the writeAuxDac() function.
Dependencies
device | is a pointer to the device settings structure |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_SETUPAUXDAC_NULL_PARAM | device->auxIo structure has a NULL pointer |
MYKONOS_ERR_SETUPAUXDAC_INV_AUXDACCODE | auxDAC code is out of range (valid 0-1023) |
mykonosGpioErr_t MYKONOS_setupGpio | ( | mykonosDevice_t * | device | ) |
Sets the Mykonos low voltage GPIO configuration registers.
Sets the low voltage GPIO pin direction for each low voltage GPIO pin and sets the source control mode (feature) for each group of 4 GPIO pins.
Dependencies
device | is a pointer to the device settings structure |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_SET_GPIO_1V8_INV_POINTER | device->auxIo->gpio pointer is NULL |
MYKONOS_ERR_SET_GPIO_1V8_INV_MODE | gpio structure members have invalid enum value for the GPIO source control mode. |
mykonosGpioErr_t MYKONOS_setupGpio3v3 | ( | mykonosDevice_t * | device | ) |
Sets the Mykonos 3.3 VDC GPIO configuration registers.
This function sets the GPIO 3.3v pin direction (1=output, 0=input) and sets the mode of each nibble of GPIO 3.3v pins. See the mykonosGpio3v3Mode_t enum for possible modes.
Dependencies
device | is a pointer to the device settings structure |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_SET_GPIO_3V3_INV_POINTER | device->auxIo->gpio3v3 pointer is NULL |
MYKONOS_ERR_SET_GPIO_3V3_INV_MODE | gpio3v3 members have invalid enum value for the GPIO3v3 source control mode. |
mykonosGpioErr_t MYKONOS_setupTempSensor | ( | mykonosDevice_t * | device, |
mykonosTempSensorConfig_t * | tempSensor | ||
) |
Sets up the Temperature Sensor.
Before using this function to set up the temp sensor, make sure that you call the MYKONOS_setupAuxADC() function to ensure that the AuxADC clock is setup and running correctly at 40 MHz, and that the structure mykonosTempSensorConfig_t tempSensor is populated.
Dependencies
device | is a pointer to the device settings structure |
tempSensor | is a pointer to the mykonosTempSensorConfig_t which holds the configuration settings for the temperature sensor |
MYKONOS_ERR_SETUPTEMPSENSOR_NULL_PARAM | Function parameter tempSensor is a NULL pointer |
MYKONOS_ERR_SETUPTEMPSENSOR_INV_TEMPDECIMATION | tempDecimation value out of range (0-7) |
MYKONOS_ERR_SETUPTEMPSENSOR_INV_OFFSET | offset value out of range (0-255) |
MYKONOS_ERR_SETUPTEMPSENSOR_INV_TEMPWINDOW | tempWindow out of range (0-15) |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_spi2GpioSetup | ( | mykonosDevice_t * | device, |
uint8_t | enable, | ||
uint8_t | updateTxAttenPinSelect | ||
) |
This API function configures and enables the secondary SPI port.
This port allows control compatibility with BBPs that employ dual SPI ports. The GPIO mapping for the SPI2 is fixed:
SPI signal | GPIO |
---|---|
CSB_2 | GPIO 3 |
SCLK_2 | GPIO 2 |
SDO_2 | GPIO 1 |
SDO_2/SDI2 | GPIO 0 |
The secondary SPI port only has a small subset of registers that affect the attenuation of the TX channels. It uses a fifth GPIO pin in order to decide which TxAttenuation word is active. The Tx Attenuation words in the 2nd SPI port are different than the first SPI port. On the 2nd SPI port, each transmitter has two Tx Attenuation words (an active word and an inactive word). The BBIC should write to the inactive TxAttenuation word. Then the fifth GPIO pin should be asserted to make the inactive TxAttenuation word active. This allows the BBIC to tightly control in real time when the TxAttenuation updates.
Dependencies
device | is a pointer to the device settings structure | ||||||||||
enable | This is parameter will enable the secondary SPI port: 1 = enable, 0 = disable | ||||||||||
updateTxAttenPinSelect | This parameter set the GPIO pin to be toggle for using the inactive attenuation words for both channels
|
MYKONOS_ERR_SPI2_INV_GPIO | if an invalid GPIO pin configuration is passed |
MYKONOS_ERR_HAL_LAYER | if HAL function error is passed |
MYKONOS_ERR_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_startTempMeasurement | ( | mykonosDevice_t * | device | ) |
Initiates temperature measurement.
This function will initiate the Temperature sensor measurement.
Dependencies
device | is a pointer to the device settings structure |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
mykonosGpioErr_t MYKONOS_writeAuxDac | ( | mykonosDevice_t * | device, |
uint8_t | auxDacIndex, | ||
uint16_t | auxDacCode | ||
) |
Writes the current AuxDAC code for a particular AuxDAC.
This function updates the 10bit code that controls the AuxDAC output voltage. The auxDacCode is updated for the specified auxDAC. Also the auxDacCode is written to the device data structure for future reference.
Dependencies
device | is a pointer to the device settings structure |
auxDacIndex | AuxDAC to set the DAC code for (0-9) |
auxDacCode | DAC code to update the AuxDAC to. Sets the output voltage of the DAC (valid 0-1023) |
MYKONOS_ERR_GPIO_OK | Function completed successfully |
MYKONOS_ERR_WRITEAUXDAC_INV_AUXDACCODE | AuxDac code invalid (valid 0-1023) |
MYKONOS_ERR_WRITEAUXDAC_INV_AUXDACINDEX | AuxDAC index out of range (valid 0-9) |
MYKONOS_ERR_WRITEAUXDAC_NULL_AUXIO | device->auxIo has NULL pointer |