no-OS
|
Contains AD9208 APIs for ADC JESD Configuration and Control. More...
Classes | |
struct | jesd_serdes_pll_cfg |
Macros | |
#define | K_MIN 4 |
#define | K_MAX 32 |
#define | LANE_MIN 1 |
#define | LANE_MAX 8 |
#define | CS_MAX 3 |
#define | N_MIN 7 |
#define | N_MAX 16 |
#define | CF_DEFAULT 0 |
#define | LANE_RATE_MIN_MBPS 390 |
#define | LANE_RATE_MAX_MBPS 16000 |
Enumerations | |
enum | ad9208_control_bit_sel { AD9208_CB_LOW = 0, AD9208_CB_OVR_RANGE = 1, AD9208_CB_SIGNAL_MON = 2, AD9208_CB_FAST_DETECT = 3, AD9208_CB_SYSREF = 5 } |
Functions | |
int | ad9208_jesd_enable_link (ad9208_handle_t *h, uint8_t en) |
Enable JESD Link. More... | |
int | ad9208_jesd_set_if_config (ad9208_handle_t *h, jesd_param_t jesd_param, uint64_t *lane_rate_kbps) |
Configure the JESD Interface for AD9208. More... | |
int | ad9208_jesd_get_cfg_param (ad9208_handle_t *h, jesd_param_t *jesd_param) |
Read back all current JESD parameter settings. More... | |
int | ad9208_jesd_enable_scrambler (ad9208_handle_t *h, uint8_t en) |
Enable the scrambler for the JESD Link. More... | |
int | ad9208_jesd_set_lane_xbar (ad9208_handle_t *h, uint8_t logical_lane, uint8_t physical_lane) |
Configure the Lane Cross Bar in the JESD datalink layer. More... | |
int | ad9208_jesd_get_lane_xbar (ad9208_handle_t *h, uint8_t *phy_log_map) |
Get current Lane Cross Bar configuration for the JESD datalink layer. More... | |
int | ad9208_jesd_get_pll_status (ad9208_handle_t *h, uint8_t *pll_status) |
Get SERDES PLL Status Flags. More... | |
int | ad9208_jesd_subclass_set (ad9208_handle_t *h, uint8_t subclass) |
Set JESD SYNCHRONIZATION Mode. More... | |
int | ad9208_jesd_syref_mode_set (ad9208_handle_t *h, jesd_sysref_mode_t mode, uint8_t sysref_count) |
Set JESD SYNCHRONIZATION Mode. More... | |
int | ad9208_jesd_syref_config_set (ad9208_handle_t *h, uint8_t sysref_edge_sel, uint8_t clk_edge_sel, uint8_t neg_window_skew, uint8_t pos_window_skew) |
Set SYSREF Signal Capture settings. More... | |
int | ad9208_jesd_syref_status_get (ad9208_handle_t *h, uint8_t *hold_status, uint8_t *setup_status, uint8_t *phase_status) |
Get SYSREF status for sysref monitoring. More... | |
int | ad9208_jesd_sysref_timestamp_set (ad9208_handle_t *h, uint8_t timestamp_en, uint8_t control_bit, uint8_t delay) |
Set JESD SYNCHRONIZATION Time Stamp Mode. More... | |
int | ad9208_jesd_syref_lmfc_offset_set (ad9208_handle_t *h, uint8_t offset) |
Set JESD LMFC Offset. More... | |
Contains AD9208 APIs for ADC JESD Configuration and Control.
Release 1.0.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.
#define CF_DEFAULT 0 |
#define CS_MAX 3 |
#define K_MAX 32 |
#define K_MIN 4 |
#define LANE_MAX 8 |
#define LANE_MIN 1 |
#define LANE_RATE_MAX_MBPS 16000 |
#define LANE_RATE_MIN_MBPS 390 |
#define N_MAX 16 |
#define N_MIN 7 |
int ad9208_jesd_enable_link | ( | ad9208_handle_t * | h, |
uint8_t | en | ||
) |
Enable JESD Link.
Enable SERDES Link to start JESD tranmission
h | Pointer to the AD9208 device reference handle. |
en | Enable control for the JESD Link |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_enable_scrambler | ( | ad9208_handle_t * | h, |
uint8_t | en | ||
) |
Enable the scrambler for the JESD Link.
Enable or Disable the scrambler for the JESD Link
h | Pointer to the AD9208 device reference handle. |
en | Enable control for JESD Scrambler. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_get_cfg_param | ( | ad9208_handle_t * | h, |
jesd_param_t * | jesd_param | ||
) |
Read back all current JESD parameter settings.
Read-back all the currently configured JESD Interface parameters.
h | Pointer to the AD9208 device reference handle. |
jesd_param | Pointer to a variable that will be set will the current values of the JESD interface parameters. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_get_lane_xbar | ( | ad9208_handle_t * | h, |
uint8_t * | phy_log_map | ||
) |
Get current Lane Cross Bar configuration for the JESD datalink layer.
Return the physical to logical lane mapping set by the configured by the current Lane Cross Bar configuration.
h | Pointer to the AD9208 device reference handle. |
phy_log_map | Pointer a 8 deep uint8_t array.Each element of the array represents the physical lane 0 - 7 and the value represents the logical lane assigned to that physical lane. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_get_pll_status | ( | ad9208_handle_t * | h, |
uint8_t * | pll_status | ||
) |
Get SERDES PLL Status Flags.
Read Serdes PLL status and return the status via the pll_status parameter.
h | Pointer to the AD9208 device reference handle. |
*pll_status | Pointer to the variable that will be set with the PLL status. Lock Status bits are enumerated by ad9208_jesd_serdes_pll_flg_t; bit[7] => PLL Lock Status bit[3] => PLL Lost Lock Status |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_set_if_config | ( | ad9208_handle_t * | h, |
jesd_param_t | jesd_param, | ||
uint64_t * | lane_rate_kbps | ||
) |
Configure the JESD Interface for AD9208.
Configure JESD interface parameters
h | Pointer to the AD9208 device reference handle. |
jesd_param | The desired JESD link parameters for which to configure the JESD Interface to AD9208. jesd_param_t structure defines the parameter their ranges supported by the AD9208. |
*lane_rate_kbps | Pointer to uint64_t to return the determined Lane Rate. Set to NULL if not required. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_set_lane_xbar | ( | ad9208_handle_t * | h, |
uint8_t | logical_lane, | ||
uint8_t | physical_lane | ||
) |
Configure the Lane Cross Bar in the JESD datalink layer.
Configure AD9208 Lane Cross Bar to route the physical JESD lanes to the desired logical lanes.
h | Pointer to the AD9208 device reference handle. |
physical_lane | uint8_t value indicating the Physical Lanes to be routed to the serdes logical indicated by the logical_lane parameter. Valid Range 0 -7 |
logical_lane | uint8_t value indicating the corresponding logical lane for the physical lane listed in parameter physical_lane. Valid Range 0 -7 |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_subclass_set | ( | ad9208_handle_t * | h, |
uint8_t | subclass | ||
) |
Set JESD SYNCHRONIZATION Mode.
h | Pointer to the AD9208 device reference handle. |
subclass | Desired Jesd Subclass Mode. Valid Range 0 to 1 0 - Sub Class 0 1 - Sub Class 1 |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_syref_config_set | ( | ad9208_handle_t * | h, |
uint8_t | sysref_edge_sel, | ||
uint8_t | clk_edge_sel, | ||
uint8_t | neg_window_skew, | ||
uint8_t | pos_window_skew | ||
) |
Set SYSREF Signal Capture settings.
h | Pointer to the AD9208 device reference handle. |
sysref_edge_sel | Set the transition on which SYSREF is valid. Valid values are: 0 LOW to HIGH transition 1 HIGH to LOW transition |
clk_edge_sel | Set the Sysref Capture clock Edge. Valid values are: 0 Rising clock Edge 1 Falling Clock Edge |
neg_window_skew | Skew sample clock by which captured sysref is ignored. Skew set in clock cycles. Valid range 0-3 |
pos_window_skew | Skew sample clock by which captured sysref is ignored. Skew set in clock cycles. Valid range 0-3 |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_syref_lmfc_offset_set | ( | ad9208_handle_t * | h, |
uint8_t | offset | ||
) |
Set JESD LMFC Offset.
h | Pointer to the AD9208 device reference handle. |
offset | Adjust the LMFC phase offset in frame clock cycles. For F = 1, only 4-frame shifts are valid For F = 2, Only 2-frame shifts are valid In all other cases for F, 1 frame shift are valid Refer to the AD9208 Datasheet for more details. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_syref_mode_set | ( | ad9208_handle_t * | h, |
jesd_sysref_mode_t | mode, | ||
uint8_t | sysref_count | ||
) |
Set JESD SYNCHRONIZATION Mode.
h | Pointer to the AD9208 device reference handle. |
mode | Sysref Synchronization Mode. SYREF_NONE - NO SYSREF, Subclass 1 only SYSREF_ONESHOT - single sysref signal mode SYSREF_CONT - Continuous sysref signal mode |
sysref_count | Number of initial sysref sgnals to ignore in sysref n-shot mode 0-15 Valid only for N-Shot Mode. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_syref_status_get | ( | ad9208_handle_t * | h, |
uint8_t * | hold_status, | ||
uint8_t * | setup_status, | ||
uint8_t * | phase_status | ||
) |
Get SYSREF status for sysref monitoring.
h | Pointer to the AD9208 device reference handle. |
*hold_status | Pointer to a uint8_t variable to which the Sysref +/- Hold Status will be set |
*setup_status | Pointer to a uint8_t varaiable to whch the Sysref +/- Setup Status will be set |
*phase_status | Point to a uint8_t variable to which the Sysref Divider Phase during Sysref Capture will be set. |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |
int ad9208_jesd_sysref_timestamp_set | ( | ad9208_handle_t * | h, |
uint8_t | timestamp_en, | ||
uint8_t | control_bit, | ||
uint8_t | delay | ||
) |
Set JESD SYNCHRONIZATION Time Stamp Mode.
h | Pointer to the AD9208 device reference handle. |
timestamp_en | Enable Timestamp Mode, Sysref signal will trigger a timestamp sample. 0 - Timestamp Mode Enable, Sysref will trigger a timestamp smaple. 1 - Timestamp Mode Disable, Sysref will reset internal Synchronization. |
control_bit | Desired control bit for Sysref time_stamp control. |
delay | Delay of sysref timestamp in smaple clock cycles |
API_ERROR_OK | API Completed Successfully |
API_ERROR_INVALID_HANDLE_PTR | Invalid reference handle. |
API_ERROR_INVALID_XFER_PTR | SPI Access Failed |
API_ERROR_SPI_XFER | SPI XFER Function Failed |
API_ERROR_INVALID_PARAM | Invalid Parameter |