This version is outdated by a newer approved version.DiffThis version (18 Apr 2022 05:37) was approved by jonathan colao.The Previously approved version (25 Jan 2021 11:17) is available.Diff

This is an old revision of the document!

AD738x - No-OS Driver

Supported Devices

Evaluation Boards


The AD7380 family of generics are dual and quad 16-bit, 14-bit, and 12-bit pin-compatible family of simultaneous sampling, high speed, low power, successive approximation analog-to-digital converters (ADC) that operate from a 3.3 V power supply and features throughput rates up to 4 MSPS. The analog input type is differential for the AD7380, AD7381, AD4680, AD4681, AD7380-4, AD7389-4, AD7381-4 can accept a wide common mode input voltage, and are sampled and converted on the falling edge of CS. The AD7383, AD7384, AD4682 and AD4683 have the pseudo-differential input while the AD7386, AD7387, AD7388, AD4684 and AD4685 have single-ended input. The AD7380 family has optional integrated on-chip oversampling blocks to improve dynamic range and reduce noise at lower bandwidths. An internal 2.5 V reference is included.

Alternatively, an external reference up to 3.3 V can be used. The conversion process and data acquisition use standard control inputs allowing for easy interfacing to microprocessors or DSPs. It is compatible with 1.8 V, 2.5 V, and 3.3 V interfaces, using a separate logic supply.

The dual AD7380, AD7381, AD4680, AD4681, AD7383,AD7384, AD4682, AD4683, AD7386, AD7387, AD7388, AD4684 and AD4685 family are available in a 16-lead 3mm x 3mm LFCSP package while the quad generics AD7380-4, AD7389-4, and AD7381-4 are available in 4mmx4mm LFCSP package. Both the duals and quad generic operate in specified from −40°C to +125°C temperature range.


  • Motor control position feedback
  • Motor control current sense
  • Data acquisition systems
  • EDFA applications
  • I and Q demodulation
  • Power Quality

HDL Design Description

In the ADI Reference Designs HDL User Guide can be found an in-depth presentation and instructions about the HDL design in general.

The reference design uses the standard SPI Engine Framework with an integrated pulse generator, which will provide the required conversion rate for the ADC.

In order to build the HDL design the user has to go through the following steps:

  1. Confirm that you have the right tools (the reference design requires Vivado 2018.3)
  2. Clone the HDL GitHub repository (the project is located at ad738x_fmc)

Software Setup

In order to perform the software setup the user has to go through the following steps:

  1. Confirm that you have the right tools (the reference design requires XSDK)
  2. Clone the No-OS GitHub repository (the project is located at ad738x-fmcz )
  3. Follow the instructions provided by software_setup.

No-OS Driver Description

Functions Declarations

Function Description
int32_t ad738x_init(ad738x_dev **device, ad738x_init_param init_param)
Initialize the device.
int32_t ad738x_remove(ad738x_dev *dev)
Free the resources allocated by ad738x_init().
int32_t ad738x_reference_sel(ad738x_dev *dev, ad738x_ref_sel ref_sel)
Enable internal or external reference.
int32_t ad738x_power_down_mode(ad738x_dev *dev, ad738x_pwd_mode pmode)
Device power down.
int32_t ad738x_oversampling_config(ad738x_dev *dev, ad738x_os_mode os_mode, ad738x_os_ratio os_ratio, ad738x_resolution res)
Sets the oversampling mode in the device (os_mode). Sets the oversampling ratio (osr). Sets the size of the conversion result data (res)
int32_t ad738x_reset(ad738x_dev *dev, ad738x_reset_type reset)
Device reset over SPI.
int32_t ad738x_set_conversion_mode(ad738x_dev *dev, ad738x_conv_mode mode)
Select if ADC A and ADC B output on both SDOA and SDOB lines (two wire mode) or only on on the SDOA line.
int32_t ad738x_spi_single_conversion(ad738x_dev *dev, uint16_t *adc_data)
Read conversion result from device.
int32_t ad738x_spi_write_mask(ad738x_dev *dev, uint8_t reg_addr, uint32_t mask, uint16_t data)
SPI write to device using a mask.
int32_t ad738x_spi_reg_write(ad738x_dev *dev, uint8_t reg_addr, uint16_t reg_data)
Write to device.
int32_t ad738x_spi_reg_read(ad738x_dev *dev, uint8_t reg_addr, uint16_t *reg_data)
Read from device.

Types Declarations

typedef enum {
} ad738x_conv_mode;
typedef enum {
} ad738x_os_mode;
typedef enum {
} ad738x_os_ratio;
typedef enum {
} ad738x_resolution;
typedef enum {
} ad738x_reset_type;
typedef enum {
} ad738x_pwd_mode;
typedef enum {
} ad738x_ref_sel;
typedef struct {
        /* SPI */
        spi_desc		    *spi_desc;
        /* Device Settings */
        ad738x_conv_mode 	conv_mode;
	ad738x_resolution 	resolution;
} ad738x_dev;
typedef struct {
        /* SPI */
        spi_init_param		    spi_init;
        /* Device Settings */
        ad738x_conv_mode 		conv_mode;
        ad738x_ref_sel			ref_sel;
} ad738x_init_param;

HDL Downloads

No-OS Downloads

resources/eval/user-guides/ad738x.1650253014.txt.gz · Last modified: 18 Apr 2022 05:36 by jonathan colao