CN0531 no-OS Example Project

See projects/cn0531 (doxygen) for the Doxygen documentation.

Supported Evaluation Boards

Overview

The EVAL-CN0531-PMDZ is a precision DAC module designed for applications such as medical instrumentation, test and measurement equipment, industrial control, and scientific research. It features the AD5791, a 20-bit DAC with 1 ppm accuracy and ±1 LSB Integral Non-Linearity (INL). It provides flexibility with support for multiple voltage references and power options, allowing use of onboard or external power supplies and voltage references. The module's compatibility with the SPI Pmod interface enables versatile and precise analog output applications.

Applications

  • Medical instrumentation

  • Test and measurement equipment

  • Industrial control

  • Scientific and aerospace instrumentation

Hardware Specifications

Power Supply Requirements

The EVAL-CN0531-PMDZ module requires a power supply that can be configured to use either onboard power converters or external power sources. The onboard converters can generate the necessary voltage levels from a single external input, which is usually supplied by a connected development platform. Alternatively, users can choose to supply power directly through external connections, which can be beneficial for integration into systems with existing power infrastructure. The module's voltage range spans from -5V to +5V, allowing it to be flexible for use in various high-precision applications like scientific instrumentation and industrial control. The high power supply rejection ratio and low operating drift provided by the onboard voltage regulators enhance its stability and precision.

No-OS Supported Examples

This project is organized around the no-OS variant based build flow. Selecting a variant at build time (--variant <name>) chooses which application is compiled. The platform main() is a thin dispatcher that calls example_main(), provided by the selected example. The initialization data used in the examples is defined in src/common, and the platform-specific macros in src/platform.

IIO Example

This project is an IIOD demo for the EVAL-CN0531-PMDZ board. The IIO example code initializes the AD5791 DAC over SPI and sets up UART communication for IIO transport. The AD5791 DAC is controlled via IIO descriptors, and the main function manages the setup and execution of the IIO application, utilizing IIO buffers for data transfers with the DAC.

The project launches a IIOD server on the board so that the user may connect to it via an IIO client. Using IIO Oscilloscope, the user can configure the DAC and view the output data on a plot.

If you are not familiar with ADI IIO Application, please take a look at: IIO No-OS

If you are not familiar with ADI IIO Oscilloscope Client, please take a look at: IIO Oscilloscope

The No-OS IIO Application together with the AD5791 no-OS driver takes care of all the back-end logic needed to setup the IIO server.

This example is built by selecting the iio variant (see the Build Command below).

IIO Example over Wi-Fi

Same IIO example as above, but the IIOD transport runs over an ESP8266 Wi-Fi module (UART AT commands) instead of the serial backend. The board connects to the configured access point and the IIO client connects to the reported IP address.

Set the network credentials in the iio_wifi defconfig iio_wifi.conf via CONFIG_WIFI_SSID and CONFIG_WIFI_PWD before building, for example:

CONFIG_WIFI_SSID="MyNetwork"
CONFIG_WIFI_PWD="MyPassword"

This example is built by selecting the iio_wifi variant (see the Build Command below). It is available on the ADuCM/eval-adicup3029 target only.

The EVAL-ADICUP3029 does not carry an on-board Wi-Fi module: an external ESP8266 module has to be connected to the EVAL-ADICUP3029 P1 connector. Set the UART switch S2 to the "WiFi Module" (right) position to route UART0 to the P1 Wi-Fi connector; the module is driven over UART0 at 115200 baud and its reset line is not connected (the module is reset in software).

P1 Wi-Fi Net

ADuCM3029 Pin

Function

UART0_TX

P0.10 (UART0 TX)

Data from the ADuCM3029 to the module

UART0_RX

P0.11 (UART0 RX)

Data from the module to the ADuCM3029

Reset

Not connected

Module is reset in software

Power (pin 8)

+3.3V

Module power supply

Ground (pin 1)

DGND

Common ground

The ESP8266 must run AT firmware configured for 115200 baud, and its CH_PD/EN pin must be tied high (and GPIO0 left high at boot) for the module to start; otherwise no response is received and initialization times out.

No-OS Supported Platforms

ADuCM Platform

Used Hardware

Connections

Connect the EVAL-CN0531-PMDZ to the EVAL-ADICUP3029 using the P8 connector.

Plug the USB Type A connector into your PC and the micro USB connector into the EVAL-ADICUP3029.

Build Command

For toolchain setup and prerequisites, see the ADuCM3029 CMake build guide.

Available variants: iio, iio_wifi. Available boards: eval-adicup3029. Replace --variant / --board accordingly.

# point at the CrossCore Embedded Studio install (only if not auto-detected)
export CCES_HOME=/opt/analog/cces/3.0.3
# Windows (PowerShell): $env:CCES_HOME = "C:\analog\cces\3.0.3"

cd no-OS

# build the iio example on the EVAL-ADICUP3029
python tools/scripts/no_os_build.py build \
        --project cn0531 --variant iio --board eval-adicup3029

# build the iio example over Wi-Fi (ESP8266)
python tools/scripts/no_os_build.py build \
        --project cn0531 --variant iio_wifi --board eval-adicup3029

# build and flash (requires a connected debug probe)
python tools/scripts/no_os_build.py build \
        --project cn0531 --variant iio --board eval-adicup3029 \
        --probe openocd --flash