libad9361 0.2 Device specific library for AD936X transceivers

Loading...
Searching...
No Matches
Functions
Top-level functions

## Functions
__api int | ad9361_multichip_sync (struct iio_device *master, struct iio_device **slaves, unsigned int num_slaves, unsigned int flags)
| Multi-chip synchronization (MCS) management.
__api int | ad9361_fmcomms5_multichip_sync (struct iio_context *ctx, unsigned int flags)
| FMComms5 specific MCS management.
__api int | ad9361_set_bb_rate (struct iio_device *dev, unsigned long rate)
| Baseband rate configuration with generic filter support.
__api int | ad9361_set_trx_fir_enable (struct iio_device *dev, int enable)
| Enable or disable transmit and receiver FIRs simultaneously.
__api int | ad9361_get_trx_fir_enable (struct iio_device *dev, int *enable)
| Get current enable value of transmit and receiver FIRs.
__api int | ad9361_generate_fir_taps (struct filter_design_parameters *parameters, short *taps, int *num_taps, int *gain)
| Design custom FIR filter from specific design criteria.
__api int | ad9361_calculate_rf_clock_chain (unsigned long tx_sample_rate, unsigned long rate_gov, unsigned long *rx_path_clks, unsigned long *tx_path_clks)
| Calculate the clock path rates for both transmit and receiver paths.
__api int | ad9361_calculate_rf_clock_chain_fdp (struct filter_design_parameters *fdpTX, struct filter_design_parameters *fdpRX, unsigned long sample_rate)
| Calculate the clock path rates and default filter settings for both transmit and receiver for a desired baseband rate.
__api int | ad9361_set_bb_rate_custom_filter_auto (struct iio_device *dev, unsigned long rate)
| Baseband rate configuration with custom filter support based on desired baseband sample rate.
__api int | ad9361_set_bb_rate_custom_filter_manual (struct iio_device *dev, unsigned long rate, unsigned long Fpass, unsigned long Fstop, unsigned long wnom_tx, unsigned long wnom_rx)
| Baseband rate configuration with custom filter support based on desired baseband sample rate and simplified filter configuration.
__api int | ad9361_fmcomms5_phase_sync (struct iio_context *ctx, long long lo)
| FMComms5 phase synchronize all TX and RX channels together.

## Detailed Description

## Function Documentation

## ◆ ad9361_calculate_rf_clock_chain()

__api int ad9361_calculate_rf_clock_chain | ( | unsigned long | tx_sample_rate,
|  | unsigned long | rate_gov,
|  | unsigned long * | rx_path_clks,
|  | unsigned long * | tx_path_clks
| ) |  |

Calculate the clock path rates for both transmit and receiver paths.

Parameters

  tx_sample_rate | Sample rate in samples per second of desired baseband rate
  rate_gov | Rate governor enable setting forcing HB3=3 when enabled
  rx_path_clks | A pointer to a unsigned long variable where the 6 RX path rates should be stored
  tx_path_clks | A pointer to a unsigned long variable where the 6 TX path rates should be stored

Returns
  On success, 0 is returned
  On error, a negative errno code is returned

## ◆ ad9361_calculate_rf_clock_chain_fdp()

__api int ad9361_calculate_rf_clock_chain_fdp | ( | struct filter_design_parameters * | fdpTX,
|  | struct filter_design_parameters * | fdpRX,
|  | unsigned long | sample_rate
| ) |  |

Calculate the clock path rates and default filter settings for both transmit and receiver for a desired baseband rate.

Parameters

  fdpTX | Filter design parameters structure where TX filter design parameters will be stored
  fdpRX | Filter design parameters structure where RX filter design parameters will be stored
  sample_rate | Desired basedband sample rate in samples per second for both RX and TX filter configurations

Returns
  On success, 0 is returned
  On error, a negative errno code is returned

## ◆ ad9361_fmcomms5_multichip_sync()

__api int ad9361_fmcomms5_multichip_sync | ( | struct iio_context * | ctx,
|  | unsigned int | flags
| ) |  |

FMComms5 specific MCS management.

Parameters

  ctx | A pointer to an iio_context structure
  flags | Control flags for MCS configuration

Returns
  On success, 0 is returned
  On error, a negative errno code is returned

## ◆ ad9361_fmcomms5_phase_sync()

__api int ad9361_fmcomms5_phase_sync | ( | struct iio_context * | ctx,
|  | long long | lo
| ) |  |

FMComms5 phase synchronize all TX and RX channels together.

Parameters

  ctx | A pointer to an iio_context structure
  lo | Frequency in hertz of LO for TX and RX

Returns
  On success, 0 is returned
  On error, a negative errno code is returned. If -2 is returned calibration failed

NOTES: To perform calibration the following side effects occur:

- RF bandwidths of both TX and RX are expanded to the current sample rate. It can be changed after calibration without effecting phase synchronization.
- DDSs are enabled and left on after synchronization. Changing these DDSs or switching to DMA sources will not effect phase synchronization.
- TX and RX LOs are set to the same frequency based on the input provided. LO changes can invalidate phase synchronization.
- AGCs are set to manual mode at predetermined hardware gains for TX and RX. Gain changes can invalidate phase synchronization.

Phase synchronization is valid until the LOs are retuned or sample rates change or gains are modified.

External Links:

- Detailed information on synchronization process
- Phase synchronization performance can depend on revision of hardware

## ◆ ad9361_generate_fir_taps()

__api int ad9361_generate_fir_taps | ( | struct filter_design_parameters * | parameters,
|  | short * | taps,
|  | int * | num_taps,
|  | int * | gain
| ) |  |

Design custom FIR filter from specific design criteria.

Parameters

  parameters | A pointer filter designer structure
  taps | A pointer to taps of designed filter
  num_taps | A pointer to integer number of taps designed in taps
  gain | Integer gain for designed filter

Returns
  On success, 0 is returned
  On error, a negative errno code is returned

## ◆ ad9361_get_trx_fir_enable()

__api int ad9361_get_trx_fir_enable | ( | struct iio_device * | dev,
|  | int * | enable
| ) |  |

Get current enable value of transmit and receiver FIRs.

Parameters

  dev | A pointer to an iio_device structure
  enable | Returned integer value of FIR enabled

Returns
  On success, 0 is returned
  On error, a negative errno code is returned

## ◆ ad9361_multichip_sync()

__api int ad9361_multichip_sync | ( | struct iio_device * | master,
|  | struct iio_device ** | slaves,
|  | unsigned int | num_slaves,
|  | unsigned int | flags
| ) |  |

Multi-chip synchronization (MCS) management.

Parameters

  master | A pointer to an iio_device structure
  slaves | A double pointer to an iio_device structure
  num_slaves | Number of slave devices associated with the master
  flags | Control flags for MCS configuration

Returns
  On success, 0 is returned
  On error, a negative errno code is returned

## ◆ ad9361_set_bb_rate()

__api int ad9361_set_bb_rate | ( | struct iio_device * | dev,
|  | unsigned long | rate
| ) |  |

Baseband rate configuration with generic filter support.

Parameters

  dev | A pointer to an iio_device structure
  rate | Rate in samples per second of desired baseband rate

Returns
  On success, 0 is returned
  On error, a negative errno code is returned

NOTE: Three possible filters are loaded based on required rate and associated decimation/interpolation. These filters are generally very wide band and not waveform specific.

## ◆ ad9361_set_bb_rate_custom_filter_auto()

__api int ad9361_set_bb_rate_custom_filter_auto | ( | struct iio_device * | dev,
|  | unsigned long | rate
| ) |  |

Baseband rate configuration with custom filter support based on desired baseband sample rate.

Parameters

  dev | A pointer to an iio_device structure
  rate | Rate in samples per second of desired baseband rate

Returns
  On success, 0 is returned
  On error, a negative errno code is returned

NOTE: Designed filter will have the following configuration: Fpass = rate / 3 Fstop = Fpass * 1.25 wnomTX = 1.6 * Fstop wnomRX = 1.4 * Fstop

## ◆ ad9361_set_bb_rate_custom_filter_manual()

__api int ad9361_set_bb_rate_custom_filter_manual | ( | struct iio_device * | dev,
|  | unsigned long | rate,
|  | unsigned long | Fpass,
|  | unsigned long | Fstop,
|  | unsigned long | wnom_tx,
|  | unsigned long | wnom_rx
| ) |  |

Baseband rate configuration with custom filter support based on desired baseband sample rate and simplified filter configuration.

Parameters

  dev | A pointer to an iio_device structure
  rate | Rate in samples per second of desired baseband rate
  Fpass | Stop edge frequency in hertz of passband
  Fstop | Start edge frequency in hertz of stopband
  wnom_tx | TX RF bandwidth of analog filter in hertz
  wnom_rx | RX RF bandwidth of analog filter in hertz

Returns
  On success, 0 is returned
  On error, a negative errno code is returned

## ◆ ad9361_set_trx_fir_enable()

__api int ad9361_set_trx_fir_enable | ( | struct iio_device * | dev,
|  | int | enable
| ) |  |

Enable or disable transmit and receiver FIRs simultaneously.

Parameters

  dev | A pointer to an iio_device structure
  enable | Integer to enable FIRs when 1 or disable when 0

Returns
  On success, 0 is returned
  On error, a negative errno code is returned