![]() |
libbladeRF 2.6.0
Nuand bladeRF library
|
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.
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_get_fw_log (struct bladerf *dev, const char *filename) |
| API_EXPORT int CALL_CONV | bladerf_jump_to_bootloader (struct bladerf *dev) |
| API_EXPORT int CALL_CONV | bladerf_get_bootloader_list (struct bladerf_devinfo **list) |
| API_EXPORT int CALL_CONV | bladerf_load_fw_from_bootloader (const char *device_identifier, bladerf_backend backend, uint8_t bus, uint8_t addr, const char *file) |
| API_EXPORT int CALL_CONV bladerf_device_reset | ( | struct bladerf * | dev | ) |
Reset the device, causing it to reload its firmware from flash
| dev | Device handle |
| API_EXPORT int CALL_CONV bladerf_erase_stored_fpga | ( | struct bladerf * | dev | ) |
Erase the FPGA region of SPI flash, effectively disabling FPGA autoloading
| dev | Device handle |
| API_EXPORT int CALL_CONV bladerf_flash_firmware | ( | struct bladerf * | dev, |
| const char * | firmware ) |
Write FX3 firmware to the bladeRF's SPI flash
| dev | Device handle | |
| [in] | firmware | Full path to firmware file |
| 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").
| dev | Device handle | |
| [in] | fpga_image | Full path to FPGA file |
| API_EXPORT int CALL_CONV bladerf_get_bootloader_list | ( | struct bladerf_devinfo ** | 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().
| [out] | list | Upon finding devices, this will be updated to point to a list of bladerf_devinfo structures that describe the identified devices. |
| API_EXPORT int CALL_CONV bladerf_get_fw_log | ( | struct bladerf * | dev, |
| const char * | filename ) |
Read firmware log data and write it to the specified file
| 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. |
| 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.
| dev | Device handle |
| API_EXPORT int CALL_CONV bladerf_load_fpga | ( | struct bladerf * | dev, |
| const char * | fpga ) |
Load device's FPGA.
| dev | Device handle | |
| [in] | fpga | Full path to FPGA bitstream |
| API_EXPORT int CALL_CONV bladerf_load_fw_from_bootloader | ( | const char * | device_identifier, |
| bladerf_backend | backend, | ||
| uint8_t | bus, | ||
| uint8_t | addr, | ||
| const char * | file ) |
Download firmware to the specified device that is enumarating an FX3 bootloader, and begin executing the firmware from RAM.
| [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 |