Wiki

This version is outdated by a newer approved version.DiffThis version (19 Apr 2021 14:01) is a draft.
Approvals: 0/1

This is an old revision of the document!


Mbed IIO Application

Introduction

This page gives an overview of using the ARM Mbed platform supported firmware example with Analog Devices AD4130 Evaluation board and SDP-K1 controller board. This example code leverages the ADI developed IIO (Industrial Input Output) ecosystem to evaluate the AD4130 device by providing a device debug and data capture support. The overview of an entire system is shown below: IIO oscilloscope is used as client application running on windows-os, which is ADI developed GUI for ADC data visualization and device debug. The interface used for communicating client application with firmware application (IIO device) is UART. The firmware application communicates with IIO device (AD4130) using ADI No-OS drivers and platform drivers low level software layers. SDP-K1 is used as controller board, on which IIO firmware application runs and using above software libraries, the IIO firmware communicates with AD4130 IIO device. The AD4130 eval board is used for development and testing of this application.

Hardware Connections

Jumper Settings

  • SDP-K1:
    Connect the VIO_ADJUST jumper on the SDP-K1 board to 3.3V position to drive SDP-K1 GPIOs at 3.3V
  • EVAL-AD4130:

Hardware Interface

AD4130 uses SPI communication for device register access and data capture. SDP-K1 is powered through USB connection from the computer. SDP-K1 acts as a Serial device when connected to PC, which creates a COM Port to connect to IIO Oscilloscope GUI running on windows-os. The COM port assigned to a device can be seen through the device manager for windows based OS.

Software Downloads

Firmware

Quick Start to Use Mbed IIO Firmware

If you have some familiarity with the Mbed platform, the following is a basic list of steps required to start running the code, see below for more detail:

  1. Connect the AD4130 EVAL-board to the SDP-K1 controller board as specified in hardware connections section.
  2. Connect the SDP-K1 controller board to your computer over USB provided along with SDP-K1 board.
  3. Go to the link of the code provided above in the 'Downloads' section and import code into Mbed Online Compiler.
  4. Ensure SDP-K1 controller board is selected (top right of online-compiler page). (SDP-K1 platform pre-installed from here.
  5. The original firmware program may require few configurations to suits the REV E board.
    1. Open the app folder and open the file app_config.h.
    2. Comment line 31 and uncomment line 32 to select WLCSP package type for AD4130.
    3. Go to line 49 and line 54, change source pin D3 to D2.
    4. Go to line 51 to change SDP-120 source pin from SDP_GPIO_1 to SDP_GPIN_5.
  6. Compile the code.
  7. After a successful compile a binary will be downloaded to your computer - store this on your drive.
  8. Drag and drop this binary to the USB drive hosted by your controller board.

*Note: For more details on importing code into Mbed online compiler, refer below link (Section: Importing from local machine): here.

Libiio: IIO Library

This library provides an abstracted library interface to communicate IIO device (AD4130) and IIO client application (IIO Oscilloscope) without worrying about the low level hardware details. Download and install below libiio windows installer in your computer. Libiio installer for Windows (Use below link):

IIO Oscilloscope (Client)

This is a GUI (Graphical User Interface) based IIO client application for data visualization and device configuration/debugging. The data from IIO devices (ADCs/DACs) is transmitted over Serial/Ethernet/USB link to IIO Oscilloscope client through the abstracted layer of “libiio”. Download and install below IIO Oscilloscope windows installer in your computer. IIO Oscilloscope installer for Windows (Use below link):

Evaluating AD4130 Using IIO Ecosystem

Ensure that hardware connection has been made properly in between Controller Board (SDP-K1) and AD4130 Eval board. Also ensure all software's (IIO firmware, Libiio windows installer and IIO Oscilloscope windows installer) are downloaded and installed in your computer before trying to communicate with AD4130 device.

Running IIO Oscilloscope (Client)

Open the IIO Oscilloscope application from start menu and configure the serial (UART) settings as shown below. Click on refresh button and AD4130 device should pop-up in IIO devices list.

Click 'Connect' and select the AD4130 device from the drop down menu list of 'Device Selection'. It should display below screen after selecting available device.

Configure/Access Device Attributes (Parameters)

The IIO Oscilloscope allows user to access and configure different device parameters, called as 'Device Attributes“. There are 2 types of attributes:

  1. Device Attributes (Global): Access/Configure common device parameters e.g. Vbias
  2. Channel Attributes (Specific to channels): Access/Configure channel specific device parameters e.g. PGA, filter FS, setup, etc

How to read and write attribute:

  • To 'Read' an attribute, simply select the attribute from a list or press 'Read' button on left side.
  • To 'Write' an attribute, write attribute value in the 'value field' and press 'Write' button. The value to be written corresponds to expected bit-field for that parameter, specified in the datasheet. For example, below figure shows how to write a “positive analog input” value.
resources/eval/user-guides/ad4130/mbed_iio_app.1618833660.txt.gz · Last modified: 19 Apr 2021 14:01 by Zhaoqun Guo