Previously we were calculating the dfu-suffix CRC and then modifying the
image, invalidating the check.
This re-orders the operations to apply the boot image header first and
then run dfu-suffix.
Counter-intuitively, this actually saves us two cycles because we unroll
the first iteration of the loop that spins on the interrupt flag, saving
a branch in the case that the flag is clear the first time.
Previously we thought we were configuring the ADC for 8-bit values, but
we did so incorrectly. We were throwing away the top two bits of a
10-bit value. This never caused a problem because the only fixed
voltages we used were at the extreme minimum or maximum of the ADC
range.
* Initial commit of hackrf_biast
* Cleaned up hackrf_biast
* Cleaned up usage info
* Include getopt.h for non-GNU systems
* Add support for overriding HackRF's default antenna power behavior in firmware. Add support for specifying antenna power behavior in libhackrf.
* Moved bias tee config routines into user_config.c, cleaned up operation of hackrf_biast
* hackrf_biast now calls usage() and exits when invoked with no arguments
* Fixed minor documentation error in usage()
* minor syntax cleanup
* Add some documentation to the host API call
* Add proper declaration magic in hackrf.h to hackrf_set_user_bias_t_opts() to appease Visual Studio
* Documentation changes suggested by @martinling
* Moved bias t setting above switch statement, removed line that explicit turned bias t off when entering OFF mode
* Change hackrf_set_user_bias_t_opts() to use a friendly struct() instead of a bitmask. User friendliness fixes to hackrf_biast options. More clang-format appeasement.
* Removed support for integer mode args from hackrf_biast
* clang-format error fixes
* Tweaked position of comment for clang-format v14
* Reformat files with clang-format v14 instead of 16
* Remove internal numeric modes for bias T settings
Co-authored-by: Martin Ling <martin-github@earth.li>
* Fix documentation error in hackrf_biast.c
---------
Co-authored-by: Martin Ling <martin-github@earth.li>
Previously we checked for OG support instead of r9 support because we
didn't yet have a way to tag firmware binaries with support for multiple
platforms.
During r9 hardware development it was thought that the MAX2839 would use
a different GPIO pin for chip select, but it ended up being the same pin
as is used for MAX2837 on other hardware revisions.
This takes the MAX283x abstraction a bit further and fixes a bug with
hackrf_debug -m.
The bootloader is configured by pin straps on certain pins. We use some
of those for other purposes in r9 which causes the bootloader to
misbehave if the device is reset from software. By switching these pins
from outputs to inputs just before reset this problem is avoided.
On the first spin of r9 one of the pins used for platform detection is
pulled up to VAA, not VCC, and VAA hasn't been switched on yet at the
time of platform detection. This results in r9 being misidentified as OG
from time to time.
As a temporary workaround until the next board spin, change the platform
from OG to r9 if it is detected as OG but has r9 pin straps.
Writing to the output bits in the TIMER3 external match register
resulted in intermittent failures that varied in likelihood from board
to board and from commit to commit for no apparent reason.