libbladeRF  1.7.2
Nuand bladeRF library
Functions
Device loading and programming

Description

These functions provide the ability to load and program devices on the bladeRF board. They are thread-safe.

Functions

API_EXPORT int CALL_CONV bladerf_flash_firmware (struct bladerf *dev, const char *firmware)
 
API_EXPORT int CALL_CONV bladerf_load_fpga (struct bladerf *dev, const char *fpga)
 
API_EXPORT int CALL_CONV bladerf_flash_fpga (struct bladerf *dev, const char *fpga_image)
 
API_EXPORT int CALL_CONV bladerf_erase_stored_fpga (struct bladerf *dev)
 
API_EXPORT int CALL_CONV bladerf_device_reset (struct bladerf *dev)
 
API_EXPORT int CALL_CONV bladerf_jump_to_bootloader (struct bladerf *dev)
 

Function Documentation

API_EXPORT int CALL_CONV bladerf_device_reset ( struct bladerf *  dev)

Reset the device, causing it to reload its firmware from flash

Parameters
devDevice handle
Returns
0 on success, value from Error codes list on failure
API_EXPORT int CALL_CONV bladerf_erase_stored_fpga ( struct bladerf *  dev)

Erase the FPGA region of SPI flash, effectively disabling FPGA autoloading

Parameters
devDevice handle
API_EXPORT int CALL_CONV bladerf_flash_firmware ( struct bladerf *  dev,
const char *  firmware 
)

Write FX3 firmware to the bladeRF's SPI flash

Note
This will require a power cycle to take effect
Parameters
devDevice handle
firmwareFull path to firmware file
Returns
0 on success, value from Error codes list on failure
API_EXPORT int CALL_CONV bladerf_flash_fpga ( struct bladerf *  dev,
const char *  fpga_image 
)

Write the provided FPGA image to the bladeRF's SPI flash and enable FPGA loading from SPI flash at power on (also referred to within this project as FPGA "autoloading").

Parameters
devDevice handle
fpga_imageFull path to FPGA file
Returns
0 on success, value from Error codes list on failure
API_EXPORT int CALL_CONV bladerf_jump_to_bootloader ( struct bladerf *  dev)

Clear out a firmware signature word in flash and jump to FX3 bootloader.

The device will continue to boot into the FX3 bootloader across power cycles until new firmware is written to the device.

Parameters
devDevice handle
Returns
0 on success, value from Error codes list on failure
API_EXPORT int CALL_CONV bladerf_load_fpga ( struct bladerf *  dev,
const char *  fpga 
)

Load device's FPGA. Note that this FPGA configuration will be reset at the next power cycle.

Parameters
devDevice handle
fpgaFull path to FPGA bitstream
Returns
0 upon successfully, or a value from Error codes list on failure