Main Content

sdruload

Load FPGA and firmware images for USRP radio

Add-On Required: This feature requires the Communications Toolbox Support Package for USRP Radio add-on.

Description

example

sdruload('Device'=radioDevice) loads the default FPGA and UHD™ firmware images for the specified device. For example, sdruload('Device'='USRP2').

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

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

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

You can obtain the compatible UHD version number using the getSDRuDriverVersion function.

Note

If the device is an N2xx series radio, 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.

example

sdruload('Device'=radioDevice, Name=Value) specifies options using one or more name-value arguments in addition to the input arguments in the previous syntax. For example, to specify the SD card drive as S:, set 'Drive' to 'S:'.

example

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

Examples

collapse all

Load the default FPGA image to an X300 device and return the status of the operation.

sdruload('Device'='N210','IPAddress'='192.168.30.5')
Checking radio connections...
Ready to write default FPGA image
and default firmware image
to n210 device at 192.168.10.2. Would you like to continue? [yes/no]: yes
Writing images using uhd_image_loader ...

Input Arguments

collapse all

USRP radio, specified as a USRP radio device from this set {'USRP2', 'n200','n210'}.

  • 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'='USRP2'

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: 'Drive'='S:'

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™.

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.

Output Arguments

collapse all

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

Version History

Introduced in R2013b

expand all