This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

sdruload

Load FPGA and firmware images for USRP® radio

Syntax

sdruload('Device',device)
sdruload('Device',device,Name,Value)
STATUS = sdruload(___)

Description

example

sdruload('Device',device) loads the default FPGA and UHD[1] firmware images for device device.

  • Firmware images are the UHD versions compatible with the Communications Toolbox™ Support Package for USRP® Radio.

    • If the device is an N2xx or X3xx series radio, this syntax loads the default images to the radio at IP address 192.168.10.2.

    • If the device is a USRP2® radio, this syntax writes the images to an SD card.

    You can obtain the compatible UHD version number by entering getSDRuDriverVersion at the MATLAB® command prompt.

sdruload('Device',device,Name,Value) uses additional options specified by one or more Name,Value pair arguments.

STATUS = sdruload(___) returns the status information of the call to sdruload.

Note

sdruload uses the uhd_image_loader utility or the usrp2_card_burner.py Python script provided by Ettus Research® for burning firmware images to the device.

Warning

When burning images with the card burner, it is possible for you to overwrite your hard drive. To avoid accidentally overwriting the wrong drive, when using the card burner script, carefully select the correct drive for the radio.

Examples

collapse all

Load a custom FPGA image to an N210 device and return the status of the operation.

status = sdruload('Device','N210','IPAddress','192.168.30.8',...
'FPGAImage','c:\sdru\uhdapps\images\usrp_n210_r4_fpga_ex.bin')
Checking radio connections...
Ready to write FPGA image
	usrp_n210_r4_fpga_ex.bin
and default firmware image
to n210 device at 192.168.30.8. Would you like to continue? [yes/no]: yes
 
Writing images using uhd_image_loader ...
 
==== Start messages from third party application ====
linux; GNU C++ version 4.9.3; Boost_105600; UHD_003.009.004-vendor

Unit: USRP N210 r4 (ECR16TEUP, 192.168.30.8)
Firmware image: c:\sdru\uhdapps\images\usrp_n210_fw.bin
-- Erasing firmware image...successful.

-- Writing firmware image (0%)
-- Writing firmware image (1%)
.
.
.
-- Writing firmware image (98%)
-- Writing firmware image...successful.

-- Verifying firmware image (0%)
-- Verifying firmware image (1%)
.
.
.
-- Verifying firmware image (98%)
-- Verifying firmware image...successful.
FPGA image: c:\sdru\uhdapps\images\usrp_n210_r4_fpga_ex.bin
-- Erasing FPGA image...successful.

-- Writing FPGA image (0%)
...
-- Writing FPGA image (99%)
-- Writing FPGA image...successful.

-- Verifying FPGA image (0%)
.
.
.
-- Verifying FPGA image (99%)
-- Verifying FPGA image...successful.
-- Resetting device...successful.
==== End messages from third party application ====

status =

  logical

   1

Input Arguments

collapse all

USRP® radio, specified as a comma-separated pair consisting of 'Device' and a USRP radio device from this set {'USRP2', 'n200', 'n210', 'x300', or 'x310'}.

  • If you specify an invalid device, MATLAB responds displaying the list of valid devices.

  • If the device you specify does not match the device connected, the error message returned by MATLAB lists the connected device name and prompts you to specify the connected device or to connect another device.

  • Additional software must be installed prior to executing sdruload to load firmware for an 'USRP2' radio. For more information, see Update USRP2® Radio Firmware.

Example: 'Device','n200'

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: sdruload('Device','USRP2')

IP address where the N2xx or X3xx series radio is located, specified as a comma-separated pair consisting of 'IPAddress' and a valid IP address.

Example: 'IPAddress','192.168.10.2'

Valid SD card drive for USRP2® device, specified as a comma-separated pair consisting of 'Drive' and a valid SD card drive. When Device is specified as'USRP2', sdruload loads the images for a USRP2® radio to an SD card at the SD card drive specified. If you do not specify a value for 'Drive', the function searches for possible SD card drives and prompts you to select one.

This option uses the uhd_image_loader utility provided by Ettus Research.

Example: 'Drive','S:'

FPGA image, specified as a comma-separated pair consisting of 'FPGAImage' and a valid FPGA image file. Use this option to load the FPGA image that is compatible with the UHD version supported by MATLAB and Simulink®.

You can also use this option to load custom FPGA images, including images you generate using the HDL workflow advisor. For more information, see HDL Coder™.

Note

Custom FPGA image uploading is not supported for X300 or X310.

Example: 'FPGAImage','c:\work\fpga\usrp_n210_r4_fpga.bin'

Firmware image, specified as a comma-separated pair consisting of 'FirmwareImage' and a valid firmware image file. Use this option to load the UHD firmware image that is compatible with the UHD version supported by MATLAB and Simulink.

Note

Custom firmware image updating is not supported for X300 or X310.

Example: 'FirmwareImage','c:\work\fpga\usrp_n210_fw.bin'

Output Arguments

collapse all

Status of call to sdruload, returned as true if the operation was successful.

Introduced in R2013b


[1] USRP, USRP2, UHD, and Ettus Research are trademarks of National Instruments Corp.