Run the ADRV9002 Demonstration Standalone - ArrowElectronics/data-storm-daq GitHub Wiki
The DataStorm DAQ development kit can be run as a standalone desktop computer. This hardware configuration requires a keyboard, mouse, and HDMI monitor
Configuration for local IIO Oscilloscope access
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
- Monitor with HDMI input
- HDMI cable
- Keyboard and Mouse with USB connectors
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 the monitor to the TEI0022 using an HDMI cable
- Attach the keyboard and mouse to the TEI0022 using any of the 4 USB ports
- Connect the RG316 RF Cables between RX2A_IN and TX2_OUT SMA connectors
- Connect the RG316 RF Cables between RX1A_IN and TX1_OUT SMA connectors
- Connect the power supply to the TEI0022
- Plug the AC-DC adapter into an AC outlet
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.
Run the demonstration standalone
Power up the unit and wait approximately 60 seconds for the unit to be fully functional.
Double click on the desktop icon to launch IIO Oscilloscope. A password will be required. It is analog
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
- Click on the box under Load Stream
- Navigate to /home/analog/configs/cmos-cssi/one_lane and select the Custom_1Lane_CMOS.bin stream configuration file. Click on Open.
- Click on the box under Load Profile
- Navigate to /home/analog/configs/cmos-cssi/one_lane and select the Custom_1Lane_CMOS.json profile configuration file. Click on Open.
CMOS-CSSI 4-Lane mode
- Click on the box under Load Stream
- Navigate to /home/analog/configs/cmos-cssi/four_lane and select the Custom_4Lane_CMOS.bin stream configuration file. Click on Open.
- Click on the box under Load Profile
- Navigate to /home/analog/configs/cmos-cssi/four_lane and select the Custom_4Lane_CMOS.json profile configuration file. Click on Open.
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
Run the Example Applications
The LibIIO library API enables access to the transceiver data from C code, Python code, or MATLAB. A small sample of C and Python codes are provided for the reader and can be run natively on the DataStorm DAQ.
NOTE: All examples shown below are demonstrated with an internal loopback configuration enabled on both TX channels in ADRV9002.
Review the Python source code
-
Open a Terminal. Click on the Terminal icon on the top bar of Desktop
$ cd examples/python-examples
-
Review the Python source code
- Open the file explorer from the top bar and navigate to examples/python-examples - Double click on the file adrv9002_example.py to review in the text editor
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 on the Terminal
$ python3 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.
Review the C source code
-
Open a Terminal. Click on the Terminal icon on the top bar of Desktop
$ cd examples/c-examples
-
Review the C source code
- Open the file explorer from the top bar and navigate to examples/c-examples - Double click on the file adrv9002-iiostream.c to review in the text editor
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 on the Terminal (Use -liio flag to dynamically link the LibIIO libraries)
$ gcc adrv9002-iiostream.c -o adrv9002-iiostream -liio
-
Run the C executable using sudo permissions. Password is analog.
$ sudo ./adrv9002-iiostream
Shutting down the demo
-
Power down the target. Launch a Root Terminal. Type the following
$ poweroff
-
Wait 30 seconds and then you can safely power down the DataStorm DAQ