|
| 1 | +AD9467 no-OS Driver |
| 2 | +=================== |
| 3 | + |
| 4 | +Supported Devices |
| 5 | +----------------- |
| 6 | + |
| 7 | +- :adi:`AD9467` |
| 8 | + |
| 9 | +Overview |
| 10 | +-------- |
| 11 | + |
| 12 | +The AD9467 is a 16-bit, monolithic, IF sampling analog-to-digital |
| 13 | +converter (ADC) optimized for high performance over wide bandwidths and |
| 14 | +ease of use. It is ideal for applications such as wireless receivers, |
| 15 | +instrumentation, and test equipment. This ADC operates at a 250 MSPS |
| 16 | +conversion rate while delivering 75.5 dBFS SNR to 210 MHz at 250 MSPS |
| 17 | +and 90 dBFS SFDR to 300 MHz at 250 MSPS. It features 60 fs rms jitter |
| 18 | +and maintains excellent linearity at 250 MSPS with DNL = ±0.5 LSB |
| 19 | +typical and INL = ±3.5 LSB typical. Additional features such as an |
| 20 | +integrated input buffer, external reference support, and selectable |
| 21 | +output data formats via LVDS highlight the device’s versatility and |
| 22 | +robust performance in demanding applications. |
| 23 | + |
| 24 | +Applications |
| 25 | +------------ |
| 26 | + |
| 27 | +- Multicarrier, multimode cellular receivers |
| 28 | +- Antenna array positioning |
| 29 | +- Power amplifier linearization |
| 30 | +- Broadband wireless |
| 31 | +- Radar |
| 32 | +- Infrared imaging |
| 33 | +- Communications instrumentation |
| 34 | + |
| 35 | +Operation Modes |
| 36 | +---------------- |
| 37 | + |
| 38 | ++-----------------+---------------------------------------------+-----------------+-----------------+ |
| 39 | +| Mode Name | Description | Configuration | Typical Use | |
| 40 | +| | | Bits | Case | |
| 41 | ++-----------------+---------------------------------------------+-----------------+-----------------+ |
| 42 | +| Test Mode | Configures the ADC’s output to a test | AD9467_TEST | Verifying | |
| 43 | +| | pattern for diagnostics and calibration. | _IO_OUT_TEST(x) | signal | |
| 44 | +| | Options include various test patterns | | integrity and | |
| 45 | +| | selected via the configuration value. | | performing | |
| 46 | +| | | | system | |
| 47 | +| | | | calibration | |
| 48 | +| | | | tests. | |
| 49 | ++-----------------+---------------------------------------------+-----------------+-----------------+ |
| 50 | +| Normal | Standard ADC operation with all power | AD9467_MODES | Regular data | |
| 51 | +| Operation | circuits active. | _INT_PD_MODE(0) | acquisition | |
| 52 | +| (Power) | | | under typical | |
| 53 | +| | | | operating | |
| 54 | +| | | | conditions. | |
| 55 | ++-----------------+---------------------------------------------+-----------------+-----------------+ |
| 56 | +| Full Power-Down | Reduces power consumption by powering | AD9467_MODES | Low-power or | |
| 57 | +| (Power) | down internal circuitry. | _INT_PD_MODE(1) | standby | |
| 58 | +| | | | applications | |
| 59 | +| | | | requiring | |
| 60 | +| | | | energy | |
| 61 | +| | | | optimization. | |
| 62 | ++-----------------+---------------------------------------------+-----------------+-----------------+ |
| 63 | +| Output Format | Selects the ADC data output format to | AD9467_OUT | Ensuring | |
| 64 | +| Mode | meet host interface requirements. | _FORMAT | compatibility | |
| 65 | +| | | | between the ADC | |
| 66 | +| | | | output and | |
| 67 | +| | | | digital | |
| 68 | +| | | | processing | |
| 69 | +| | | | backend. | |
| 70 | ++-----------------+---------------------------------------------+-----------------+-----------------+ |
| 71 | +| Analog Input | Specifies the ADC’s input coupling type | AD9467_ANALOG | Customizing the | |
| 72 | +| Coupling Mode | (AC or DC) for optimal signal conditioning. | _INPUT_COUPLING | analog | |
| 73 | +| | | | front-end for | |
| 74 | +| | | | targeted signal | |
| 75 | +| | | | characteristics | |
| 76 | ++-----------------+---------------------------------------------+-----------------+-----------------+ |
| 77 | + |
| 78 | +Device Configuration |
| 79 | +-------------------- |
| 80 | + |
| 81 | +The AD9467 driver header file declares a comprehensive set of public |
| 82 | +functions for configuring the ADC device. These functions are organized |
| 83 | +into logical categories based on their functionality. |
| 84 | + |
| 85 | +Initialization |
| 86 | +~~~~~~~~~~~~~~ |
| 87 | + |
| 88 | +In the initialization category, the essential functions for setting up |
| 89 | +and tearing down the AD9467 device are provided. The function |
| 90 | +``ad9467_setup()`` initializes the device by configuring its SPI |
| 91 | +interface and applying default settings, while ``ad9467_remove()`` |
| 92 | +deallocates associated resources and removes the SPI descriptor when the |
| 93 | +device is no longer in use. |
| 94 | + |
| 95 | +Low-Level Register Access |
| 96 | +~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 97 | + |
| 98 | +This function category contains the fundamental functions for performing |
| 99 | +low-level register operations. Through these routines, |
| 100 | +``ad9467_write()`` and ``ad9467_read()`` are used to write to and read |
| 101 | +from device registers via SPI communication, and |
| 102 | +``ad9467_set_bits_to_reg()`` allows for modifying specific bits within a |
| 103 | +register without affecting the other bits. |
| 104 | + |
| 105 | +Operational Modes |
| 106 | +~~~~~~~~~~~~~~~~~ |
| 107 | + |
| 108 | +The operational modes category groups functions that configure and query |
| 109 | +various ADC operating modes. The function ``ad9467_pwr_mode()`` sets the |
| 110 | +power mode of the device, while ``ad9467_test_mode()`` manages the |
| 111 | +activation and status of test patterns. Additionally, |
| 112 | +``ad9467_reset_pn9()`` and ``ad9467_reset_pn23()`` control the reset |
| 113 | +behavior of the device’s pseudo-random sequence tests. |
| 114 | + |
| 115 | +Analog Input and Reference Configuration |
| 116 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 117 | + |
| 118 | +Functions in this group manage the analog input attributes and reference |
| 119 | +voltage settings. The function ``ad9467_external_ref()`` enables or |
| 120 | +disables an external reference voltage, and |
| 121 | +``ad9467_analog_input_disconnect()`` toggles the connection of the |
| 122 | +analog input. Additionally, ``ad9467_offset_adj()`` is used for offset |
| 123 | +adjustments, and ``ad9467_analog_input_coupling()`` selects between AC |
| 124 | +and DC coupling modes for optimal signal conditioning. |
| 125 | + |
| 126 | +Output Configuration |
| 127 | +~~~~~~~~~~~~~~~~~~~~ |
| 128 | + |
| 129 | +This category comprises functions that control the presentation format |
| 130 | +and active state of the ADC output signals. The function |
| 131 | +``ad9467_output_disable()`` is used to enable or disable the data |
| 132 | +output, ``ad9467_output_invert()`` sets the inversion mode of the output |
| 133 | +signal, and ``ad9467_output_format()`` allows the selection of different |
| 134 | +data formatting modes such as offset binary, two’s complement, or gray |
| 135 | +code. |
| 136 | + |
| 137 | +LVDS and Clock Settings |
| 138 | +~~~~~~~~~~~~~~~~~~~~~~~ |
| 139 | + |
| 140 | +Focusing on the LVDS outputs and clock signals, the functions in this |
| 141 | +category adjust the related parameters. Specifically, |
| 142 | +``ad9467_coarse_lvds_adj()`` adjusts the LVDS output current levels, |
| 143 | +``ad9467_dco_clock_invert()`` configures the inversion state of the DCO |
| 144 | +clock, and ``ad9467_dco_output_clock_delay()`` applies the necessary |
| 145 | +delay to the DCO output clock for fine timing control. |
| 146 | + |
| 147 | +Current and Buffer Adjustments |
| 148 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 149 | + |
| 150 | +This group allows fine adjustments to the device’s output current and |
| 151 | +buffer characteristics. The function ``ad9467_output_current_adj()`` |
| 152 | +sets the output current, while ``ad9467_buffer_current_1()`` and |
| 153 | +``ad9467_buffer_current_2()`` control the current levels of the output |
| 154 | +buffers to optimize drive strength and buffering performance. |
| 155 | + |
| 156 | +Voltage Range Adjustment |
| 157 | +~~~~~~~~~~~~~~~~~~~~~~~~ |
| 158 | + |
| 159 | +The voltage range adjustment category focuses on configuring the |
| 160 | +full-scale input voltage range of the ADC. The function |
| 161 | +``ad9467_full_scale_range()`` ensures that the device operates within |
| 162 | +proper voltage limits by setting or querying the input range based on |
| 163 | +system requirements. |
| 164 | + |
| 165 | +Device Update Transfer |
| 166 | +~~~~~~~~~~~~~~~~~~~~~~ |
| 167 | + |
| 168 | +Finally, the device update transfer category includes the function |
| 169 | +``ad9467_transfer()``, which commits configuration changes by initiating |
| 170 | +an update transfer. This function monitors the status bit to confirm |
| 171 | +that all register modifications are properly applied, ensuring stable |
| 172 | +operation before any further actions are taken. |
| 173 | + |
| 174 | +Driver Initialization Example |
| 175 | +----------------------------- |
| 176 | + |
| 177 | +.. code-block::C |
| 178 | +
|
| 179 | + #include <stdio.h> |
| 180 | + #include <stdlib.h> |
| 181 | + #include <stdint.h> |
| 182 | + #include "ad9467.h" |
| 183 | + #include "no_os_spi.h" |
| 184 | + #include "no_os_alloc.h" |
| 185 | +
|
| 186 | + ad9467_init_param ad9467_default_init = { |
| 187 | + .spi_init = { |
| 188 | + .device_id = SPI_DEVICE_ID, |
| 189 | + .max_speed_hz = 2000000u, |
| 190 | + .chip_select = 0, |
| 191 | + .mode = NO_OS_SPI_MODE_0, |
| 192 | + .platform_ops = &xil_spi_ops, |
| 193 | + .extra = &(struct xil_spi_init_param){ |
| 194 | + #ifdef PLATFORM_MB |
| 195 | + .type = SPI_PL, |
| 196 | + #else |
| 197 | + .type = SPI_PS, |
| 198 | + #endif |
| 199 | + } |
| 200 | + } |
| 201 | + }; |
| 202 | +
|
| 203 | + struct ad9467_dev *dev = NULL; |
| 204 | + int ret = 0; |
| 205 | +
|
| 206 | + ret = ad9467_setup(&dev, ad9467_default_init); |
| 207 | + if (ret != 0) |
| 208 | + goto err; |
| 209 | +
|
| 210 | + printf("AD9467 initialization successful\n"); |
| 211 | + goto exit; |
| 212 | + err: |
| 213 | + printf("Error during AD9467 initialization: %d\n", ret); |
| 214 | + exit: |
| 215 | + ; |
| 216 | +
|
0 commit comments