Commit graph

437 commits

Author SHA1 Message Date
Jon Szymaniak
261c22c964 Merge pull request #297 from rtucker/dev-issue292
CMake: Enabling docs or libtecla but missing the deps is now a fatal error 
Fixes #292.
2014-07-27 14:35:34 -04:00
Ryan Tucker
9e98e38e33 Update CMake options in READMEs (#285)
Found all the cmake options I could, put them into the appropriate
READMEs.  There is some overlap between files but this may be a good
starting point at least.
2014-07-27 13:32:49 -04:00
Ryan Tucker
287ac7cc03 host CMake: missing deps now FATAL_ERROR (#292)
In the event that BUILD_DOCUMENTATION is ON but Doxygen
or help2man are missing, or in the event ENABLE_LIBTECLA
is ON and libtecla is missing, raise a FATAL_ERROR and
abort CMake.

Since BUILD_DOCUMENTATION is OFF by default, and the existence
of libtecla determines the default for ENABLE_LIBTECLA, this
should have no impact for the casual "cmake .." user.
2014-07-26 13:13:28 -04:00
Ryan Tucker
5d3958c976 libbladeRF: clarify doxygen instructions in README 2014-07-26 12:44:33 -04:00
Jon Szymaniak
1f4676e07f libbladeRF: Bumped patch version (v0.16.2)
This was done to account for the OSX RPATH build change, before
we place a 2014.09-rc2 tag on the repo.
2014-07-24 20:27:03 -04:00
Jon Szymaniak
361d01da31 libbladeRF: Version bump (v0.16.1) 2014-07-20 17:04:53 -04:00
Jon Szymaniak
28cf6c732a libbladeRF: Updated README.md
Removed some dated text, fixed Doxygen make targer, and linked to CHANGELOG.
2014-07-20 17:04:04 -04:00
Brian Padalino
c3bd0f217f hdl/libbladeRF/debian: Bumping FPGA v.0.0.6. 2014-07-20 16:34:55 -04:00
Jon Szymaniak
997237a263 libbladeRF: Account for FPGA offset of gain correction value 2014-07-19 23:33:50 -04:00
Jon Szymaniak
64d0c50ab7 libbladeRF: Added simple set & readback tests for control functions
This program performs some simple operations with the various libbladeRF
"control" functions. It is mainly intended to only check for the
presence of grossly erroneous code in these functions, that would cause
crashes or bizarre results.
2014-07-19 23:25:45 -04:00
Jon Szymaniak
f0e2ad685e libbladeRF: Fixed LPF mode readback
This became inconsistent when the LPF disabled mode was updated
to both disable bypass and power down the LPF in a5402b78.
2014-07-19 20:06:40 -04:00
Jon Szymaniak
042926f61d libbladeRF: Added temporary workaround for FX3 "Already started" error
This error from the FX3 is likely harmless, and I'll investigate further
soon. It only appears to occur when the firmware loopback mode times
out, and does not hinder further use of the device.

Given the lack of apparent severity, this band-aid is intended to keep
libbladeRF from overreacting until some time can be spend fixing the
underlying issue.
2014-07-19 16:55:41 -04:00
Jon Szymaniak
51170a05e5 libbladeRF: Added readback of FW loopback, disable it for LMS loopback
Added the ability to read back the state of FW loopback from devices
running FW v1.7.1. While it is possible to enable FW loopback mode in
v1.7.0 firmware, libbladeRF will now enforce the v1.7.1 requirement so
it can correctly read back and report the FW mode.

bladerf_set_loopback() has also been updated to ensure that the
FW loopback is disabled when switching to an LMS loopback mode.
2014-07-19 16:31:46 -04:00
Jon Szymaniak
d794827da6 libbladeRF: Added FW version v1.7.1 to compatibility matrix 2014-07-19 15:13:24 -04:00
Brian Padalino
13267cf1e3 libbladeRF: Correct equation for samplerate.
Corrected a samplerate equation calculation which helps determine how
many transfers should be outstanding over any timeout period at a
specific samplerate.  The samplerate should always be greater than the
calculated number, not less than.
2014-07-19 13:13:19 -04:00
Robert Ghilduta
af887e5d39 libbladeRF: change xb-200 filterbank frequency range from doubles to unsigned ints 2014-07-10 22:41:26 -04:00
Brian Padalino
c7c971a00c libbladeRF: Fix frequency selection clamping.
While clamping the minimum values for the frequency selection, the
lowest value was being set but not checked against.

Also modify the range table to use the enumerations for lowest and
highest frequency for consistency.
2014-07-10 22:31:44 -04:00
Robert Ghilduta
b8157e5354 libbladeRF: check return value 2014-07-10 22:29:10 -04:00
Jon Szymaniak
f5d60382a6 libbladeRF: Fixed typo in version comparison routine 2014-07-10 21:41:24 -04:00
Robert Ghilduta
13be4650d7 libbladeRF: fix bladerf_xb200_get_path()
bladerf_xb200_get_path() was returning the opposite path of the actual signal
through the XB-200.
2014-07-10 04:30:45 -04:00
Robert Ghilduta
19af14c7f1 libbladeRF: make bladerf_get_frequency() XB-200 compatible
bladerf_get_frequency() needs to be aware if the XB-200 is connected, and to
compensate for the frequency offset if it is.
2014-07-10 04:30:45 -04:00
Robert Ghilduta
f7686fdab7 libbladeRF: add auto filtbank selection API
This commit introduces 1dB and 3dB rolloff point based filterbank selection.
bladerf_set_frequency() will set the appropriate filter based on frequency.
2014-07-10 04:30:45 -04:00
Robert Ghilduta
503ff35ac0 libbladeRF: introduce optimal gain functions 2014-07-10 04:30:45 -04:00
Jon Szymaniak
3a30c49490 Merge pull request #276 from rtucker/dev-issue166
Add Debian packages to download FPGA/FX3 images (Fixes #166)
2014-07-08 22:13:23 -04:00
Ryan Tucker
00c512356f Change FPGA/Firmware download path to be cleaner
Now using /usr/share/Nuand/bladeRF for everything, instead of
/usr/share/bladerf/{firmware,fpga}
2014-07-07 18:09:57 -04:00
Jon Szymaniak
848c10ae13 libbladeRF: Fixed return code if XB-200 is used with an old FPGA 2014-07-07 00:41:07 -04:00
Jon Szymaniak
3c3c3f5e37 libbladeRF: Warn if libbladeRF version compatibility table is outdated
A warning is preferred over failing out. If people are using a
libbladeRF from a package/installer and a compatible, important FPGA fix is
release, they should be able to use it.
2014-07-07 00:41:07 -04:00
Jon Szymaniak
634ad2820b libbladeRF: Added FPGA and FW version compatibility checks
Error codes and warnings have been added to cases where a firmware
or FPGA upgrade is required for proper operation.
2014-07-07 00:41:07 -04:00
Ryan Tucker
9f1648246f Add /usr/share/bladerf/fpga/ to search path
Will allow bitstreams downloaded by the debian pkgs to be auto-discovered!
2014-07-06 21:22:49 -04:00
Jon Szymaniak
c3a674ea62 libbladeRF: Added CHANGELOG 2014-07-05 03:25:48 -04:00
Jon Szymaniak
14f515e467 libbladeRF: Version bumped to v0.16.0
Changes include:

- Added XB-200 support
- Added experimental DC calibration and DC calibration table support
- Added "software autoload" of FPGAs and DC cal tables from config directories
- Added "File not found" (BLADERF_ERR_NO_FILE) return code
- Allow tuning up to 3.8GHz
- Fixed incorrect version checks
    + This resolves issue where VCTCXO value isn't loaded when using FPGA v0.0.3
- Fixed intermittent FPGA load failures
2014-07-04 11:40:17 -04:00
Jon Szymaniak
d2d848cc44 libbladeRF: Added BLADERF_FREQUENCY_MIN_XB200 definition to API header 2014-07-04 10:50:04 -04:00
Jon Szymaniak
3b6f70a883 libbladeRF: Removed old bladerf_xb200_attach() function from API
This is a vestige of earlier code. bladerf_expansion_attach() is the
function that performs the desired functionality.

As such bladerf_xb200_attach() has been made static and renamed in xb.c.
2014-07-04 10:15:20 -04:00
Jon Szymaniak
339f0549c2 libbladeRF: Fixed flipped logic in version checks and an erroneous check
The implementations of these were the opposite of what is described
in the associated function descriptions.

Additionally, a version check was incorrectly testing the device's
firmware version instead of the FPGA version.
2014-07-03 15:40:44 -04:00
Jon Szymaniak
0eb27140f9 libbladeRF: Don't enable LMS DCCAL clocks when reading back DC cal values
The DCCAL clocks need to be enable when using DC_LOAD.

However, it appears that enabling the DCCAL clocks when reading back
values at later time yields intermittently corrupted read values
2014-07-02 23:22:25 -04:00
Jon Szymaniak
39799711ef libbladeRF: Fixed unintentional switch case fall-throughs 2014-07-02 01:06:16 -04:00
Jon Szymaniak
a5402b78d9 libbladeRF: Fixed incorrect LMS LPF register configuration
Two issues existed in the LMS LPF configuration:

(1) The LPF bypass was not being disabled when switching to
BLADERF_LPF_DISABLED. Therefore, its state would be different depending
on whether the previous state was BLADERF_LPF_BYPASSED or
BLADERF_LPF_NORMAL.

(2) BLADERF_LPF_BYPASSED was leaving the LPF powered on. According to
the TX/RX LPF block diagram (Figure 3.5, in v1.1r4) in the LMS6002D
programming guide, this implies that the LPF was enabled while its
input was shorted to its output.
2014-07-01 23:02:00 -04:00
Jon Szymaniak
1b1a61bc88 libbladeRF: Removed 3.72GHz SW limit. Allow tuning up to 3.8GHz.
This was limited due to 3.72GHz being the maximum value show in the
LMS6002D programming guide's FREQSEL table. According to a response
on the limemicro-opensource Google group, we should be able to use
the same FREQSEL value from 3.72GHz - 3.8GHz.
2014-06-30 23:32:02 -04:00
Jon Szymaniak
93d180c908 libbladeRF: Reset frequency when existing loopback mode
This ensures that device registers (e.g., SELOUT) are restored properly
upon exiting loopback mode, as the user may have crossed bands.
2014-06-30 20:45:05 -04:00
Jon Szymaniak
3c2d571e45 bladeRF-cli, libbladeRF: Fixed DC cal table extension (.tbl)
As noted in commit 67938789f9, the calibration tables were intended to
have a .tbl extension. However, the calibration table functionality in
the previous commits were incorrectly using a .bin extension.
2014-06-30 20:06:57 -04:00
Jon Szymaniak
83800540a4 libbladeRF: Ensure device is configured after FPGA "software autoload"
bladerf_load_fpga() is now used, as it will initialized the device after
and FPGA load, if needed.
2014-06-30 19:40:24 -04:00
Jon Szymaniak
7ce4b81258 libbladeRF: Fixed memory leaks in DC cal table autoload 2014-06-30 00:04:39 -04:00
Jon Szymaniak
406c8d3fa2 Windows warning cleanup 2014-06-30 00:04:39 -04:00
Jon Szymaniak
67938789f9 libbladeRF: Load calibration tables or FPGA bitstream on device open
On Linux and OSX, the following directories will be searched,
in the order listed:
    ~/.config/Nuand/bladeRF
    ~/.Nuand/bladeRF
    /etc/Nuand/bladeRF

In Windows, %appdata%/Nuand/bladeRF will searched.

The following files will be loaded, if found in these search paths:

    FPGA image: hostedx40.rbf or hostedx115.rbf, depending on the
                size of the FPGA reported by the device.

    DC Calibration tables: <serial>_dc_<rx|tx>.tbl

libbladeRF: Added Windows support to file_find
2014-06-30 00:04:39 -04:00
Jon Szymaniak
6c20a6784e libbladeRF: Added function to search for files and read their contents. 2014-06-30 00:04:39 -04:00
Jon Szymaniak
7f4e0e8b6f libbladeRF: Aesthetic cleanup of labels in file_ops.c 2014-06-30 00:04:38 -04:00
Jon Szymaniak
c1ffb2dafe libbladeRF: Moved ARRAY_SIZE() macro to host config header 2014-06-30 00:04:38 -04:00
Jon Szymaniak
e28f973a4b libbladeRF: Removed calibration load from public API
This will be replaced by some detection from a config file
2014-06-30 00:04:38 -04:00
Jon Szymaniak
d3b9bbf86f libbladeRF: The LPF Tuning DC value is not always 23 2014-06-30 00:04:38 -04:00
Jon Szymaniak
ed83325d66 libbladeRF: Fixed table assignments during TX DC cal table loading
Items were being assigned to the RX module
2014-06-30 00:04:38 -04:00