no-OS
t_ad9528.h
Go to the documentation of this file.
1 
13 #ifndef _AD9528_TYPES_H_
14 #define _AD9528_TYPES_H_
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 /* AD9528 SPI Address defines */
21 #define AD9528_ADDR_ADI_SPI_CONFIG_A 0x000
22 #define AD9528_ADDR_ADI_SPI_CONFIG_B 0x001
23 #define AD9528_ADDR_IO_UPDATE 0x00F
24 
25 #define AD9528_ADDR_REF_A_DIVIDER_LSB 0x100
26 #define AD9528_ADDR_REF_A_DIVIDER_MSB 0x101
27 #define AD9528_ADDR_REF_B_DIVIDER_LSB 0x102
28 #define AD9528_ADDR_REF_B_DIVIDER_MSB 0x103
29 #define AD9528_ADDR_PLL1_N_DIV_LSB 0x104
30 #define AD9528_ADDR_PLL1_N_DIV_MSB 0x105
31 #define AD9528_ADDR_PLL1_CHARGEPUMP 0x106
32 #define AD9528_ADDR_PLL1_CP_CTRL2 0x107
33 #define AD9528_ADDR_INPUT_RECEIVERS1 0x108
34 #define AD9528_ADDR_INPUT_RECEIVERS2 0x109
35 #define AD9528_ADDR_INPUT_RECEIVERS3 0x10A
36 #define AD9528_ADDR_PLL1_FASTLOCK 0x10B
37 
38 #define AD9528_ADDR_PLL2_CHARGEPUMP 0x200
39 #define AD9528_ADDR_PLL2_N_DIV 0x201
40 #define AD9528_ADDR_PLL2_CTRL 0x202
41 #define AD9528_ADDR_PLL2_VCO_CTRL 0x203
42 #define AD9528_ADDR_PLL2_VCO_DIV 0x204
43 #define AD9528_ADDR_PLL2_LF_CTRL1 0x205
44 #define AD9528_ADDR_PLL2_LF_CTRL2 0x206
45 #define AD9528_ADDR_PLL2_RDIV 0x207
46 #define AD9528_ADDR_PLL2_REPLICA_CHDIV 0x208
47 #define AD9528_ADDR_PLL2_REPLICA_DIV_PHASE 0x209
48 
49 #define AD9528_ADDR_CH_OUT0_CTRL1 0x300
50 #define AD9528_ADDR_CH_OUT0_CTRL2 0x301
51 #define AD9528_ADDR_CH_OUT0_CHDIV 0x302
52 #define AD9528_ADDR_OUTPUT_SYNC 0x32A
53 #define AD9528_ADDR_MASK_SYNC1 0x32B
54 #define AD9528_ADDR_MASK_SYNC2 0x32C
55 #define AD9528_ADDR_EN_OUTPUT_PATH_SEL1 0x32D
56 #define AD9528_ADDR_EN_OUTPUT_PATH_SEL2 0x32E
57 
58 #define AD9528_ADDR_SYSERF_DIV_LSB 0x400
59 #define AD9528_ADDR_SYSERF_DIV_MSB 0x401
60 #define AD9528_ADDR_SYSREF_CTRL3 0x402
61 #define AD9528_ADDR_SYSREF_CTRL4 0x403
62 #define AD9528_ADDR_SYSREF_CTRL5 0x404
63 
64 #define AD9528_ADDR_POWERDOWN_CTRL 0x500
65 #define AD9528_ADDR_CH_POWERDOWN1 0x501
66 #define AD9528_ADDR_CH_POWERDOWN2 0x502
67 #define AD9528_ADDR_LDO_ENABLES1 0x503
68 #define AD9528_ADDR_LDO_ENABLES2 0x504
69 #define AD9528_ADDR_STATUS0_CTRL 0x505
70 #define AD9528_ADDR_STATUS1_CTRL 0x506
71 #define AD9528_ADDR_STATUS_OE 0x507
72 #define AD9528_ADDR_STATUS_READBACK0 0x508
73 #define AD9528_ADDR_STATUS_READBACK1 0x509
74 
75 
76 
78 typedef enum
79 {
80  CHANNEL_DIV = 0, PLL1_OUTPUT = 1, //VCXO frequency
81  SYSREF = 2,
82  INV_PLL1_OUTPUT = 5 //VCXO inverted
84 
86 typedef enum
87 {
88  LVDS = 0, LVDS_BOOST = 1, HSTL = 2
90 
92 typedef enum
93 {
96 
98 typedef struct
99 {
101  uint16_t refA_Divider;
103 
105  uint16_t refB_Divider;
107 
110 
111  uint16_t nDivider;
112  uint8_t bypassPll1;
114 
116 typedef struct
117 {
118  uint8_t rfDivider; //VCO divider: Valid range (3,4,5)
119  uint8_t n2Divider; //PLL2 N2 Divider
120  uint8_t totalNdiv; //NDiv = 4*Bdiv + Adiv //Bdiv valid range (3 to 63), Adiv valid range (0-3)
122 
124 typedef struct
125 {
126  uint16_t outPowerDown; //bit per output, if 1 power down that output.
127  ad9528outSourceSel_t outSource[14]; //CHANNEL_DIV, PLL1_OUTPUT, SYSREF, INV_PLL1_OUTPUT
128  ad9528outBufferControl_t outBufferCtrl[14]; //LVDS, LVDS_BOOST, HSTL
129  uint8_t outAnalogDelay[14]; //5 bits
130  uint8_t outDigitalDelay[14]; //6 bits, 1/2 clock resolution @ channel div input frequency
131  uint8_t outChannelDiv[14]; //8 bit channel divider
132  uint32_t outFrequency_Hz[14]; //output clock frequency per clock output
134 
136 typedef enum
137 {
140 
142 typedef enum
143 {
144  NSHOT = 0, CONTINUOUS = 1, PRBS = 2, STOP = 3
146 
148 typedef enum
149 {
152 
154 typedef enum
155 {
158 
159 //Enum to select how a SYSREF is requested.
160 typedef enum
161 {
162  SPI = 0, PIN = 1
164 
166 typedef struct
167 {
174  uint16_t sysrefDivide;
175 
177 
179 typedef struct
180 {
187 
188 #ifdef __cplusplus
189 }
190 #endif
191 
192 #endif
SIX_PULSES
@ SIX_PULSES
Definition: t_ad9528.h:156
INV_PLL1_OUTPUT
@ INV_PLL1_OUTPUT
Definition: t_ad9528.h:82
DIFFERENTIAL
@ DIFFERENTIAL
Definition: t_ad9528.h:94
clockOutputSettings
ad9528outputSettings_t clockOutputSettings
Definition: myk_ad9528init.c:35
ad9528Device_t::outputSettings
ad9528outputSettings_t * outputSettings
Definition: t_ad9528.h:184
ad9528sysrefSettings_t::sysrefRequestMethod
sysrefRequestMethod_t sysrefRequestMethod
Definition: t_ad9528.h:168
ad9528sysrefSettings_t::sysrefSource
sysrefSourceSelection_t sysrefSource
Definition: t_ad9528.h:169
ad9528outputSettings_t::outPowerDown
uint16_t outPowerDown
Definition: t_ad9528.h:126
NSHOT
@ NSHOT
Definition: t_ad9528.h:144
ad9528pll2Settings_t::totalNdiv
uint8_t totalNdiv
Definition: t_ad9528.h:120
clockPll1Settings
ad9528pll1Settings_t clockPll1Settings
Definition: myk_ad9528init.c:18
STOP
@ STOP
Definition: t_ad9528.h:144
CHANNEL_DIV
@ CHANNEL_DIV
Definition: t_ad9528.h:80
sysrefNshotMode_t
sysrefNshotMode_t
Enum to select the SYSREF output # of pulses for NSHOT mode.
Definition: t_ad9528.h:154
ad9528pll2Settings_t::rfDivider
uint8_t rfDivider
Definition: t_ad9528.h:118
ad9528outBufferControl_t
ad9528outBufferControl_t
Enum to select what output buffer standard is used for the clock outputs.
Definition: t_ad9528.h:86
t_ad9528.h
Contains enum and structure data types for all AD9528 function calls.
ad9528pll1Settings_t::refA_Frequency_Hz
uint32_t refA_Frequency_Hz
Definition: t_ad9528.h:100
ONE_PULSE
@ ONE_PULSE
Definition: t_ad9528.h:156
TWO_PULSES
@ TWO_PULSES
Definition: t_ad9528.h:156
LEVEL_ACTIVE_LOW
@ LEVEL_ACTIVE_LOW
Definition: t_ad9528.h:150
ad9528outputSettings_t
Structure to hold AD9528 Output Clock settings.
Definition: t_ad9528.h:124
ad9528pll1Settings_t::refB_Divider
uint16_t refB_Divider
Definition: t_ad9528.h:105
HSTL
@ HSTL
Definition: t_ad9528.h:88
ad9528pll1Settings_t
Structure to hold AD9528 PLL1 settings.
Definition: t_ad9528.h:98
ad9528Device_t::pll2Settings
ad9528pll2Settings_t * pll2Settings
Definition: t_ad9528.h:183
FOUR_PULSES
@ FOUR_PULSES
Definition: t_ad9528.h:156
ad9528sysrefSettings_t::sysrefPinEdgeMode
sysrefPinEdgeMode_t sysrefPinEdgeMode
Definition: t_ad9528.h:170
EXTERNAL
@ EXTERNAL
Definition: t_ad9528.h:138
LEVEL_ACTIVE_HIGH
@ LEVEL_ACTIVE_HIGH
Definition: t_ad9528.h:150
ad9528pll1Settings_t::refB_Frequency_Hz
uint32_t refB_Frequency_Hz
Definition: t_ad9528.h:104
sysrefRequestMethod_t
sysrefRequestMethod_t
Definition: t_ad9528.h:160
ad9528RefBuffer_t
ad9528RefBuffer_t
Enum to select the clock input buffer mode.
Definition: t_ad9528.h:92
ad9528Device_t
Structure to hold AD9528 settings.
Definition: t_ad9528.h:179
PLL1_OUTPUT
@ PLL1_OUTPUT
Definition: t_ad9528.h:80
ad9528pll2Settings_t::n2Divider
uint8_t n2Divider
Definition: t_ad9528.h:119
spiSettings_t
Data structure to hold SPI settings for all system device types.
Definition: common.h:61
RISING_EDGE
@ RISING_EDGE
Definition: t_ad9528.h:150
clockPll2Settings
ad9528pll2Settings_t clockPll2Settings
Definition: myk_ad9528init.c:30
ad9528pll2Settings_t
Structure to hold AD9528 PLL2 settings.
Definition: t_ad9528.h:116
EXT_RESAMPLED
@ EXT_RESAMPLED
Definition: t_ad9528.h:138
ad9528pll1Settings_t::vcxo_Frequency_Hz
uint32_t vcxo_Frequency_Hz
Definition: t_ad9528.h:108
ad9528Device_t::spiSettings
spiSettings_t * spiSettings
Definition: t_ad9528.h:181
ad9528sysrefSettings_t
Structure to hold AD9528 SYSREF output settings.
Definition: t_ad9528.h:166
SPI
@ SPI
Definition: t_ad9528.h:162
clockSysrefSettings
ad9528sysrefSettings_t clockSysrefSettings
Definition: myk_ad9528init.c:45
ad9528Device_t::sysrefSettings
ad9528sysrefSettings_t * sysrefSettings
Definition: t_ad9528.h:185
ad9528sysrefSettings_t::sysrefPatternMode
sysrefPatternMode_t sysrefPatternMode
Definition: t_ad9528.h:172
sysrefPinEdgeMode_t
sysrefPinEdgeMode_t
Enum to select the SYSREF input pin mode.
Definition: t_ad9528.h:148
CONTINUOUS
@ CONTINUOUS
Definition: t_ad9528.h:144
ad9528pll1Settings_t::refB_bufferCtrl
ad9528RefBuffer_t refB_bufferCtrl
Definition: t_ad9528.h:106
SINGLE_ENDED
@ SINGLE_ENDED
Definition: t_ad9528.h:94
LVDS_BOOST
@ LVDS_BOOST
Definition: t_ad9528.h:88
ad9528sysrefSettings_t::sysrefNshotMode
sysrefNshotMode_t sysrefNshotMode
Definition: t_ad9528.h:173
ad9528sysrefSettings_t::sysrefPinBufferMode
ad9528RefBuffer_t sysrefPinBufferMode
Definition: t_ad9528.h:171
ad9528pll1Settings_t::bypassPll1
uint8_t bypassPll1
Definition: t_ad9528.h:112
INTERNAL
@ INTERNAL
Definition: t_ad9528.h:138
SYSREF
@ SYSREF
Definition: t_ad9528.h:81
ad9528pll1Settings_t::refA_bufferCtrl
ad9528RefBuffer_t refA_bufferCtrl
Definition: t_ad9528.h:102
EIGHT_PULSES
@ EIGHT_PULSES
Definition: t_ad9528.h:156
ad9528pll1Settings_t::refA_Divider
uint16_t refA_Divider
Definition: t_ad9528.h:101
NEG_SINGLE_ENDED
@ NEG_SINGLE_ENDED
Definition: t_ad9528.h:94
sysrefPatternMode_t
sysrefPatternMode_t
Enum to choose the SYSREF pattern mode.
Definition: t_ad9528.h:142
ad9528outSourceSel_t
ad9528outSourceSel_t
Enum to select what source outputs from each AD9528 output channel.
Definition: t_ad9528.h:78
DISABLED
@ DISABLED
Definition: t_ad9528.h:94
ad9528sysrefSettings_t::sysrefDivide
uint16_t sysrefDivide
Definition: t_ad9528.h:174
PRBS
@ PRBS
Definition: t_ad9528.h:144
clockAD9528_
ad9528Device_t clockAD9528_
Definition: myk_ad9528init.c:55
ad9528pll1Settings_t::vcxoBufferCtrl
ad9528RefBuffer_t vcxoBufferCtrl
Definition: t_ad9528.h:109
FALLING_EDGE
@ FALLING_EDGE
Definition: t_ad9528.h:150
PIN
@ PIN
Definition: t_ad9528.h:162
LVDS
@ LVDS
Definition: t_ad9528.h:88
ad9528Device_t::pll1Settings
ad9528pll1Settings_t * pll1Settings
Definition: t_ad9528.h:182
ad9528pll1Settings_t::nDivider
uint16_t nDivider
Definition: t_ad9528.h:111
sysrefSourceSelection_t
sysrefSourceSelection_t
Enum to select the SYSREF output source.
Definition: t_ad9528.h:136