no-OS
Macros | Functions
ad917x_jesd_api.c File Reference

Contains AD917x APIs for JESD configuration and control. More...

#include "AD917x.h"
#include "ad917x_reg.h"
#include "api_errors.h"
#include <stddef.h>
Include dependency graph for ad917x_jesd_api.c:

Macros

#define SERDES_PWRUP_DELAY   100000
 
#define LANE_MIN   1
 
#define LANE_INDEX_MAX   (AD917X_JESD_NOF_LANES -1)
 
#define LINK_INDEX_MAX   (AD917X_JESD_NOF_LINKS -1)
 
#define LINK_INDEX(x)   ( ((x) == 0xFF) ? (x) : NO_OS_BIT(x))
 
#define SYNCOUTB_INDEX_MAX   (AD917X_JESD_NOF_SYNCOUTB-1)
 
#define SYNCOUTB_INDEX(x)   (((x)==0xFF) ? (x) : NO_OS_BIT(x))
 
#define K_MAX   32
 
#define M_DEFAULT   2
 
#define N_DEFAULT   16
 
#define NP_DEFAULT   16
 
#define S_MIN   1
 
#define S_MAX   4
 
#define CF_DEFAULT   0
 
#define CS_DEFAULT   0
 
#define HD_DEFAULT   0
 
#define LANE_RATE_MIN   750
 
#define LANE_RATE_MAX   12500
 
#define INTERPOLATION_MIN   1
 
#define DP_INTERPOLATION_MAX   12
 
#define CH_INTERPOLATION_MAX   8
 
#define DAC_CLK_FREQ_MIN   850
 
#define DAC_CLK_FREQ_MAX   6000
 
#define SYSREF_JITTER_WIN_MAX   28
 
#define INTPL_MODE_INVALID   25
 
#define JESD_MODE_INVALID   22
 
#define AD917X_LMFC_VAR_MAX   0xC
 

Functions

int32_t ad917x_jesd_config_datapath (ad917x_handle_t *h, uint8_t dual_en, uint8_t jesd_mode, uint8_t ch_intpl, uint8_t dp_intpl)
 Configure the JESD Datapath for AD917X. More...
 
int32_t ad917x_jesd_get_cfg_status (ad917x_handle_t *h, uint8_t *cfg_valid)
 Get JESD Configuration Status. More...
 
int32_t ad917x_jesd_get_cfg_param (ad917x_handle_t *h, jesd_param_t *jesd_param)
 Read back all current JESD parameter settings. More...
 
int32_t ad917x_jesd_set_sysref_enable (ad917x_handle_t *h, uint8_t en)
 Enable SysRef Input. More...
 
int32_t ad917x_jesd_get_sysref_enable (ad917x_handle_t *h, uint8_t *en)
 Get the current SYSREF Input. More...
 
int32_t ad917x_jesd_set_scrambler_enable (ad917x_handle_t *h, uint8_t en)
 Enable the de-scrambler for the JESD Interface. More...
 
int32_t ad917x_jesd_enable_datapath (ad917x_handle_t *h, uint8_t lanes_msk, uint8_t run_cal, uint8_t en)
 Enable the JESD Interface. More...
 
int32_t ad917x_jesd_set_syncoutb_enable (ad917x_handle_t *h, jesd_syncoutb_t syncoutb, uint8_t en)
 Enable the SYNCOUTB Output Signal. More...
 
int32_t ad917x_jesd_get_pll_status (ad917x_handle_t *h, uint8_t *pll_status)
 Get SERDES PLL Status. More...
 
int32_t ad917x_jesd_set_lane_xbar (ad917x_handle_t *h, uint8_t logical_lane, uint8_t physical_lane)
 Configure the Lane Cross Bar in the JESD datalink layer. More...
 
int32_t ad917x_jesd_invert_lane (ad917x_handle_t *h, uint8_t logical_lane, uint8_t invert)
 Invert or un-invert logical lanes. More...
 
int32_t ad917x_jesd_get_lane_xbar (ad917x_handle_t *h, uint8_t *phy_log_map)
 Get current Lane Cross Bar configuration for the JESD datalink layer. More...
 
int32_t ad917x_jesd_enable_link (ad917x_handle_t *h, jesd_link_t link, uint8_t en)
 Enable JESD Link. More...
 
int32_t ad917x_jesd_get_link_status (ad917x_handle_t *h, jesd_link_t link, ad917x_jesd_link_stat_t *link_status)
 Get JESD Link Status. More...
 
int32_t ad917x_jesd_set_lmfc_delay (ad917x_handle_t *h, jesd_link_t link, uint8_t delay, uint8_t var)
 Set the LMFC Delay and Variance for the JESD Links. More...
 

Detailed Description

Contains AD917x APIs for JESD configuration and control.

Release 1.1.X

Copyright(c) 2017 Analog Devices, Inc. All Rights Reserved. This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.

Macro Definition Documentation

◆ AD917X_LMFC_VAR_MAX

#define AD917X_LMFC_VAR_MAX   0xC

◆ CF_DEFAULT

#define CF_DEFAULT   0

◆ CH_INTERPOLATION_MAX

#define CH_INTERPOLATION_MAX   8

◆ CS_DEFAULT

#define CS_DEFAULT   0

◆ DAC_CLK_FREQ_MAX

#define DAC_CLK_FREQ_MAX   6000

◆ DAC_CLK_FREQ_MIN

#define DAC_CLK_FREQ_MIN   850

◆ DP_INTERPOLATION_MAX

#define DP_INTERPOLATION_MAX   12

◆ HD_DEFAULT

#define HD_DEFAULT   0

◆ INTERPOLATION_MIN

#define INTERPOLATION_MIN   1

◆ INTPL_MODE_INVALID

#define INTPL_MODE_INVALID   25

◆ JESD_MODE_INVALID

#define JESD_MODE_INVALID   22

◆ K_MAX

#define K_MAX   32

◆ LANE_INDEX_MAX

#define LANE_INDEX_MAX   (AD917X_JESD_NOF_LANES -1)

◆ LANE_MIN

#define LANE_MIN   1

◆ LANE_RATE_MAX

#define LANE_RATE_MAX   12500

◆ LANE_RATE_MIN

#define LANE_RATE_MIN   750

◆ LINK_INDEX

#define LINK_INDEX (   x)    ( ((x) == 0xFF) ? (x) : NO_OS_BIT(x))

◆ LINK_INDEX_MAX

#define LINK_INDEX_MAX   (AD917X_JESD_NOF_LINKS -1)

◆ M_DEFAULT

#define M_DEFAULT   2

◆ N_DEFAULT

#define N_DEFAULT   16

◆ NP_DEFAULT

#define NP_DEFAULT   16

◆ S_MAX

#define S_MAX   4

◆ S_MIN

#define S_MIN   1

◆ SERDES_PWRUP_DELAY

#define SERDES_PWRUP_DELAY   100000

◆ SYNCOUTB_INDEX

#define SYNCOUTB_INDEX (   x)    (((x)==0xFF) ? (x) : NO_OS_BIT(x))

◆ SYNCOUTB_INDEX_MAX

#define SYNCOUTB_INDEX_MAX   (AD917X_JESD_NOF_SYNCOUTB-1)

◆ SYSREF_JITTER_WIN_MAX

#define SYSREF_JITTER_WIN_MAX   28