When an 8x32 packet is received with target ID 0x05, the
ad9361_fastlock_save() function is executed. The packet requires an
address to be specified, which is used to determine whether the
operation is for the RX or TX module. Valid addresses are:
0x00 : receive module
0x01 : transmit module
others: do not use, but would be passed to the receive module
Adds fast lock functions to save/load/recall, and change port/spdt
settings:
- ad9361_fastlock_save(): save fast lock profile from AD9361 to BBP
- ad9361_fastlock_load(): load fast lock profile from BBP to AD9361
- ad9361_fastlock_recall(): use a previously loaded fast lock profile
- ad9361_rfport_select(): change RF port selection on AD9361
- ad9361_rfspdt_select(): change external RF SPDT switch settings
Increased the RAM size of the Nios from 16 KB to 32 KB in order to
hold 512 AD9361 fast lock profile structures (256 RX profiles, 256 TX
profiles). Each profile contains 20 bytes, of which 16 bytes are
consumed by the AD9361 profile data.
The value of 256 RX/TX fast lock profiles was chosen because it seemed
high enough for most applications, but not so large that it would waste
a lot of FPGA resources. However, the number of profiles may be
increased or decreased (as resources allow) to meet application demand.
Update bladerf_quick_tune structure for bladeRF2 data. It now contains:
- profile (profile number, integer)
- data (profile data, 16 bytes)
Fill in the bladerf2_get_quick_tune() function. The bladeRF2's RFIC uses
the concept of fast lock profiles, of which there are 8 for TX and 8 for
RX. These profiles store the VCO information needed to quickly change
frequencies. To use more than 8 profiles, the profiles may be stored
off-chip, which is what we're doing here.
1. It is assumed the RFIC has been tuned to a particular frequency.
2. The profile is created using ad9361_fastlock_store().
3. The profile is read back and stored in host memory using
ad9361_fastlock_save().
Windows was not happy with how I was doing things. And honestly, I
wasn't entirely happy either :)
This seems to work better, with less weird punctuation.
On Windows, pthread_t is a struct {void *p; unsigned int x;} and
initializing it to 0 is unwise.
On Linux, pthread_t is unsigned long int.
Fixes MSVC Error C2440
test_gain now enables a channel before poking the gain, which is
required to pass the test on bladerf2. however, test_threads
already enables the channels in question, which resulted in the
test locking up and failing.
_apportion_gain did not pay heed to the step size of the gain
range, causing it to end up with invalid values for LNA and
RXVGA2.
We now ensure that the allocation mod <stepsize> is 0, so that
other, more flexible gain stages can be used to pick up the
remainder.
New messages have a lower severity, explain what will happen
instead (manual gain control), and include an info message with
guidance for solving the issue.
This PR creates a git submodule for the analogdevicesinc/no-OS code, moving it from host/libraries/libbladeRF/src/driver/thirdparty/adi/ to thirdparty/analogdevicesinc/no-OS and adjusting the build process accordingly.
The build process will handle the git submodule init / git submodule update as required, or it may be done manually before the build. It will then copy the necessary files to the build tree, apply a series of patches for local modifications, and then build it as libad936x.
There are no changes to the build steps, although the build will fail if git submodule init/update needs to happen but can't (e.g. if github is not reachable).
* thirdparty: add no-OS library submodule
Adds a submodule for https://github.com/analogdevicesinc/no-OS/, pinned
at commit 0bba46e.
* thirdparty: patch and build libad936x
Add cmake file for libad936x
Move our local mods into patch files
* host: libbladeRF: transition to libad936x
Transitions libbladeRF (particularly bladerf2.c) to use the libad936x
package, compiled separately.
This also adds ad936x.h, a driver header file that contains the
necessary things from libad936x. This is cleaner than just importing
ad9361_api.h, due to the significant dependency/include challenges that
ensue...
* host: fix up libad936x build
Don't use ExternalProject, instead just add it as a subdirectory
Create a FindPatcher.cmake for the patch-or-git selector
Clean up and streamline the ad936x cmakelists
Clean up libbladeRF cmakelist formatting
* thirdparty: fix no-OS patch 0003
* host: ad936x: fixup build errors/warnings on macOS
* thirdparty/adi: patch to chop out ad9361_parse_fir
ad9361_parse_fir refers to sscanf, which is not readily available in the
Nios II library. We don't use this function, so it can go.
* libbladeRF: remove vestigial adi files
* debian: rm thirdparty ADI tree from license file
* host: thirdparty: fix git package handling
* host: thirdparty/ad936x: specify patches in order
It turns out that there's no guarantee that file(GLOB)
will output the patch files in the alphabetical order.
* Revert "debian: rm thirdparty ADI tree from license file"
This reverts commit 36cf335c0e.
* debian: update path in ADI copyright
In the event the realloc fails, argout would be clobbered, losing
our only pointer to all of the allocated memory.
So, realloc into a new temporary variable, and then if that is
valid, set argout to it.
Also fixes an incorrect sizeof(int**)
Escaping the double quotes worked on Linux, but not on whatever
abomination of Cygwin's bash. The work-around uses braces. This works
because Tcl interprets them as single quotes while bash ignores them,
allowing the substitution to happen.
Previously, the device and device family were just hard-coded in the
Qsys scripts. This wasn't a problem because the generated code/system is
compatible within a device family. However, this change makes things
more explicit to avoid confusion and perhaps take advantage of any
optimizations, warnings, or limitations that may be differ among devices
within a family.
This release introduces new functionality and bug fixes, generally expanding
support for the bladeRF 2.0 Micro. It consists of the following versions:
* FPGA bitstream v0.9.0
* FX3 firmware v2.3.1
* libbladeRF v2.1.0
* bladeRF-cli v1.7.0
* MATLAB & Simulink bindings v1.0.2
* Python bindings v1.1.0
Note to bladerf1 (x40/x115) users: AGC will not work with FPGA versions
older than v0.8.0, due to a change in the control register mapping. A warning
will be printed during device initialization if you are using an affected
FPGA version.
Summary of changes since 2018.08:
* FPGA
- Support for the ADS-B core on bladeRF micro
- Add metadata flags for miniexp{1,2} IO pin status
- Fix race condition during FX3/Nios UART initialization
- Fix bugs in bladeRF AGC control
- Timing closure improvements
- Build system fixes
* FX3
- Fix USB device reset interrupting SPI flash autoloading of FPGA images
- Add BLADE_USB_CMD_QUERY_FLASH_ID command
- Add BLADE_USB_CMD_QUERY_FPGA_SOURCE command
* libbladeRF
- API additions:
- Add format macros for bladerf_frequency and bladerf_timestamp
- Add 'manufacturer' and 'product' device description strings to
bladerf_devinfo struct
- Add bladerf_get_serial_struct() API function
- Add bladerf_get_flash_size() API function
- Add bladerf_trigger_signal values for J51-1 (bladerf2) and Miniexp-1
(generic)
- Add bladerf_get_fpga_source() API function
- Add meta RX hardware flags for underflow, miniexp{1,2}
- Fixes:
- bladerf2: support TX frequencies down to 47 MHz
- bladerf2: support sample rates down to 0.521 Msps
- bladerf1: fix BLADERF_GPIO_AGC_ENABLE
- bladerf2: fix bladerf_trigger_arm implementation
- streaming: extend USB transfer timeout to match the configured stream
timeout
- Misc:
- Install the doxygen docs, if generated
- Adjust RX gain mode lists for clarity
- bladerf1: implement bladerf_{get,set}_rf_port[s]
- bladerf1: skip initialization if BLADERF_FORCE_NO_FPGA_PRESENT is set
* bladeRF-cli
- Add libedit support
- Ensure device is initialized after deferred open
- info: display manufacturer, product, flash size
- print: show RF routing on bladerf1
- print: display supported ranges for sample rate, bandwidth, frequency
- probe: handle already-open devices
- version: display FPGA configuration source
* MATLAB & Simulink bindings
- Add missing BB_TXVGA1_RXLPF loopback option
- Fix tx_gain property handling in simulink
* Python
- Fix rx_channel_count, tx_channel_count
- Update with latest API functions
* Windows installer
- install-drivers: install a driver for the bootloader VID/PID (04b4:00f3),
allowing easier FX3 bootloader recovery operations
- Upgrade to libusb 1.0.22
Note: an erroneous python_v1.0.2 tag was created, which is basically
identical to this, but had the wrong version number. I apologize for any
confusion this may cause.