These functions provide the ability to load and program devices on the bladeRF board.
Care should be taken with bootloader recovery functions to ensure that devices operated on are indeed a bladeRF, as opposed to another FX3-based device running in bootloader mode.
These functions are thread-safe.
◆ bladerf_device_reset()
Reset the device, causing it to reload its firmware from flash
- Parameters
-
- Returns
- 0 on success, value from Error codes list on failure
◆ bladerf_erase_stored_fpga()
Erase the FPGA region of SPI flash, effectively disabling FPGA autoloading
- Parameters
-
- Returns
- 0 on success, value from Error codes list on failure
◆ bladerf_flash_firmware()
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
-
| dev | Device handle |
[in] | firmware | Full path to firmware file |
- Returns
- 0 on success, value from Error codes list on failure
◆ bladerf_flash_fpga()
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
-
| dev | Device handle |
[in] | fpga_image | Full path to FPGA file |
- Returns
- 0 on success, value from Error codes list on failure
◆ bladerf_get_bootloader_list()
Get a list of devices that are running the FX3 bootloader.
After obtaining this list, identify the device that you would like to load firmware onto. Save the bus and address values so that you can provide them to bladerf_load_fw_from_bootloader(), and then free this list via bladerf_free_device_list().
- Parameters
-
[out] | list | Upon finding devices, this will be updated to point to a list of bladerf_devinfo structures that describe the identified devices. |
- Returns
- Number of items populated in
list
, or an error value from the Error codes list on failure
◆ bladerf_get_fw_log()
Read firmware log data and write it to the specified file
- Parameters
-
| dev | Device to read firmware log from |
[in] | filename | Filename to write log information to. If set to NULL , log data will be printed to stdout. |
- Returns
- 0 upon success, or a value from Error codes list on failure
◆ bladerf_jump_to_bootloader()
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
-
- Returns
- 0 on success, value from Error codes list on failure
◆ bladerf_load_fpga()
Load device's FPGA.
- Note
- This FPGA configuration will be reset at the next power cycle.
- Parameters
-
| dev | Device handle |
[in] | fpga | Full path to FPGA bitstream |
- Returns
- 0 upon successfully, or a value from Error codes list on failure
◆ bladerf_load_fw_from_bootloader()
Download firmware to the specified device that is enumarating an FX3 bootloader, and begin executing the firmware from RAM.
- Note
- This function does not write the firmware to SPI flash. If this is desired, open the newly enumerated device with bladerf_open() and use bladerf_flash_firmware().
- Parameters
-
[in] | device_identifier | Device identifier string describing the backend to use via the <backend>:device=<bus>:<addr> syntax. If this is NULL, the backend, bus, and addr arguments will be used instead. |
[in] | backend | Backend to use. This is only used if device_identifier is NULL . |
[in] | bus | Bus number the device is located on. This is only used if device_identifier is NULL . |
[in] | addr | Bus address the device is located on. This is only used if device_identifier is NULL . |
[in] | file | Filename of the firmware image to boot |
- Returns
- 0 on success, value from Error codes list on failure