Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:eval:user-guides:ad4130:mbed_iio_app [06 Jul 2022 11:33] – minor updates2 Mahesh Phalkeresources:eval:user-guides:ad4130:mbed_iio_app [31 May 2023 07:54] (current) Mahesh Phalke
Line 1: Line 1:
-===== AD4130 Mbed IIO Application===== +===== AD4130 IIO Application===== 
-====Introduction==== + 
-This page gives an overview of using the ARM Mbed platform supported firmware example with Analog +===== Introduction ===== 
 + 
 +This page gives an overview of using the ARM platforms supported (default is Mbed) firmware example with Analog 
 Devices AD4130 Evaluation board and SDP-K1 controller board. This example code leverages 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  the ADI developed IIO (Industrial Input Output) ecosystem to evaluate the AD4130 device by providing a 
 device debug and data capture support. device debug and data capture support.
-The overview of an entire system is shown below: 
- 
-{{ :resources:eval:user-guides:ad4130:ad4130_iio_application_interfaces.png?600 |}} 
  
-IIO oscilloscope is used as a client application running on windows-os, which is ADI developed GUI for ADC data visualization and device debug. The physical interface used for communicating client application with firmware application (IIO device) is UART/VirtualCOM (*For now only SDP-K1 supports high speed VirtualCOM port @1Mbps or higher speed for faster data transmission). The firmware application communicates with IIO device (AD4130) using ADI No-OS drivers and platform drivers middle-ware software libraries. SDP-K1 is used as controller board, on which IIO firmware application runs and using above software libraries, the IIO firmware communicates with target device. The AD4130 eval board is used for development and testing of this application.+{{section>resources/tools-software/product-support-software/iio_support_introduction#Introduction&showfooter=nofooter}}
  
 ---- ----
  
 ===Useful links=== ===Useful links===
 +{{section>resources/tools-software/product-support-software/useful_links#Useful Link&showfooter=nofooter}}
   * [[adi>en/products/ad4130-8.html|AD4130 Product Page]]   * [[adi>en/products/ad4130-8.html|AD4130 Product Page]]
   * [[adi>en/products/ad4130-8.html#product-evaluationkit|AD4130 Evaluation Kit]]   * [[adi>en/products/ad4130-8.html#product-evaluationkit|AD4130 Evaluation Kit]]
-  * [[https://studio.keil.arm.com/|Keil Studio (Online Compiler)]] 
-  * [[https://os.mbed.com/platforms/SDP_K1/|SDP-K1 on Mbed]] 
  
 ---- ----
Line 30: Line 28:
 <note>Above jumper settings of AD4130 EVB are specific to sensor demo modes supported in the firmware. Change the jumper settings according to your requirements.</note> <note>Above jumper settings of AD4130 EVB are specific to sensor demo modes supported in the firmware. Change the jumper settings according to your requirements.</note>
  
-AD4130 uses SPI communication for device register access and data capture. For data transmission to IIO client, VirtualCOM Or UART serial communication is used. SDP-K1 by default uses the VCOM serial interface for higher speed data transmission. +AD4130 uses SPI communication for device register access and data capture.
-SDP-K1 is powered through USB connections 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.+
  
-{{ :resources:eval:user-guides:ad4130:ad4130_com_ports.png?400 |}} +{{section>resources/tools-software/product-support-software/hardware_connections_uart#UART Connections&showfooter=nofooter}}
- +
-SDP-K1 can support high speed VirtualCOM port USB interface, so by default VCOM is configured as default interface in the firmware. The interface can be set to UART by defining macro “USE_PHY_COM_PORT” in the app_config.h file. +
- +
-{{ :resources:eval:user-guides:ad4130:ad4130_vcom_port.png?600 |}}+
  
 ---- ----
Line 43: Line 36:
 ===== Software Downloads ===== ===== Software Downloads =====
  
-<WRAP round download> +{{section>resources/tools-software/product-support-software/iio_support_software_downloads#Software Downloads&showfooter=nofooter}}
-Latest firmware (Use below link): +
-  * [[https://os.mbed.com/teams/AnalogDevices/code/EVAL-AD4130///|AD4130 Mbed IIO Application]] +
-</WRAP> +
- +
-=== 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: +
- +
-  * Connect the AD4130 EVAL-board to the SDP-K1 controller board as specified in hardware connections section. +
-  * Connect the SDP-K1 controller board to your computer over USB provided along with SDP-K1 board. +
-  * Import the code into Keil Studio from above firmware download link by using "File->Import Project..." option. Specify the web link of code in URL. +
-  * Right click on the project name and select ‘Set Active Project’ option. +
- +
-{{ :resources:eval:user-guides:ad4130:ad4130_keil_studio_active_project.png?400 |}} +
- +
-  * Fix library import issues by selecting ‘Mbed Libraries’ tab at the bottom side of IDE and then clicking on the ‘Fix all problems’ option. Allow some time to checkout all library dependency. +
- +
-{{ :resources:eval:user-guides:ad4130:ad4130_keil_studio_library_fix.png?600 |}} +
- +
-  * Compile the code as shown below: +
-{{ :resources:eval:user-guides:ad4130:ad4130_keil_studio_compile.png?400 |}} +
- +
-  * After a successful build, a binary will be generated and available for download - store this onto your local drive. +
-  * Drag and drop this binary to the USB drive hosted by your controller board (e.g. SDP-K1) to program the microcontroller. +
- +
-==== Libiio: IIO Library ====  +
-This library provides an abstracted library interface to communicate IIO device and IIO client application (e.g. IIO Oscilloscope) without worrying about the low level hardware details. Download and install below [[wiki/LibIIO#libiio]] windows installer in your computer. +
-<WRAP round download> +
-Libiio installer for Windows (Use below link): +
-  * [[repo>libiio/releases|LibIIO Windows installer]] +
-</WRAP> +
- +
-==== 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 (e.g. ADCs/DACs) is transmitted over Serial/Ethernet/USB link to IIO Oscilloscope client through the abstracted layer of “libiio”.  +
-<WRAP round download> +
-Download and install below IIO Oscilloscope windows installer in your computer. +
-IIO Oscilloscope installer for Windows (Use below link): +
-  * [[repo>iio-oscilloscope/releases|IIO Oscilloscope windows installer (.exe)]] +
-</WRAP>+
  
 ---- ----
  
 ==== Evaluating AD4130 Using IIO Ecosystem ==== ==== Evaluating AD4130 Using IIO Ecosystem ====
-<note>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..</note>+ 
 +{{section>resources/tools-software/product-support-software/note_hardware_connections#Note in Hardware Connections&showfooter=nofooter}}
  
 ==== Running IIO Oscilloscope (Client) ==== ==== Running IIO Oscilloscope (Client) ====
Line 140: Line 96:
  
 {{ :resources:eval:user-guides:ad4130:ad4130_iio_osc_freq_domain_plot.png?600 |}} {{ :resources:eval:user-guides:ad4130:ad4130_iio_osc_freq_domain_plot.png?600 |}}
 +
 +----
 +
 +==== Python Environment and Scripts ====
 +
 +Data capture, sensor measurement, device calibration, etc. can be achieved with python based IIO clients, using 'pyadi-iio' library. A possible option using ADI's pyadi-iio library in python has been demonstrated in the forthcoming sections. The python scripts are provided along with firmware package.
 +
 +{{section>resources/tools-software/product-support-software/iio_support_python_application#Python Application&showfooter=nofooter}}
  
 ---- ----
Line 179: Line 143:
 === Sensor Channels Calibration === === Sensor Channels Calibration ===
 It is possible to calibrate the device channels which are connected to external sensors. The sensors calibration (gain and offset) is done by executing the python script “ad4130_calibration.py”. It is possible to calibrate the device channels which are connected to external sensors. The sensors calibration (gain and offset) is done by executing the python script “ad4130_calibration.py”.
- 
----- 
- 
-==== Python Environment and Scripts ==== 
-Data capture, sensor measurement, device calibration, etc. can be achieved with python based IIO clients, using 'pyadi-iio' library. A possible option using ADI's pyadi-iio library in python has been demonstrated in the forthcoming sections. The python scripts are provided along with firmware package. 
- 
-=== Setting-up Python Environment === 
-  * Install python into your local machine. The python scripts are developed and executed using python 3.8.0 version, so recommend using version 3.8.0 or beyond. [[https://www.python.org/downloads/|Download Python]] 
-  * Once python is installed, make sure the environment path (on windows machine) is set properly. You can verify if python is installed properly by typing “python --version” command on command line tool such as gitbash, command prompt, power shell, etc. 
-{{ :resources:eval:user-guides:ad4130:ad4130_python_paths.png?600 |}} 
- 
-  * Install the “pyadi-iio” python package by executing command “python -m pip install pyadi-iio”. Detailed guide on installing it is available here: [[repo>pyadi-iio]]. Make sure to install additional support packages by running requirements.txt file using command “python -m pip install -r requirements.txt” 
- 
-{{ :resources:eval:user-guides:ad4130:pyadi-iio-installation.png?600 |}} 
- 
-=== Modifying/Running Python Scripts === 
-  * All python scripts specific to ad4130 IIO firmware are stored into “scripts” folder present in the project directory. So, any script must be executed from this folder. 
- 
-  * Update the ‘uri’ interface in script according to COM port assigned to your device (sdp-k1). 
- 
-{{ :resources:eval:user-guides:ad4130:ad4130_pyadi-iio-uri-config.png?600 |}} 
- 
-  * Executing the python script by using command “python script_name.py” 
  
 ---- ----
resources/eval/user-guides/ad4130/mbed_iio_app.1657100005.txt.gz · Last modified: 06 Jul 2022 11:33 by Mahesh Phalke