rfdc: Xrfdc_v7_0

| rfdc Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Functions
Xrfdc_v7_0

## Functions
u32 | XRFdc_CfgInitialize (XRFdc *InstancePtr, XRFdc_Config *ConfigPtr)
| Initializes a specific XRFdc instance such that the driver is ready to use. More...
u32 | XRFdc_StartUp (XRFdc *InstancePtr, u32 Type, int Tile_Id)
| The API Restarts the requested tile. More...
u32 | XRFdc_Shutdown (XRFdc *InstancePtr, u32 Type, int Tile_Id)
| The API stops the tile as requested. More...
u32 | XRFdc_Reset (XRFdc *InstancePtr, u32 Type, int Tile_Id)
| The API resets the requested tile. More...
u32 | XRFdc_GetIPStatus (XRFdc *InstancePtr, XRFdc_IPStatus *IPStatusPtr)
| The API returns the IP status. More...
u32 | XRFdc_GetBlockStatus (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 Block_Id, XRFdc_BlockStatus *BlockStatusPtr)
| The API returns the requested block status. More...
u32 | XRFdc_SetQMCSettings (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 Block_Id, XRFdc_QMC_Settings *QMCSettingsPtr)
| This API is used to update various QMC settings, eg gain, phase, offset etc. More...
u32 | XRFdc_GetQMCSettings (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 Block_Id, XRFdc_QMC_Settings *QMCSettingsPtr)
| QMC settings are returned back to the caller through this API. More...
u32 | XRFdc_SetCoarseDelaySettings (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 Block_Id, XRFdc_CoarseDelay_Settings *CoarseDelaySettingsPtr)
| Coarse delay settings passed are used to update the corresponding block level registers. More...
u32 | XRFdc_GetCoarseDelaySettings (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 Block_Id, XRFdc_CoarseDelay_Settings *CoarseDelaySettingsPtr)
| Coarse delay settings are returned back to the caller. More...
u32 | XRFdc_UpdateEvent (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 Block_Id, u32 Event)
| This function will trigger the update event for an event. More...
u32 | XRFdc_SetDecimationFactor (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 DecimationFactor)
| This API is to set the decimation factor and also update the FIFO write words w.r.t to decimation factor. More...
u32 | XRFdc_SetFabClkOutDiv (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u16 FabClkDiv)
| This API is to set the divider for clock fabric out. More...
u32 | XRFdc_GetFabClkOutDiv (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u16 *FabClkDivPtr)
| This API is to get the divider for clock fabric out. More...
u32 | XRFdc_SetInterpolationFactor (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 InterpolationFactor)
| This API is to set the interpolation factor and also update the FIFO read words w.r.t to interpolation factor. More...
u32 | XRFdc_GetInterpolationFactor (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 *InterpolationFactorPtr)
| Interpolation factor are returned back to the caller. More...
u32 | XRFdc_GetDecimationFactor (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 *DecimationFactorPtr)
| Decimation factor are returned back to the caller. More...
u32 | XRFdc_SetFabWrVldWords (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 FabricWrVldWords)
| Fabric data rate for the requested DAC block is set by writing to the corresponding register. More...
u32 | XRFdc_SetFabRdVldWords (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 FabricRdVldWords)
| Fabric data rate for the requested ADC block is set by writing to the corresponding register. More...
u32 | XRFdc_GetFabWrVldWords (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 Block_Id, u32 *FabricWrVldWordsPtr)
| This API returns the the number of fabric write valid words requested for the block. More...
u32 | XRFdc_GetFabRdVldWords (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 Block_Id, u32 *FabricRdVldWordsPtr)
| This API returns the the number of fabric read valid words requested for the block. More...
u32 | XRFdc_ThresholdStickyClear (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 ThresholdToUpdate)
| This API is to clear the Sticky bit in threshold config registers. More...
u32 | XRFdc_SetThresholdClrMode (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 ThresholdToUpdate, u32 ClrMode)
| This API sets the threshold clear mode. More...
u32 | XRFdc_SetThresholdSettings (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, XRFdc_Threshold_Settings *ThresholdSettingsPtr)
| Threshold settings are updated into the relevant registers. More...
u32 | XRFdc_GetThresholdSettings (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, XRFdc_Threshold_Settings *ThresholdSettingsPtr)
| Threshold settings are read from the corresponding registers and are passed back to the caller. More...
u32 | XRFdc_SetDecoderMode (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 DecoderMode)
| Decoder mode is updated into the relevant registers. More...
u32 | XRFdc_GetDecoderMode (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 *DecoderModePtr)
| Decoder mode is read and returned back. More...
u32 | XRFdc_ResetNCOPhase (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 Block_Id)
| Resets the NCO phase of the current block phase accumulator. More...
u32 | XRFdc_SetupFIFO (XRFdc *InstancePtr, u32 Type, int Tile_Id, u8 Enable)
| Enable and Disable the ADC/DAC FIFO. More...
u32 | XRFdc_GetFIFOStatus (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u8 *EnablePtr)
| Current status of ADC/DAC FIFO. More...
u32 | XRFdc_GetOutputCurr (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 *OutputCurrPtr)
| Get Output Current for DAC block. More...
u32 | XRFdc_SetNyquistZone (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 Block_Id, u32 NyquistZone)
| Set the Nyquist zone. More...
u32 | XRFdc_GetNyquistZone (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 Block_Id, u32 *NyquistZonePtr)
| Get the Nyquist zone. More...
u32 | XRFdc_SetDataPathMode (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 Mode)
| This API is to set the DAC Datapath mode. More...
u32 | XRFdc_GetDataPathMode (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 *ModePtr)
| This API is to get the DAC Datapath mode. More...
u32 | XRFdc_SetIMRPassMode (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 Mode)
| This API is to set the DAC Image Reject Filter Pass mode. More...
u32 | XRFdc_GetIMRPassMode (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 *ModePtr)
| This API is to get the DAC Image Reject Filter Pass mode. More...
u32 | XRFdc_SetCalibrationMode (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u8 CalibrationMode)
| This API is to set the Calibration mode. More...
u32 | XRFdc_GetCalibrationMode (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u8 *CalibrationModePtr)
| This API is to get the Calibration mode. More...
u32 | XRFdc_SetInvSincFIR (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u16 Mode)
| This API is used to set the mode for the Inverse-Sinc filter. More...
u32 | XRFdc_GetInvSincFIR (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u16 *ModePtr)
| This API is used to get the Inverse-Sinc filter mode. More...
void | XRFdc_DumpRegs (XRFdc *InstancePtr, u32 Type, int Tile_Id)
| This Prints the offset of the register along with the content. More...
u32 | XRFdc_GetLinkCoupling (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 *ModePtr)
| This function is used to get the Link Coupling mode. More...
u32 | XRFdc_SetDither (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 Mode)
| This function is used to set the IM3 Dither mode. More...
u32 | XRFdc_GetDither (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 *ModePtr)
| This function is used to get the IM3 Dither mode. More...
u32 | XRFdc_SetSignalDetector (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, XRFdc_Signal_Detector_Settings *SettingsPtr)
| This function is used to set the ADC Signal Detector Settings. More...
u32 | XRFdc_GetSignalDetector (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, XRFdc_Signal_Detector_Settings *SettingsPtr)
| This function is used to get the ADC Signal Detector Settings. More...
u32 | XRFdc_DisableCoefficientsOverride (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 CalibrationBlock)
| This function is used to disable Calibration Coefficients override. More...
u32 | XRFdc_SetCalCoefficients (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 CalibrationBlock, XRFdc_Calibration_Coefficients *CoeffPtr)
| This function is used to set the ADC Calibration Coefficients. More...
u32 | XRFdc_GetCalCoefficients (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 CalibrationBlock, XRFdc_Calibration_Coefficients *CoeffPtr)
| This function is used to get the ADC Calibration Coefficients. More...
u32 | XRFdc_SetCalFreeze (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, XRFdc_Cal_Freeze_Settings *CalFreezePtr)
| This function is used to set calibration freeze settings. More...
u32 | XRFdc_GetCalFreeze (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, XRFdc_Cal_Freeze_Settings *CalFreezePtr)
| This function is used to get calibration freeze settings and status. More...
u32 | XRFdc_SetDACVOP (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 uACurrent)
| Set Output Current for DAC block. More...
u32 | XRFdc_GetDACCompMode (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 *EnabledPtr)
| Gets VOP compatibility mode. More...
u32 | XRFdc_SetDACCompMode (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, u32 Enable)
| Sets VOP compatibility mode. More...
u32 | XRFdc_SetDSA (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, XRFdc_DSA_Settings *SettingsPtr)
| Set DSA for ADC block. More...
u32 | XRFdc_GetDSA (XRFdc *InstancePtr, u32 Tile_Id, u32 Block_Id, XRFdc_DSA_Settings *SettingsPtr)
| Get DSA for ADC block. More...
u32 | XRFdc_SetClkDistribution (XRFdc *InstancePtr, XRFdc_Distribution_Settings *DistributionSettingsPtr)
| This function is used to set the clock distribution. More...
u32 | XRFdc_GetClkDistribution (XRFdc *InstancePtr, XRFdc_Distribution_Settings *DistributionSettingsPtr)
| This function is used to get the clock distribution. More...
u32 | XRFdc_GetClockSource (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 *ClockSourcePtr)
| This function gets Clock source. More...
u32 | XRFdc_GetPLLLockStatus (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 *LockStatusPtr)
| This function gets PLL lock status. More...
u32 | XRFdc_GetPLLConfig (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, XRFdc_PLL_Settings *PLLSettings)
| This API is used to get the PLL Configurations. More...
u32 | XRFdc_DynamicPLLConfig (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u8 Source, double RefClkFreq, double SamplingRate)
| This function used for dynamically switch between internal PLL and external clcok source and configuring the internal PLL. More...
u32 | XRFdc_MultiBand (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u8 DigitalDataPathMask, u32 MixerInOutDataType, u32 DataConverterMask)
| User-level API to setup multiband configuration. More...
u32 | XRFdc_SetMixerSettings (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 Block_Id, XRFdc_Mixer_Settings *MixerSettingsPtr)
| The API is used to update various mixer settings, fine, coarse, NCO etc. More...
u32 | XRFdc_GetMixerSettings (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 Block_Id, XRFdc_Mixer_Settings *MixerSettingsPtr)
| The API returns back Mixer/NCO settings to the caller. More...
u32 | XRFdc_MTS_Sysref_Config (XRFdc *InstancePtr, XRFdc_MultiConverter_Sync_Config *DACSyncConfigPtr, XRFdc_MultiConverter_Sync_Config *ADCSyncConfigPtr, u32 SysRefEnable)
| This API is used to enable/disable the sysref. More...
void | XRFdc_MultiConverter_Init (XRFdc_MultiConverter_Sync_Config *ConfigPtr, int *PLL_CodesPtr, int *T1_CodesPtr)
| This API Initializes the multi-tile sync config structures. More...
u32 | XRFdc_MultiConverter_Sync (XRFdc *InstancePtr, u32 Type, XRFdc_MultiConverter_Sync_Config *ConfigPtr)
| This is the top level API which will be used for Multi-tile Synchronization. More...
u32 | XRFdc_GetMTSEnable (XRFdc *InstancePtr, u32 Type, u32 Tile_Id, u32 *EnablePtr)
| This is the top level API which will be used to check if Multi-tile is enabled. More...

## Function Documentation

u32 XRFdc_CfgInitialize | ( | XRFdc * | InstancePtr,
|  | XRFdc_Config * | ConfigPtr
| ) |  |

Initializes a specific XRFdc instance such that the driver is ready to use.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  ConfigPtr | is a reference to a structure containing information about xrfdc. This function initializes an InstancePtr object for a specific device specified by the contents of Config.

Returns
  - XRFDC_SUCCESS if successful.

Note
  The user needs to first call the XRFdc_LookupConfig() API which returns the Configuration structure pointer which is passed as a parameter to the XRFdc_CfgInitialize() API.

Referenced by RFdcMTS_Example().

u32 XRFdc_DisableCoefficientsOverride | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | CalibrationBlock
| ) |  |

This function is used to disable Calibration Coefficients override.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | indicates Tile number (0-3).
  Block_Id | indicates Block number(0-3 for LS, 0-1 for HS).
  CalibrationBlock | indicates the calibration block.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_ADC_TI_DCB_CRL1_OFFSET, XRFDC_ADC_TI_DCB_CRL2_OFFSET, XRFDC_ADC_TI_DCB_CRL3_OFFSET, XRFDC_CAL_GCB_ACEN_MASK, XRFDC_CAL_GCB_EN_MASK, XRFDC_CAL_GCB_ENFL_MASK, XRFDC_CAL_GCB_MASK, XRFDC_CAL_OCB_EN_MASK, XRFDC_CAL_TSCB_EN_MASK, XRFDC_CAL_TSCB_OFFSET_COEFF0, XRFDC_CAL_TSCB_OFFSET_COEFF0_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF1, XRFDC_CAL_TSCB_OFFSET_COEFF1_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF2, XRFDC_CAL_TSCB_OFFSET_COEFF2_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF3, XRFDC_CAL_TSCB_OFFSET_COEFF3_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF4, XRFDC_CAL_TSCB_OFFSET_COEFF4_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF5, XRFDC_CAL_TSCB_OFFSET_COEFF5_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF6, XRFDC_CAL_TSCB_OFFSET_COEFF6_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF7, and XRFDC_CAL_TSCB_OFFSET_COEFF7_ALT.

void XRFdc_DumpRegs | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | int | Tile_Id
| ) |  |

This Prints the offset of the register along with the content.

This API is meant to be used for debug purposes. It prints to the console the contents of registers for the passed Tile_Id. If -1 is passed, it prints the contents of the registers for all the tiles for the respective ADC or DAC

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3, and -1.

Returns
  None

Note
  None.

u32 XRFdc_DynamicPLLConfig | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u8 | Source,
|  | double | RefClkFreq,
|  | double | SamplingRate
| ) |  |

This function used for dynamically switch between internal PLL and external clcok source and configuring the internal PLL.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | indicates ADC/DAC
  Tile_Id | indicates Tile number (0-3)
  Source | Clock source internal PLL or external clock source
  RefClkFreq | Reference Clock Frequency in MHz(102.40625MHz - 1.2GHz)
  SamplingRate | Sampling Rate in MHz(0.1- 6.554GHz for DAC and 0.5/1.0 - 2.058/4.116GHz for ADC based on the device package).

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  This API enables automatic selection of the VCO which will work in IP version 2.0.1 and above. Using older version of IP this API is not likely to work.

References XRFDC_CLK_NETWORK_CTRL1, XRFDC_CLK_NETWORK_CTRL1_USE_PLL_MASK, XRFdc_GetClockSource(), XRFDC_HSCOM_PWR_STATE_OFFSET, XRFDC_PLL_DIVIDER0, XRFDC_PLL_DIVIDER0_ALT_MASK, XRFDC_PLL_FREQ, XRFDC_PLL_FS, XRFDC_PWR_UP_STAT_MASK, XRFDC_PWR_UP_STAT_SHIFT, XRFdc_Shutdown(), XRFdc_StartUp(), XRFDC_STATUS_OFFSET, XRFdc_WriteReg, and XRFdc_WriteReg16.

Referenced by RFdcMTS_Example().

u32 XRFdc_GetBlockStatus | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_BlockStatus * | BlockStatusPtr
| ) |  |

The API returns the requested block status.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3. XRFdc_BlockStatus.
  BlockStatusPtr | is Pointer to the XRFdc_BlockStatus structure through which the ADC/DAC block status is returned.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if block not enabled.

Note
  Common API for ADC/DAC blocks.

References XRFDC_CLK_EN_OFFSET, and XRFDC_DAT_CLK_EN_MASK.

u32 XRFdc_GetCalCoefficients | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | CalibrationBlock,
|  | XRFdc_Calibration_Coefficients * | CoeffPtr
| ) |  |

This function is used to get the ADC Calibration Coefficients.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | indicates Tile number (0-3).
  Block_Id | indicates Block number(0-3 for LS, 0-1 for HS).
  CalibrationBlock | indicates the block to be read from
  CoeffPtr | is pointer to the XRFdc_Calibration_Coefficients structure to get the calibration coefficients.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_ADC_TI_DCB_CRL1_OFFSET, XRFDC_CAL_GCB_FAB_MASK, XRFDC_CAL_GCB_FLSH_MASK, XRFDC_CAL_GCB_MASK, XRFDC_CAL_GCB_OFFSET_COEFF0, XRFDC_CAL_GCB_OFFSET_COEFF0_ALT, XRFDC_CAL_GCB_OFFSET_COEFF1, XRFDC_CAL_GCB_OFFSET_COEFF1_ALT, XRFDC_CAL_GCB_OFFSET_COEFF2, XRFDC_CAL_GCB_OFFSET_COEFF2_ALT, XRFDC_CAL_GCB_OFFSET_COEFF3, XRFDC_CAL_GCB_OFFSET_COEFF3_ALT, XRFDC_CAL_OCB1_OFFSET_COEFF0, XRFDC_CAL_OCB1_OFFSET_COEFF1, XRFDC_CAL_OCB1_OFFSET_COEFF2, XRFDC_CAL_OCB1_OFFSET_COEFF3, XRFDC_CAL_OCB2_OFFSET_COEFF0, XRFDC_CAL_OCB2_OFFSET_COEFF1, XRFDC_CAL_OCB2_OFFSET_COEFF2, XRFDC_CAL_OCB2_OFFSET_COEFF3, XRFDC_CAL_OCB_MASK, XRFDC_CAL_SLICE_SHIFT, XRFDC_CAL_TSCB_MASK, XRFDC_CAL_TSCB_OFFSET_COEFF0, XRFDC_CAL_TSCB_OFFSET_COEFF0_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF1, XRFDC_CAL_TSCB_OFFSET_COEFF1_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF2, XRFDC_CAL_TSCB_OFFSET_COEFF2_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF3, XRFDC_CAL_TSCB_OFFSET_COEFF3_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF4, XRFDC_CAL_TSCB_OFFSET_COEFF4_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF5, XRFDC_CAL_TSCB_OFFSET_COEFF5_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF6, XRFDC_CAL_TSCB_OFFSET_COEFF6_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF7, and XRFDC_CAL_TSCB_OFFSET_COEFF7_ALT.

u32 XRFdc_GetCalFreeze | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_Cal_Freeze_Settings * | CalFreezePtr
| ) |  |

This function is used to get calibration freeze settings and status.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | indicates Tile number (0-3).
  Block_Id | indicates Block number(0-3 for LS, 0-1 for HS).
  CalFreezePtr | pointer to be filled the settings/status.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_CAL_FREEZE_CAL_MASK, XRFDC_CAL_FREEZE_CAL_SHIFT, XRFDC_CAL_FREEZE_PIN_MASK, XRFDC_CAL_FREEZE_PIN_SHIFT, XRFDC_CAL_FREEZE_STS_MASK, and XRFDC_CAL_FREEZE_STS_SHIFT.

u32 XRFdc_GetCalibrationMode | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u8 * | CalibrationModePtr
| ) |  |

This API is to get the Calibration mode.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  CalibrationModePtr | pointer to get the calibration mode.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_ADC_TI_DCB_CRL0_OFFSET, and XRFDC_TI_DCB_MODE_MASK.

Referenced by XRFdc_GetMixerSettings(), XRFdc_GetNyquistZone(), XRFdc_SetMixerSettings(), and XRFdc_SetNyquistZone().

u32 XRFdc_GetClkDistribution | ( | XRFdc * | InstancePtr,
|  | XRFdc_Distribution_Settings * | DistributionSettingsPtr
| ) |  |

This function is used to get the clock distribution.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  DistributionSettingsPtr | pointer to get the distribution settings

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if no valid distribution found.

References XRFdc_GetPLLConfig(), XRFDC_HSCOM_CLK_DSTR_MASK, XRFDC_HSCOM_CLK_DSTR_MASK_ALT, XRFDC_HSCOM_CLK_DSTR_OFFSET, and XRFdc_ReadReg16.

u32 XRFdc_GetClockSource | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 * | ClockSourcePtr
| ) |  |

This function gets Clock source.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | indicates ADC/DAC.
  Tile_Id | indicates Tile number (0-3).
  ClockSourcePtr | Pointer to return the clock source

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if tile not enabled.

Note
  None.

References XRFDC_CLK_NETWORK_CTRL1, XRFDC_CLK_NETWORK_CTRL1_USE_PLL_MASK, XRFDC_PLL_DIVIDER0, and XRFdc_ReadReg16.

Referenced by XRFdc_DynamicPLLConfig(), XRFdc_GetPLLConfig(), and XRFdc_GetPLLLockStatus().

u32 XRFdc_GetCoarseDelaySettings | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_CoarseDelay_Settings * | CoarseDelaySettingsPtr
| ) |  |

Coarse delay settings are returned back to the caller.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  CoarseDelaySettingsPtr | Pointer to the XRFdc_CoarseDelay_Settings structure in which the Coarse Delay settings are passed.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  None.

References XRFDC_ADC_CRSE_DLY_CFG_OFFSET, XRFDC_ADC_CRSE_DLY_UPDT_OFFSET, XRFDC_DAC_CRSE_DLY_CFG_OFFSET, XRFDC_DAC_CRSE_DLY_UPDT_OFFSET, XRFDC_QMC_UPDT_MODE_MASK, and XRFdc_ReadReg16.

u32 XRFdc_GetDACCompMode | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 * | EnabledPtr
| ) |  |

Gets VOP compatibility mode.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  mode | is ADC/DAC block number inside the tile. Valid values are 0-3.
  EnabledPtr | is pointer a that is filled with whether the mode is enabled (1) or disabled(0).

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  None.

References XRFDC_ADC_DAC_MC_CFG2_OFFSET.

u32 XRFdc_GetDataPathMode | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 * | ModePtr
| ) |  |

This API is to get the DAC Datapath mode.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  ModePtr | pointer used to return value.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for DAC blocks

References XRFDC_DAC_DATAPATH_OFFSET, and XRFDC_DATAPATH_MODE_MASK.

u32 XRFdc_GetDecimationFactor | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 * | DecimationFactorPtr
| ) |  |

Decimation factor are returned back to the caller.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  DecimationFactorPtr | Pointer to return the Decimation factor for DAC blocks.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_ADC_DECI_MODE_OFFSET, XRFDC_DEC_MOD_MASK, and XRFDC_DEC_MOD_MASK_EXT.

Referenced by RFdcMTS_Example().

u32 XRFdc_GetDecoderMode | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 * | DecoderModePtr
| ) |  |

Decoder mode is read and returned back.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is DAC block number inside the tile. Valid values are 0-3.
  DecoderModePtr | Valid values are 1 (Maximum SNR, for non-randomized decoder), 2 (Maximum Linearity, for randomized decoder)

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for DAC blocks

References XRFDC_DAC_DECODER_CTRL_OFFSET, and XRFDC_DEC_CTRL_MODE_MASK.

u32 XRFdc_GetDither | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 * | ModePtr
| ) |  |

This function is used to get the IM3 Dither mode.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | indicates Tile number (0-3).
  Block_Id | indicates Block number(0-3 for LS, 0-1 for HS).
  ModePtr | pointer to get link coupling mode.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_ADC_DAC_MC_CFG0_OFFSET, and XRFDC_RX_MC_CFG0_IM3_DITH_MASK.

u32 XRFdc_GetDSA | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_DSA_Settings * | SettingsPtr
| ) |  |

Get DSA for ADC block.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  AttenuationPtr | is the attenuation in dB

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Range 0 - ll dB with 0.5 dB resolution.

References XRFdc_ReadReg16.

u32 XRFdc_GetFabClkOutDiv | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u16 * | FabClkDivPtr
| ) |  |

This API is to get the divider for clock fabric out.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  FabClkDivPtr | is a pointer to get fabric clock for a tile. XRFDC_FAB_CLK_* defines the valid divider values.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  API is applicable for both ADC and DAC Tiles

References XRFDC_FAB_CLK_DIV_MASK, and XRFDC_HSCOM_CLK_DIV_OFFSET.

u32 XRFdc_GetFabRdVldWords | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 * | FabricRdVldWordsPtr
| ) |  |

This API returns the the number of fabric read valid words requested for the block.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  FabricRdVldWordsPtr | Pointer to return the fabric data rate for ADC/DAC block

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  ADC/DAC blocks

References XRFDC_ADC_FAB_RATE_WR_MASK, XRFDC_ADC_FABRIC_RATE_OFFSET, XRFDC_DAC_FAB_RATE_WR_MASK, XRFDC_FAB_RATE_RD_SHIFT, and XRFdc_ReadReg16.

u32 XRFdc_GetFabWrVldWords | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 * | FabricWrVldWordsPtr
| ) |  |

This API returns the the number of fabric write valid words requested for the block.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  FabricWrVldWordsPtr | Pointer to return the fabric data rate for DAC block

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  ADC/DAC blocks

References XRFDC_ADC_FAB_RATE_WR_MASK, XRFDC_ADC_FABRIC_RATE_OFFSET, XRFDC_DAC_FAB_RATE_WR_MASK, and XRFdc_ReadReg16.

u32 XRFdc_GetFIFOStatus | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u8 * | EnablePtr
| ) |  |

Current status of ADC/DAC FIFO.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  EnablePtr | valid values are 1 (FIFO enable) and 0 (FIFO Disable)

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Common API for ADC/DAC blocks

References XRFDC_FIFO_EN_MASK, and XRFDC_FIFO_ENABLE.

u32 XRFdc_GetIMRPassMode | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 * | ModePtr
| ) |  |

This API is to get the DAC Image Reject Filter Pass mode.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  ModePtr | pointer used to return value.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for DAC blocks

References XRFDC_DAC_DATAPATH_OFFSET, and XRFDC_DATAPATH_IMR_MASK.

u32 XRFdc_GetInterpolationFactor | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 * | InterpolationFactorPtr
| ) |  |

Interpolation factor are returned back to the caller.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  InterpolationFactorPtr | Pointer to return the interpolation factor for DAC blocks.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for DAC blocks

References XRFDC_DAC_INTERP_CTRL_OFFSET, XRFDC_INTERP_MODE_I_MASK, and XRFDC_INTERP_MODE_I_MASK_EXT.

Referenced by RFdcMTS_Example().

u32 XRFdc_GetInvSincFIR | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u16 * | ModePtr
| ) |  |

This API is used to get the Inverse-Sinc filter mode.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is DAC block number inside the tile. Valid values are 0-3.
  ModePtr | is a pointer to get the inv-sinc status. valid values are 0(disable), 1(1st Nyquist zone) and 2(2nd Nyquist zone).

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only DAC blocks

References XRFDC_DAC_INVSINC_OFFSET, XRFDC_EN_INVSINC_MASK, and XRFDC_MODE_INVSINC_MASK.

u32 XRFdc_GetIPStatus | ( | XRFdc * | InstancePtr,
|  | XRFdc_IPStatus * | IPStatusPtr
| ) |  |

The API returns the IP status.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  IPStatusPtr | Pointer to the XRFdc_IPStatus structure through which the status is returned.

Returns
  - XRFDC_SUCCESS if successful.

Note
  None.

References XRFDC_CURRENT_STATE_OFFSET, XRFDC_PLL_LOCKED_MASK, XRFDC_PLL_LOCKED_SHIFT, XRFDC_PWR_UP_STAT_MASK, XRFDC_PWR_UP_STAT_SHIFT, XRFdc_ReadReg16, and XRFDC_STATUS_OFFSET.

Referenced by XRFdc_MultiConverter_Sync().

u32 XRFdc_GetLinkCoupling | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 * | ModePtr
| ) |  |

This function is used to get the Link Coupling mode.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | indicates Tile number (0-3).
  Block_Id | indicates Block number(0-3 for 2G, 0-1 for 4G).
  ModePtr | pointer to get link coupling mode.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_ADC_RXPR_MC_CFG0_OFFSET, and XRFDC_RX_MC_CFG0_CM_MASK.

u32 XRFdc_GetMixerSettings | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_Mixer_Settings * | MixerSettingsPtr
| ) |  |

The API returns back Mixer/NCO settings to the caller.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  MixerSettingsPtr | Pointer to the XRFdc_Mixer_Settings structure in which the Mixer/NCO settings are passed.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  FineMixerScale in Mixer_Settings structure can have 3 values. XRFDC_MIXER_SCALE_* represents the valid values. XRFDC_MIXER_SCALE_AUTO - If mixer mode is R2C, Mixer Scale is set to 1 and for other modes mixer scale is set to 0.7 XRFDC_MIXER_SCALE_1P0 - To set fine mixer scale to 1. XRFDC_MIXER_SCALE_0P7 - To set fine mixer scale to 0.7.

References XRFDC_ADC_MXR_CFG0_OFFSET, XRFDC_ADC_MXR_CFG1_OFFSET, XRFDC_ADC_NCO_FQWD_LOW_OFFSET, XRFDC_ADC_NCO_FQWD_MID_OFFSET, XRFDC_ADC_NCO_FQWD_UPP_OFFSET, XRFDC_EN_I_IQ_MASK, XRFDC_EN_Q_IQ_MASK, XRFDC_FINE_MIX_SCALE_MASK, XRFdc_GetCalibrationMode(), XRFdc_GetNyquistZone(), XRFDC_MIX_CFG0_MASK, XRFDC_MIX_CFG1_MASK, XRFDC_MXR_MODE_OFFSET, XRFDC_NCO_FQWD_MASK, XRFDC_NCO_FQWD_MID_SHIFT, XRFDC_NCO_FQWD_UPP_SHIFT, XRFDC_NCO_PHASE_LOW_OFFSET, XRFDC_NCO_PHASE_MASK, XRFDC_NCO_PHASE_UPP_OFFSET, XRFDC_NCO_PHASE_UPP_SHIFT, XRFDC_NCO_UPDT_MODE_MASK, XRFDC_NCO_UPDT_OFFSET, and XRFdc_ReadReg16.

Referenced by XRFdc_SetCalibrationMode().

u32 XRFdc_GetMTSEnable | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 * | EnablePtr
| ) |  |

This is the top level API which will be used to check if Multi-tile is enabled.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC.
  Tile_Id | indicates Tile number (0-3).
  EnablePtr | to be filled with the enable state.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_SUCCESS if error occurs.

Note
  None.

References XRFdc_ReadReg.

u32 XRFdc_GetNyquistZone | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 * | NyquistZonePtr
| ) |  |

Get the Nyquist zone.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  NyquistZonePtr | Pointer to return the Nyquist zone.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Common API for ADC/DAC blocks

References XRFDC_ADC_TI_TISK_CRL0_OFFSET, XRFDC_DAC_MC_CFG0_OFFSET, XRFdc_GetCalibrationMode(), XRFDC_MC_CFG0_MIX_MODE_MASK, XRFDC_MC_CFG0_MIX_MODE_SHIFT, XRFDC_TI_TISK_ZONE_MASK, and XRFDC_TISK_ZONE_SHIFT.

Referenced by XRFdc_GetMixerSettings(), XRFdc_SetCalibrationMode(), and XRFdc_SetMixerSettings().

u32 XRFdc_GetOutputCurr | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 * | OutputCurrPtr
| ) |  |

Get Output Current for DAC block.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  OutputCurrPtr | pointer to return the output current.

Returns
  - Return Output Current for DAC block

References XRFDC_ADC_DAC_MC_CFG2_OFFSET, and XRFDC_DAC_MC_CFG3_OFFSET.

u32 XRFdc_GetPLLConfig | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | XRFdc_PLL_Settings * | PLLSettings
| ) |  |

This API is used to get the PLL Configurations.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | represents ADC or DAC.
  Tile_Id | Valid values are 0-3.
  PLLSettings | pointer to the XRFdc_PLL_Settings structure to get the PLL configurations

Note
  None.

References XRFdc_GetClockSource(), XRFDC_PLL_DIVIDER0, XRFDC_PLL_FPDIV, XRFDC_PLL_FREQ, XRFDC_PLL_FS, XRFDC_PLL_REFDIV, XRFdc_ReadReg, XRFdc_ReadReg16, XRFDC_REFCLK_DIV_2_MASK, XRFDC_REFCLK_DIV_3_MASK, and XRFDC_REFCLK_DIV_4_MASK.

Referenced by XRFdc_GetClkDistribution().

u32 XRFdc_GetPLLLockStatus | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 * | LockStatusPtr
| ) |  |

This function gets PLL lock status.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | indicates ADC/DAC.
  Tile_Id | indicates Tile number (0-3).
  LockStatusPtr | Pointer to return the PLL lock status

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  None.

References XRFdc_GetClockSource(), XRFDC_PLL_LOCKED_MASK, and XRFDC_STATUS_OFFSET.

u32 XRFdc_GetQMCSettings | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_QMC_Settings * | QMCSettingsPtr
| ) |  |

QMC settings are returned back to the caller through this API.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  QMCSettingsPtr | Pointer to the XRFdc_QMC_Settings structure in which the QMC settings are passed.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  None.

References XRFDC_QMC_CFG_EN_GAIN_MASK, XRFDC_QMC_CFG_EN_PHASE_MASK, XRFDC_QMC_CFG_OFFSET, XRFDC_QMC_CFG_PHASE_SHIFT, XRFDC_QMC_GAIN_CRCTN_MASK, XRFDC_QMC_GAIN_OFFSET, XRFDC_QMC_OFF_OFFSET, XRFDC_QMC_OFFST_CRCTN_MASK, XRFDC_QMC_PHASE_CRCTN_MASK, XRFDC_QMC_PHASE_OFFSET, XRFDC_QMC_UPDT_MODE_MASK, and XRFDC_QMC_UPDT_OFFSET.

u32 XRFdc_GetSignalDetector | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_Signal_Detector_Settings * | SettingsPtr
| ) |  |

This function is used to get the ADC Signal Detector Settings.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | indicates Tile number (0-3).
  Block_Id | indicates Block number(0-3 for LS, 0-1 for HS).
  SettingsPtr | pointer to the XRFdc_Signal_Detector_Settings structure to get the signal detector configurations

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_ADC_SIG_DETECT_CTRL_OFFSET, XRFDC_ADC_SIG_DETECT_FLUSH_MASK, XRFDC_ADC_SIG_DETECT_FLUSH_SHIFT, XRFDC_ADC_SIG_DETECT_HYST_MASK, XRFDC_ADC_SIG_DETECT_HYST_SHIFT, XRFDC_ADC_SIG_DETECT_INTG_MASK, XRFDC_ADC_SIG_DETECT_INTG_SHIFT, XRFDC_ADC_SIG_DETECT_MASK, XRFDC_ADC_SIG_DETECT_MODE_MASK, XRFDC_ADC_SIG_DETECT_MODE_READ_SHIFT, XRFDC_ADC_SIG_DETECT_TCONST_MASK, XRFDC_ADC_SIG_DETECT_TCONST_SHIFT, XRFDC_ADC_SIG_DETECT_THRESH_MASK, XRFDC_ADC_SIG_DETECT_THRESHOLD0_LEVEL_OFFSET, and XRFDC_ADC_SIG_DETECT_THRESHOLD1_LEVEL_OFFSET.

u32 XRFdc_GetThresholdSettings | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_Threshold_Settings * | ThresholdSettingsPtr
| ) |  |

Threshold settings are read from the corresponding registers and are passed back to the caller.

There can be two threshold settings: threshold0 and threshold1. Both of them are independent of each other. The function returns the requested threshold (which can be threshold0, threshold1, or both.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  ThresholdSettingsPtr | Pointer through which the register settings for thresholds are passed back..

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_ADC_TRSHD0_AVG_LO_OFFSET, XRFDC_ADC_TRSHD0_AVG_UP_OFFSET, XRFDC_ADC_TRSHD0_CFG_OFFSET, XRFDC_ADC_TRSHD0_OVER_OFFSET, XRFDC_ADC_TRSHD0_UNDER_OFFSET, XRFDC_ADC_TRSHD1_AVG_LO_OFFSET, XRFDC_ADC_TRSHD1_AVG_UP_OFFSET, XRFDC_ADC_TRSHD1_CFG_OFFSET, XRFDC_ADC_TRSHD1_OVER_OFFSET, XRFDC_ADC_TRSHD1_UNDER_OFFSET, XRFdc_ReadReg16, XRFDC_TRSHD0_AVG_UPP_SHIFT, XRFDC_TRSHD0_EN_MOD_MASK, XRFDC_TRSHD0_OVER_MASK, XRFDC_TRSHD0_UNDER_MASK, XRFDC_TRSHD1_AVG_UPP_SHIFT, XRFDC_TRSHD1_EN_MOD_MASK, XRFDC_TRSHD1_OVER_MASK, and XRFDC_TRSHD1_UNDER_MASK.

u32 XRFdc_MTS_Sysref_Config | ( | XRFdc * | InstancePtr,
|  | XRFdc_MultiConverter_Sync_Config * | DACSyncConfigPtr,
|  | XRFdc_MultiConverter_Sync_Config * | ADCSyncConfigPtr,
|  | u32 | SysRefEnable
| ) |  |

This API is used to enable/disable the sysref.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  DACSyncConfigPtr | is pointer to DAC Multi-Tile Sync config structure.
  ADCSyncConfigPtr | is pointer to ADC Multi-Tile Sync config structure.
  SysRefEnable | valid values are 0(disable) and 1(enable).

Returns
  - XRFDC_MTS_OK if successful.

Note
  None.

u32 XRFdc_MultiBand | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u8 | DigitalDataPathMask,
|  | u32 | MixerInOutDataType,
|  | u32 | DataConverterMask
| ) |  |

User-level API to setup multiband configuration.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  DigitalDataPathMask | is the DataPath mask. First 4 bits represent 4 data paths, 1 means enabled and 0 means disabled.
  MixerInOutDataType | is mixer data type, valid values are XRFDC_MB_DATATYPE_*
  DataConverterMask | is block enabled mask (input/output driving blocks). 1 means enabled and 0 means disabled.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Common API for ADC/DAC blocks

References XRFDC_DAC_MB_CFG_OFFSET.

void XRFdc_MultiConverter_Init | ( | XRFdc_MultiConverter_Sync_Config * | ConfigPtr,
|  | int * | PLL_CodesPtr,
|  | int * | T1_CodesPtr
| ) |  |

This API Initializes the multi-tile sync config structures.

Optionally allows target codes to be provided for the Pll/T1 analog sysref capture

Parameters

  ConfigPtr | pointer to Multi-tile sync config structure.
  PLL_CodesPtr | pointer to PLL analog sysref capture.
  T1_CodesPtr | pointer to T1 analog sysref capture.

Note
  None.
  None.

Referenced by RFdcMTS_Example().

u32 XRFdc_MultiConverter_Sync | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | XRFdc_MultiConverter_Sync_Config * | ConfigPtr
| ) |  |

This is the top level API which will be used for Multi-tile Synchronization.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  ConfigPtr | Multi-tile sync config structure.

Returns
  - XRFDC_MTS_OK if successful.

- XRFDC_MTS_TIMEOUT if timeout occurs.
  - XRFDC_MTS_MARKER_RUN
  - XRFDC_MTS_MARKER_MISM
  - XRFDC_MTS_NOT_SUPPORTED if MTS is not supported.

Note
  None.

References XRFdc_GetIPStatus(), XRFdc_ReadReg, and XRFdc_ReadReg16.

Referenced by RFdcMTS_Example().

u32 XRFdc_Reset | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | int | Tile_Id
| ) |  |

The API resets the requested tile.

It can reset all the tiles as well. In the process, all existing register settings are cleared and are replaced with the settings initially configured (through the GUI).

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3, and -1.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  None.

u32 XRFdc_ResetNCOPhase | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 | Block_Id
| ) |  |

Resets the NCO phase of the current block phase accumulator.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  None.

References XRFDC_NCO_PHASE_RST_MASK, and XRFDC_NCO_RST_OFFSET.

u32 XRFdc_SetCalCoefficients | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | CalibrationBlock,
|  | XRFdc_Calibration_Coefficients * | CoeffPtr
| ) |  |

This function is used to set the ADC Calibration Coefficients.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | indicates Tile number (0-3).
  Block_Id | indicates Block number(0-3 for LS, 0-1 for HS).
  CalibrationBlock | indicates the block to be written to.
  CoeffPtr | is pointer to the XRFdc_Calibration_Coefficients structure to set the calibration coefficients.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_ADC_TI_DCB_CRL1_OFFSET, XRFDC_ADC_TI_DCB_CRL2_OFFSET, XRFDC_ADC_TI_DCB_CRL3_OFFSET, XRFDC_CAL_GCB_ACEN_MASK, XRFDC_CAL_GCB_EN_MASK, XRFDC_CAL_GCB_EN_SHIFT, XRFDC_CAL_GCB_FLSH_MASK, XRFDC_CAL_GCB_FLSH_SHIFT, XRFDC_CAL_GCB_MASK, XRFDC_CAL_GCB_OFFSET_COEFF0, XRFDC_CAL_GCB_OFFSET_COEFF1, XRFDC_CAL_GCB_OFFSET_COEFF2, XRFDC_CAL_GCB_OFFSET_COEFF3, XRFDC_CAL_OCB1_OFFSET_COEFF0, XRFDC_CAL_OCB1_OFFSET_COEFF1, XRFDC_CAL_OCB1_OFFSET_COEFF2, XRFDC_CAL_OCB1_OFFSET_COEFF3, XRFDC_CAL_OCB2_OFFSET_COEFF0, XRFDC_CAL_OCB2_OFFSET_COEFF1, XRFDC_CAL_OCB2_OFFSET_COEFF2, XRFDC_CAL_OCB2_OFFSET_COEFF3, XRFDC_CAL_OCB_EN_MASK, XRFDC_CAL_OCB_MASK, XRFDC_CAL_SLICE_SHIFT, XRFDC_CAL_TSCB_EN_MASK, XRFDC_CAL_TSCB_EN_SHIFT, XRFDC_CAL_TSCB_MASK, XRFDC_CAL_TSCB_OFFSET_COEFF0, XRFDC_CAL_TSCB_OFFSET_COEFF0_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF1, XRFDC_CAL_TSCB_OFFSET_COEFF1_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF2, XRFDC_CAL_TSCB_OFFSET_COEFF2_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF3, XRFDC_CAL_TSCB_OFFSET_COEFF3_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF4, XRFDC_CAL_TSCB_OFFSET_COEFF4_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF5, XRFDC_CAL_TSCB_OFFSET_COEFF5_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF6, XRFDC_CAL_TSCB_OFFSET_COEFF6_ALT, XRFDC_CAL_TSCB_OFFSET_COEFF7, and XRFDC_CAL_TSCB_OFFSET_COEFF7_ALT.

u32 XRFdc_SetCalFreeze | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_Cal_Freeze_Settings * | CalFreezePtr
| ) |  |

This function is used to set calibration freeze settings.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | indicates Tile number (0-3).
  Block_Id | indicates Block number(0-3 for LS, 0-1 for HS).
  CalFreezePtr | pointer to the settings to be applied.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_CAL_FREEZE_CAL_MASK, XRFDC_CAL_FREEZE_CAL_SHIFT, XRFDC_CAL_FREEZE_PIN_MASK, and XRFDC_CAL_FREEZE_PIN_SHIFT.

u32 XRFdc_SetCalibrationMode | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u8 | CalibrationMode
| ) |  |

This API is to set the Calibration mode.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  CalibrationMode | valid values are 1 and 2.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_ADC_TI_DCB_CRL0_OFFSET, XRFdc_GetMixerSettings(), XRFdc_GetNyquistZone(), XRFdc_ReadReg16, XRFdc_SetMixerSettings(), XRFdc_SetNyquistZone(), XRFDC_TI_DCB_MODE_MASK, and XRFdc_WriteReg16.

u32 XRFdc_SetClkDistribution | ( | XRFdc * | InstancePtr,
|  | XRFdc_Distribution_Settings * | DistributionSettingsPtr
| ) |  |

This function is used to set the clock distribution.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  DistributionSettingsPtr | pointer to the distribution settings struct

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if could not set distribution.

References XRFDC_CLOCK_DETECT_MASK, XRFDC_CLOCK_DETECT_OFFSET, XRFDC_HSCOM_CLK_DSTR_MASK, XRFDC_HSCOM_CLK_DSTR_OFFSET, and XRFdc_Shutdown().

u32 XRFdc_SetCoarseDelaySettings | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_CoarseDelay_Settings * | CoarseDelaySettingsPtr
| ) |  |

Coarse delay settings passed are used to update the corresponding block level registers.

Driver structure is updated with the new values.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  CoarseDelaySettingsPtr | is Pointer to the XRFdc_CoarseDelay_Settings structure in which the CoarseDelay settings are passed.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  None.

References XRFDC_ADC_CRSE_DLY_CFG_OFFSET, XRFDC_ADC_CRSE_DLY_UPDT_OFFSET, XRFDC_ADC_UPDATE_DYN_OFFSET, XRFDC_ADC_UPDT_CRSE_DLY_MASK, XRFDC_CRSE_DLY_CFG_MASK, XRFDC_CRSE_DLY_CFG_MASK_EXT, XRFDC_DAC_CRSE_DLY_CFG_OFFSET, XRFDC_DAC_CRSE_DLY_UPDT_OFFSET, XRFDC_DAC_UPDATE_DYN_OFFSET, XRFDC_DAC_UPDT_CRSE_DLY_MASK, XRFDC_QMC_UPDT_MODE_MASK, and XRFDC_UPDT_EVNT_MASK.

u32 XRFdc_SetDACCompMode | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | Enable
| ) |  |

Sets VOP compatibility mode.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  mode | is ADC/DAC block number inside the tile. Valid values are 0-3.
  Enable | is whether to enable (1) or disable(0) the compatibility mode.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  None.

References XRFDC_ADC_DAC_MC_CFG2_OFFSET.

u32 XRFdc_SetDACVOP | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | uACurrent
| ) |  |

Set Output Current for DAC block.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  uACurrent | is the current in uA.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Range 6425 - 32000 uA with 25 uA resolution.

References XRFDC_ADC_DAC_MC_CFG0_OFFSET, XRFDC_ADC_DAC_MC_CFG2_OFFSET, XRFDC_DAC_MC_CFG3_OFFSET, XRFDC_DAC_VOP_CTRL_OFFSET, and XRFdc_ReadReg16.

u32 XRFdc_SetDataPathMode | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | Mode
| ) |  |

This API is to set the DAC Datapath mode.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  Mode | valid values are 0-3.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if tile not enabled / out of range.

Note
  Only for DAC blocks

References XRFDC_ADC_FABRIC_RATE_OFFSET, XRFDC_DAC_DATAPATH_OFFSET, XRFDC_DAC_FAB_RATE_RD_MASK, XRFDC_DATAPATH_MODE_MASK, XRFDC_FAB_CLK_DIV_CAL_MASK, XRFDC_FAB_RATE_RD_SHIFT, XRFDC_HSCOM_CLK_DIV_OFFSET, and XRFdc_SetNyquistZone().

u32 XRFdc_SetDecimationFactor | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | DecimationFactor
| ) |  |

This API is to set the decimation factor and also update the FIFO write words w.r.t to decimation factor.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  DecimationFactor | to be set for DAC block. XRFDC_INTERP_DECIM_* defines the valid values.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only ADC blocks

References XRFDC_ADC_DECI_CONFIG_OFFSET, XRFDC_ADC_DECI_MODE_OFFSET, XRFDC_ADC_FAB_RATE_WR_MASK, XRFDC_ADC_FABRIC_RATE_OFFSET, XRFDC_DEC_CFG_MASK, XRFDC_DEC_MOD_MASK, and XRFDC_DEC_MOD_MASK_EXT.

u32 XRFdc_SetDecoderMode | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | DecoderMode
| ) |  |

Decoder mode is updated into the relevant registers.

Driver structure is updated with the new values.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is DAC block number inside the tile. Valid values are 0-3.
  DecoderMode | Valid values are 1 (Maximum SNR, for non- randomized decoder), 2 (Maximum Linearity, for randomized decoder)

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only DAC blocks

References XRFDC_DAC_DECODER_CLK_OFFSET, XRFDC_DAC_DECODER_CTRL_OFFSET, and XRFDC_DEC_CTRL_MODE_MASK.

u32 XRFdc_SetDither | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | Mode
| ) |  |

This function is used to set the IM3 Dither mode.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | indicates Tile number (0-3).
  Block_Id | indicates Block number(0-3 for LS, 0-1 for HS).
  Mode | 0: Disable 1: Enable

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_ADC_DAC_MC_CFG0_OFFSET, XRFDC_RX_MC_CFG0_IM3_DITH_MASK, and XRFDC_RX_MC_CFG0_IM3_DITH_SHIFT.

u32 XRFdc_SetDSA | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_DSA_Settings * | SettingsPtr
| ) |  |

Set DSA for ADC block.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  Attenuation | is the attenuation in dB

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Range 0 - 11 dB with 0.5 dB resolution.

References XRFDC_DSA_UPDT_OFFSET, and XRFdc_ReadReg16.

u32 XRFdc_SetFabClkOutDiv | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u16 | FabClkDiv
| ) |  |

This API is to set the divider for clock fabric out.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  FabClkDiv | to be set for a tile. XRFDC_FAB_CLK_* defines the valid divider values.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  ADC and DAC Tiles

References XRFDC_FAB_CLK_DIV_MASK, and XRFDC_HSCOM_CLK_DIV_OFFSET.

u32 XRFdc_SetFabRdVldWords | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | FabricRdVldWords
| ) |  |

Fabric data rate for the requested ADC block is set by writing to the corresponding register.

The function writes the number of valid read words for the requested ADC block.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC block number inside the tile. Valid values are 0-3.
  FabricRdVldWords | is Read fabric rate to be set for ADC block.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for ADC blocks

References XRFDC_ADC_FAB_RATE_RD_MASK, XRFDC_ADC_FABRIC_RATE_OFFSET, and XRFDC_FAB_RATE_RD_SHIFT.

u32 XRFdc_SetFabWrVldWords | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | FabricWrVldWords
| ) |  |

Fabric data rate for the requested DAC block is set by writing to the corresponding register.

The function writes the number of valid write words for the requested DAC block.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  FabricWrVldWords | is write fabric rate to be set for DAC block.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only for DAC blocks

References XRFDC_ADC_FABRIC_RATE_OFFSET, and XRFDC_DAC_FAB_RATE_WR_MASK.

u32 XRFdc_SetIMRPassMode | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | Mode
| ) |  |

This API is to set the DAC Image Reject Filter Pass mode.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  Mode | valid values are 0 (for low pass) 1 (for high pass).

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if tile not enabled / bad parameter passed

Note
  Only for DAC blocks

References XRFDC_DAC_DATAPATH_OFFSET, and XRFDC_DATAPATH_IMR_MASK.

u32 XRFdc_SetInterpolationFactor | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | InterpolationFactor
| ) |  |

This API is to set the interpolation factor and also update the FIFO read words w.r.t to interpolation factor.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  InterpolationFactor | to be set for DAC block. XRFDC_INTERP_DECIM_* defines the valid values.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only DAC blocks

References XRFDC_ADC_FABRIC_RATE_OFFSET, XRFDC_DAC_FAB_RATE_RD_MASK, XRFDC_DAC_INTERP_CTRL_OFFSET, XRFDC_DAC_ITERP_DATA_OFFSET, XRFDC_FAB_RATE_RD_SHIFT, XRFDC_INTERP_MODE_MASK, XRFDC_INTERP_MODE_MASK_EXT, XRFDC_INTERP_MODE_Q_SHIFT, XRFDC_INTERP_MODE_Q_SHIFT_EXT, and XRFdc_ReadReg16.

u32 XRFdc_SetInvSincFIR | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u16 | Mode
| ) |  |

This API is used to set the mode for the Inverse-Sinc filter.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is DAC block number inside the tile. Valid values are 0-3.
  Mode | valid values are 0(disable), 1(1st Nyquist zone) and 2(2nd Nyquist zone).

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if block not enabled/invalid mode.

Note
  Only DAC blocks

References XRFDC_DAC_INVSINC_OFFSET, XRFDC_EN_INVSINC_MASK, and XRFDC_MODE_INVSINC_MASK.

u32 XRFdc_SetMixerSettings | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_Mixer_Settings * | MixerSettingsPtr
| ) |  |

The API is used to update various mixer settings, fine, coarse, NCO etc.

Mixer/NCO settings passed are used to update the corresponding block level registers. Driver structure is updated with the new values.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 DAC
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  MixerSettingsPtr | Pointer to the XRFdc_Mixer_Settings structure in which the Mixer/NCO settings are passed.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  FineMixerScale in Mixer_Settings structure can have 3 values. XRFDC_MIXER_SCALE_* represents the valid values. XRFDC_MIXER_SCALE_AUTO - If mixer mode is R2C, Mixer Scale is set to 1 and for other modes mixer scale is set to 0.7 XRFDC_MIXER_SCALE_1P0 - To set fine mixer scale to 1. XRFDC_MIXER_SCALE_0P7 - To set fine mixer scale to 0.7.

References XRFDC_ADC_DECI_CONFIG_OFFSET, XRFDC_ADC_NCO_FQWD_LOW_OFFSET, XRFDC_ADC_NCO_FQWD_MID_OFFSET, XRFDC_ADC_NCO_FQWD_UPP_OFFSET, XRFDC_ADC_NCO_PHASE_MOD_OFFSET, XRFDC_ADC_UPDATE_DYN_OFFSET, XRFDC_DAC_INTERP_DATA_MASK, XRFDC_DAC_ITERP_DATA_OFFSET, XRFDC_DAC_UPDATE_DYN_OFFSET, XRFDC_DEC_CFG_4GSPS_MASK, XRFDC_DEC_CFG_CHA_MASK, XRFDC_DEC_CFG_IQ_MASK, XRFDC_DEC_CFG_MASK, XRFDC_FINE_MIX_SCALE_MASK, XRFdc_GetCalibrationMode(), XRFdc_GetNyquistZone(), XRFDC_MXR_MODE_OFFSET, XRFDC_NCO_FQWD_MID_MASK, XRFDC_NCO_FQWD_MID_SHIFT, XRFDC_NCO_FQWD_UPP_MASK, XRFDC_NCO_FQWD_UPP_SHIFT, XRFDC_NCO_PHASE_LOW_OFFSET, XRFDC_NCO_PHASE_MOD_EVEN, XRFDC_NCO_PHASE_MODE_ODD, XRFDC_NCO_PHASE_UPP_MASK, XRFDC_NCO_PHASE_UPP_OFFSET, XRFDC_NCO_PHASE_UPP_SHIFT, XRFDC_NCO_UPDT_MODE_MASK, XRFDC_NCO_UPDT_OFFSET, XRFdc_ReadReg16, XRFDC_UPDT_EVNT_MASK, XRFDC_UPDT_EVNT_NCO_MASK, and XRFdc_WriteReg16.

Referenced by XRFdc_SetCalibrationMode().

u32 XRFdc_SetNyquistZone | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | NyquistZone
| ) |  |

Set the Nyquist zone.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  NyquistZone | valid values are 1 (Odd),2 (Even).

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Common API for ADC/DAC blocks

References XRFDC_ADC_TI_TISK_CRL0_OFFSET, XRFDC_DAC_MC_CFG0_OFFSET, XRFdc_GetCalibrationMode(), XRFDC_MC_CFG0_MIX_MODE_MASK, XRFdc_ReadReg16, XRFDC_TI_TISK_ZONE_MASK, and XRFdc_WriteReg16.

Referenced by XRFdc_SetCalibrationMode(), and XRFdc_SetDataPathMode().

u32 XRFdc_SetQMCSettings | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_QMC_Settings * | QMCSettingsPtr
| ) |  |

This API is used to update various QMC settings, eg gain, phase, offset etc.

QMC settings passed are used to update the corresponding block level registers. Driver structure is updated with the new values.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  QMCSettingsPtr | is Pointer to the XRFdc_QMC_Settings structure in which the QMC settings are passed.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  None.

References XRFDC_ADC_UPDATE_DYN_OFFSET, XRFDC_DAC_UPDATE_DYN_OFFSET, XRFDC_QMC_CFG_EN_GAIN_MASK, XRFDC_QMC_CFG_EN_PHASE_MASK, XRFDC_QMC_CFG_OFFSET, XRFDC_QMC_CFG_PHASE_SHIFT, XRFDC_QMC_GAIN_CRCTN_MASK, XRFDC_QMC_GAIN_OFFSET, XRFDC_QMC_OFF_OFFSET, XRFDC_QMC_OFFST_CRCTN_MASK, XRFDC_QMC_PHASE_CRCTN_MASK, XRFDC_QMC_PHASE_OFFSET, XRFDC_QMC_UPDT_MODE_MASK, XRFDC_QMC_UPDT_OFFSET, XRFDC_UPDT_EVNT_MASK, and XRFDC_UPDT_EVNT_QMC_MASK.

u32 XRFdc_SetSignalDetector | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_Signal_Detector_Settings * | SettingsPtr
| ) |  |

This function is used to set the ADC Signal Detector Settings.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | indicates Tile number (0-3).
  Block_Id | indicates Block number(0-3 for LS, 0-1 for HS).
  SettingsPtr | pointer to the XRFdc_Signal_Detector_Settings structure to set the signal detector configurations

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if tile not enabled, or invalid values.

Note
  Only for ADC blocks

References XRFDC_ADC_SIG_DETECT_CTRL_OFFSET, XRFDC_ADC_SIG_DETECT_FLUSH_SHIFT, XRFDC_ADC_SIG_DETECT_HYST_SHIFT, XRFDC_ADC_SIG_DETECT_INTG_SHIFT, XRFDC_ADC_SIG_DETECT_MASK, XRFDC_ADC_SIG_DETECT_MODE_WRITE_SHIFT, XRFDC_ADC_SIG_DETECT_TCONST_SHIFT, XRFDC_ADC_SIG_DETECT_THRESH_MASK, XRFDC_ADC_SIG_DETECT_THRESHOLD0_LEVEL_OFFSET, and XRFDC_ADC_SIG_DETECT_THRESHOLD1_LEVEL_OFFSET.

u32 XRFdc_SetThresholdClrMode | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | ThresholdToUpdate,
|  | u32 | ClrMode
| ) |  |

This API sets the threshold clear mode.

The clear mode can be through explicit DRP access (manual) or auto clear (QMC gain update event).

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADCC block number inside the tile. Valid values are 0-3.
  ThresholdToUpdate | Select which Threshold (Threshold0 or Threshold1 or both) to update.
  ClrMode | can be DRP access (manual) or auto clear (QMC gain update event).

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only ADC blocks

References XRFDC_ADC_TRSHD0_CFG_OFFSET, XRFDC_ADC_TRSHD1_CFG_OFFSET, XRFdc_ReadReg16, XRFDC_TRSHD0_CLR_MOD_MASK, XRFDC_TRSHD1_CLR_MOD_MASK, and XRFdc_WriteReg16.

u32 XRFdc_SetThresholdSettings | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | XRFdc_Threshold_Settings * | ThresholdSettingsPtr
| ) |  |

Threshold settings are updated into the relevant registers.

Driver structure is updated with the new values. There can be two threshold settings: threshold0 and threshold1. Both of them are independent of each other. The function returns the requested threshold (which can be threshold0, threshold1, or both.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  ThresholdSettingsPtr | Pointer through which the register settings for thresholds are passed to the API.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only ADC blocks

References XRFDC_ADC_TRSHD0_AVG_LO_OFFSET, XRFDC_ADC_TRSHD0_AVG_UP_OFFSET, XRFDC_ADC_TRSHD0_CFG_OFFSET, XRFDC_ADC_TRSHD0_OVER_OFFSET, XRFDC_ADC_TRSHD0_UNDER_OFFSET, XRFDC_ADC_TRSHD1_AVG_LO_OFFSET, XRFDC_ADC_TRSHD1_AVG_UP_OFFSET, XRFDC_ADC_TRSHD1_CFG_OFFSET, XRFDC_ADC_TRSHD1_OVER_OFFSET, XRFDC_ADC_TRSHD1_UNDER_OFFSET, XRFDC_TRSHD0_AVG_UPP_SHIFT, XRFDC_TRSHD0_EN_MOD_MASK, XRFDC_TRSHD0_OVER_MASK, XRFDC_TRSHD0_UNDER_MASK, XRFDC_TRSHD1_AVG_UPP_SHIFT, XRFDC_TRSHD1_EN_MOD_MASK, XRFDC_TRSHD1_OVER_MASK, XRFDC_TRSHD1_UNDER_MASK, and XRFdc_WriteReg16.

u32 XRFdc_SetupFIFO | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | int | Tile_Id,
|  | u8 | Enable
| ) |  |

Enable and Disable the ADC/DAC FIFO.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  Enable | valid values are 1 (FIFO enable) and 0 (FIFO Disable)

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Common API for ADC/DAC blocks

References XRFDC_FIFO_EN_MASK, and XRFDC_FIFO_ENABLE.

u32 XRFdc_Shutdown | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | int | Tile_Id
| ) |  |

The API stops the tile as requested.

It can also stop all the tiles if asked for. It does not clear any of the existing register settings. It just stops the requested tile(s).

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3, and -1.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  None.

Referenced by XRFdc_DynamicPLLConfig(), and XRFdc_SetClkDistribution().

u32 XRFdc_StartUp | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | int | Tile_Id
| ) |  |

The API Restarts the requested tile.

It can restart a single tile and alternatively can restart all the tiles. Existing register settings are not lost or altered in the process. It just starts the requested tile(s).

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3, and -1.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  None.

Referenced by XRFdc_DynamicPLLConfig().

u32 XRFdc_ThresholdStickyClear | ( | XRFdc * | InstancePtr,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | ThresholdToUpdate
| ) |  |

This API is to clear the Sticky bit in threshold config registers.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  ThresholdToUpdate | Select which Threshold (Threshold0 or Threshold1 or both) to update.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Only ADC blocks

References XRFDC_ADC_TRSHD0_CFG_OFFSET, XRFDC_ADC_TRSHD1_CFG_OFFSET, XRFDC_TRSHD0_STIKY_CLR_MASK, and XRFDC_TRSHD1_STIKY_CLR_MASK.

u32 XRFdc_UpdateEvent | ( | XRFdc * | InstancePtr,
|  | u32 | Type,
|  | u32 | Tile_Id,
|  | u32 | Block_Id,
|  | u32 | Event
| ) |  |

This function will trigger the update event for an event.

Parameters

  InstancePtr | is a pointer to the XRfdc instance.
  Type | is ADC or DAC. 0 for ADC and 1 for DAC
  Tile_Id | Valid values are 0-3.
  Block_Id | is ADC/DAC block number inside the tile. Valid values are 0-3.
  Event | is for which dynamic update event will trigger. XRFDC_EVENT_* defines the different events.

Returns
  - XRFDC_SUCCESS if successful.
  - XRFDC_FAILURE if error occurs.

Note
  Common API for ADC/DAC blocks

References XRFDC_ADC_CRSE_DLY_UPDT_OFFSET, XRFDC_ADC_UPDATE_DYN_OFFSET, XRFDC_DAC_CRSE_DLY_UPDT_OFFSET, XRFDC_DAC_UPDATE_DYN_OFFSET, XRFDC_HSCOM_UPDT_DYN_OFFSET, XRFDC_NCO_UPDT_MODE_MASK, XRFDC_NCO_UPDT_OFFSET, XRFDC_QMC_UPDT_MODE_MASK, XRFDC_QMC_UPDT_OFFSET, and XRFdc_WriteReg16.