no-OS
ad9528.h
Go to the documentation of this file.
1 
13 #ifndef _AD9528_LIB_H_
14 #define _AD9528_LIB_H_
15 
16 
17 #include "t_ad9528.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 #define CLEMENTE_TDD_AD9528_CLKOUT_INDEX 13
24 
25 //Helper function to setup the 9528 device data structure specifically for the ADI transceiver evaluation cards
26 ADI_ERR AD9528_initDeviceDataStruct(ad9528Device_t *device, uint32_t vcxoFrequency_Hz, uint32_t refAFrequency_Hz, uint32_t outputDeviceClock_Hz);
27 ADI_ERR AD9528_reportClockRates(ad9528Device_t *device); //debug function to help verify data structure is setup correctly.
28 
29 //AD9528 API functions
32 ADI_ERR AD9528_initialize(ad9528Device_t *device); //writes all registers to desired values, leaves clock outputs off.
35 ADI_ERR AD9528_enableClockOutputs(ad9528Device_t *device, uint16_t clkEnable); //clkEnable: bit per clock output
36 ADI_ERR AD9528_setupSYSREF(ad9528Device_t *device, uint16_t divideFromPll1Out, sysrefPatternMode_t sysrefPatternMode, sysrefNshotMode_t nShotPulses);
37 ADI_ERR AD9528_requestSysref(ad9528Device_t *device, uint8_t enableSYSREF);
38 
39 #ifdef __cplusplus
40 }
41 #endif
42 
43 #endif
ADI_ERR
ADI_ERR
Definition: common.h:34
sysrefNshotMode_t
sysrefNshotMode_t
Enum to select the SYSREF output # of pulses for NSHOT mode.
Definition: t_ad9528.h:154
t_ad9528.h
Contains enum and structure data types for all AD9528 function calls.
AD9528_initDeviceDataStruct
ADI_ERR AD9528_initDeviceDataStruct(ad9528Device_t *device, uint32_t vcxoFrequency_Hz, uint32_t refAFrequency_Hz, uint32_t outputDeviceClock_Hz)
Helper function for ADI transceiver eval boards to init the AD9528 data structure.
Definition: ad9528.c:115
device
Definition: ad9361_util.h:69
AD9528_readPllStatus
ADI_ERR AD9528_readPllStatus(ad9528Device_t *device, uint8_t *status)
Reads the Lock Status of the PLLs and present detect of the reference clocks.
Definition: ad9528.c:629
AD9528_reportClockRates
ADI_ERR AD9528_reportClockRates(ad9528Device_t *device)
Debug function to print out summary of AD9528 setup.
Definition: ad9528.c:281
AD9528_waitForPllLock
ADI_ERR AD9528_waitForPllLock(ad9528Device_t *device)
Waits for PLL1 and PLL2 to lock and the REFA and VCXO clocks to be present.
Definition: ad9528.c:597
AD9528_enableClockOutputs
ADI_ERR AD9528_enableClockOutputs(ad9528Device_t *device, uint16_t clkEnable)
Update the AD9528 clock outputs that are enabled.
Definition: ad9528.c:573
ad9528Device_t
Structure to hold AD9528 settings.
Definition: t_ad9528.h:179
AD9528_resetDevice
ADI_ERR AD9528_resetDevice(ad9528Device_t *device)
Performs a hard reset on the AD9528 DUT.
Definition: ad9528.c:26
AD9528_setSpiSettings
ADI_ERR AD9528_setSpiSettings(ad9528Device_t *device)
Sets the AD9528 device SPI settings (3wire/4wire, MSBFirst, etc).
Definition: ad9528.c:56
sysrefPatternMode_t
sysrefPatternMode_t
Enum to choose the SYSREF pattern mode.
Definition: t_ad9528.h:142
AD9528_setupSYSREF
ADI_ERR AD9528_setupSYSREF(ad9528Device_t *device, uint16_t divideFromPll1Out, sysrefPatternMode_t sysrefPatternMode, sysrefNshotMode_t nShotPulses)
Allow changing the 9528 SYSREF frequency and pattern mode(CONTINUOUS, PRBS vs NSHOT mode)
Definition: ad9528.c:535
AD9528_initialize
ADI_ERR AD9528_initialize(ad9528Device_t *device)
Initializes the AD9528 by writing all SPI registers.
Definition: ad9528.c:303
AD9528_requestSysref
ADI_ERR AD9528_requestSysref(ad9528Device_t *device, uint8_t enableSYSREF)
Send a SPI message to request a SYSREF pulse or continuous SYSREF from the AD9528.
Definition: ad9528.c:501