Run the ADRV9002 Demonstration via Ethernet - ArrowElectronics/data-storm-daq GitHub Wiki
In addition to the DataStorm DAQ development kit running in standalone mode, it can also run while connected to computer remotely via an Ethernet cable.
Configuration for remote IIO Oscilloscope access via ethernet
The ADRV9002 Evaluation Platform in this configuration is comprised of the following components:
- Analog Devices EVAL-ADRV9002NP/W1/PCBZ data converter board
- DataStorm DAQ (Trenz Intel Cyclone V SoC TEI0022 Development Board) (includes 12VDC power supply)
- Two (2) RG316 SMA RF Cables
- Host Windows PC with IIO Oscilloscope installed
- Ethernet Cable
- Micro USB cable
Configure BOOTSEL DIP Switches
Select the SD card as the boot source for the processor. Modify the DIP switch settings to match the image below.
Configure FMC_VADJ DIP Switches
The FMC_VADJ power rails provide power to the EVAL-ADRV9002NP/W1/PCBZ via the FMC interface. This is an adjustable voltage. It must be set to 1.8V. Failure to do so can potentially cause damage to the EVAL-ADRV9002NP/W1/PCBZ. Modify the VID_SW DIP switch settings to select 1.8V.
Modify the DIP switch settings to match the image below.
Assemble the Hardware
Follow the steps in the order shown below.
- Insert the EVAL-ADRV9002NP/W1/PCBZ FMC connector into the FMC mating connector on the Trenz TEI0022 board
- Attach PC via ethernet cable
- Attach the Micro USB cable
- Connect an RG316 RF Cable between RX2A_IN and TX2_OUT SMA connectors
- Connect an RG316 RF Cable between RX1A_IN and TX1_OUT SMA connectors
- Connect the power supply to the TEI0022
- Plug the AC-DC adapter into an AC outlet
Software for remote IIO Oscilloscope access via ethernet
There are a few software components that need to be installed in order to run this demo successfully:
- IIO Oscilloscope™
- A SW terminal like Tera Term VT or Putty
IIO Oscilloscope™
IIO Oscilloscope™ is a tool developed by Analog Devices. It can be downloaded from this web site: https://github.com/analogdevicesinc/iio-oscilloscope/releases (Download and install v0.14)
Define the host PC IP address
A wired ethernet point-to-point connection between the host PC and the embedded target is required. Use this link for instructions on how to assign a static IP address to the host Ethernet adapter. Set the following values
-
IP address : 192.168.0.1
-
Subnet mask : 255.255.255.0
-
No entries required for the other fields
Connect to the target terminal
- A wired Micro USB serial port connection between the host PC and the embedded target is required
- Launch a terminal program (like Tera Term VT or Putty) and connect using serial port
- Select 115200 baud
- Select the appropriate target COM port
Define the target IP address
Type the following at the terminal prompt to set the target IP address
- $ ifconfig eth0 192.168.0.2 up
Launch IIO Oscilloscope
Double click the IIO Oscilloscope application icon on the host Windows PC.
Note: IIO Oscilloscope creates a .osc_profile.ini file in the Users/UserName/Appdata/Local directory. The next time IIO Oscilloscope is opened, the existence of this file delays connection to the target. It is recommended to delete the .osc_profile.ini (if it exists) prior to launching IIO Oscilloscope.
Connect to the target
-
Select the Discoverable/Scan option and click the Refresh button..
-
A successful connection results in discovery of the IIO devices. Press OK to continue.
Profile and Stream Configuration Settings
The IIO Oscilloscope includes option to configure stream and profile configurations to select the desired mode of operation for ADRV9002. Users can specify, through the GUI, the stream and profile configuration files to run on that device configuration.
ADRV9002 currently supports the following device configurations:
CMOS-CSSI 1-Lane mode
Download the 1-Lane stream and profile configuration files from the following links respectively:
- Click on the box under Load Stream
- Navigate to the folder where given configuration files above have been downloaded in the PC. Select the Custom_1Lane_CMOS.bin stream configuration file and click Open.
- Clear the error message. Press Close
- Click on the box under Load Profile
- Navigate to the folder where given configuration files above have been downloaded in the PC. Select the Custom_1Lane_CMOS.json profile configuration file and click Open.
- Clear the error message. Press Close
CMOS-CSSI 4-Lane mode
Download the 4-Lane stream and profile configuration files from the following links respectively:
- Click on the box under Load Stream
- Navigate to the folder where given configuration files above have been downloaded in the PC. Select the Custom_4Lane_CMOS.bin stream configuration file and click on Open.
- Clear the error message. Press Close
- Click on the box under Load Profile
- Navigate to the folder where given configuration files above have been downloaded in the PC. Select the Custom_4Lane_CMOS.json profile configuration file and click on Open.
- Clear the error message. Press Close
Receiver / Transmitter settings
Set the Local Oscillator for the receiver and transmitter to be 2400 MHz. Set the transmitter attenuation to -24 dB.
Transmit DDS Waveforms
The IIO Oscilloscope includes Transmit / Direct Digital Synthesis (DDS) waveform controls. Users specify, through the GUI, a selection of waveforms to be transmitted.
Transmit a One CW tone
- Select the One CW Tone option in the DDS mode pulldown menu
- Select an appropriate frequency. 10 kHz is suitable for the 1.92 MSPS sample rate.
- Select a Scale of -18 dB (default)
View the waveform
View the wave in the time domain:
- Switch to the Plot window. Add a Plot window if necessary. File --> New Plot
- In the Plot Channels section select voltage0_i and voltage0_q
- In the Plot Type section select the Time Domain mode
- Press the Capture / Stop button for a continuous waveform. Press the Single Shot capture to obtain a snapshot.
View the wave in the frequency domain:
- In the Plot Type section select the Frequency Domain mode.
- Select a 16384 FFT Size and set Average to 10.
- Press the Capture / Stop button for a continuous display of the spectrum.
- Right click in the display plot and select Peak Markers
_(Note that your peak marker values may differ from those shown in the image.
Transmit Two CW tones
- Select the Two CW Tones option in the DDS mode pulldown menu
- Select appropriate frequencies. 10 and 30 kHz are suitable choices.
- Select a Scale of -18 dB (default)
View the waveform
View the wave in the time domain:
- Switch to the Plot window. Add a Plot window if necessary. File --> New Plot
- In the Plot Channels section select voltage0_i and voltage_q
- In the Plot Type section select the Time Domain mode
- Press the Capture / Stop button for a continuous waveform. Press the Single Shot capture to obtain a snapshot.
View the wave in the frequency domain:
- In the Plot Type section select the Frequency Domain mode.
- Select a 16384 FFT Size and set Average to 10.
- Press the Capture / Stop button for a continuous display of the spectrum.
- Right click in the display plot and select Peak Markers
Transmit Complex waveforms
- Select the DAC Buffer Output option in the DDS mode pulldown menu
- Select qam16_20M waveform
- Select DAC Channels voltage0 and voltage1
View the wave in the frequency domain:
- In the Plot Type section select the Frequency Domain mode.
- Select a 4096 FFT Size and set Average to 10.
- Press the Capture / Stop button for a continuous display of the spectrum.
Change the file selection to LTE20
Change the file selection to Tx_20MHz_245.76Msps_PeakScaling3.0dBFS_ETM1.1_PAR7.5db_Offset0MHz_4Carrier
Software for the Python demonstration
NOTE: This example is demonstrated with an internal loopback configuration enabled on both TX channels in ADRV9002.
There are a few software components that need to be installed in order to run this demonstration successfully:
Install Python 3.7
-
Download Python 3.7 and run the installer
-
A typical installation location will be C:\Users\username\AppData\Local\Programs\Python
-
Edit the Windows System PATH environment variable to add the path to the Python directory
-
Edit the Windows System PATH environment variable to add the path to the Python\Scripts directory
Install PIP
- Use the following instructions to install PIP
Install LibIIO - API library for IIO
- Download and run the latest LibIIO installer from the GitHub releases page here
Install PyADI-IIO and matplotlib
-
Open a Windows CMD shell.
C:\Users\myuser> pip install pyadi-iio C:\Users\myuser> python -m pip install -U matplotlib C:\Users\myuser> python -m pip install -U scipy
Download Python source code
- Download the python source code from the github repository
NOTE: Python script, by default, runs on a DDS mode configuration. To use any other TX modes available in the FPGA, use the variable TX_DAC_MODE as shown below and set the value according the instructions provided in the code comment.
-
Run the Python source code. Open a Windows CMD shell
C:\Users\myuser\pyadi-iio\examples> python adrv9002_example.py
This capture shows a DDS single tone waveform with its I and Q components at a -10kHz frequency and a 0.9 scale value.
Software for the C demonstration
NOTE: This example is demonstrated with an internal loopback configuration enabled on both TX channels in ADRV9002.
The C examples provided are only tested on a Linux environment as mentioned here. The following example is demonstrated using the Arrow Ubuntu-64bit VM provided in the build prerequisites here.
There are a few software components that need to be installed in order to run this demonstration successfully:
Install LibIIO - API library for IIO
- Follow this tutorial to directly install LibIIO dependencies on the host machine.
Run the C programs
- Download the C source code from the github repository
NOTE: C program, by default, runs on a DDS mode configuration. To use any other TX modes available in the FPGA, use the variable TX_DAC_MODE as shown below and set the value according the instructions provided in the code comment.
-
Compile the C source code (Use -liio flag to dynamically link the LibIIO libraries)
$ gcc adrv9002-iiostream.c -o adrv9002-iiostream -liio
-
Run the C executable (use your relevant target IP address here)
$ ./adrv9002-iiostream ip:192.168.0.2
Software for the MATLAB demonstration
NOTE: This example is demonstrated with an internal loopback configuration enabled on both TX channels in ADRV9002.
This demonstration requires a licensed version of MATLAB and Simulink along with the Communication Toolbox installed.
There are a few software components that need to be installed in order to run this demonstration successfully:
Install MATLAB
- Follow these instructions to install MATLAB and Simulink
- Use Add-On Manager to install Communication Toolbox in MATLAB
Install LibIIO - API library for IIO
- Download and run the LibIIO installer from the GitHub releases page here
Run MATLAB
-
Download the MATLAB source for DDS Single Tone demo from the github repository. Demo examples for DAC/DMA Buffer and DDS Dual Tone signals are also available on the respective links as per desired application.
-
Open the Simulink model DAQ9002.slx file
- Double click on the system object block of adrv9002-phy. Set your relevant target IP Address in the "IP Address".
- Double click on the system object block of axi-adrv9002-tx-lpc. Set your relevant target IP Address in the "IP Address".
- Set your preferred stop time or keep it at default (inf) and run the simulation to see waveforms
The following capture shows a DDS single tone waveform on both channels. Channel 1 has I and Q components at a 5kHz frequency at a 0.9 scale value while Channel 2 has 10kHz frequency at a 0.5 scale value.
The following capture shows the FFT output of the I channel of Channel 1 at 5kHz frequency from the Spectrum Analyser.
NOTE: Output shown here is of only the DDS generated single tone waveforms. Examples for DMA/DAC Buffer and DDS Dual Tone signals have also been provided that can be utilized based on the desired application.
Shutting down the demo
-
Power down the target. Type the following at the terminal prompt
$ poweroff
-
Wait until the linux terminal shows
$ reboot : System Halted
-
Close out IIO Oscilloscope and all associated windows