1148 Commits

Author SHA1 Message Date
Martin Ling
d21f01f7b4 In conditional branch table, list one destination per line, in order. 2024-11-26 19:04:42 +00:00
Michael Ossmann
413409760a Set version to 2024.02.1+ 2024-02-23 13:09:46 -05:00
Michael Ossmann
109d7c025c Set version to 2024.02.1 2024-02-22 14:11:01 -05:00
Michael Ossmann
24ac1edf5a Support detection of HackRF One r10 2024-02-21 23:48:54 -05:00
Michael Ossmann
93d9f9b45c Use 10-bit ADC value for pin strap detection
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.
2024-02-21 23:29:27 -05:00
Martin Ling
72a0a01190 Revert "Reduce firmware USB transfer size from 16KB to 8KB."
This reverts commit fefa4f0e4592b8fb235d38e60fb5daea4974ff95.
2024-02-08 01:07:11 +00:00
Jonathan Suite
dab548bf29 Firmware updates to allow fine-grained control of biast from command line (#1314)
* 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>
2023-09-13 11:15:30 -04:00
Jacob Graves
189b5bf693 wrap clkin init in r9 board check (#1307) 2023-04-19 13:32:32 -04:00
Michael Ossmann
00253b02e1 set version to 2023.01.1+ 2023-02-08 14:03:06 -05:00
Michael Ossmann
d9ebb089a5 set version to 2023.01.1 2023-02-01 00:22:29 -05:00
Michael Ossmann
3796bc94d8 h1r9: check firmware running on r9 for r9 support
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.
2023-01-08 08:27:28 -05:00
Michael Ossmann
c19f85ef24 h1r9: use single SSP configuration for MAX283x
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.
2023-01-08 08:21:27 -05:00
Mike Walters
8051675c60 h1r9: add R9 to supported platforms 2023-01-06 14:40:55 +00:00
Michael Ossmann
ff4e1107f3 h1r9: fix clkout PLL source bug 2023-01-06 14:33:56 +00:00
Michael Ossmann
bdb6000bb4 h1r9: fix inverted spectrum on TX
Unify and clean up the firmware spectrum inversion handling for all
hardware platforms.
2023-01-06 14:33:56 +00:00
Michael Ossmann
50a2e9dd56 h1r9: update clock drive strength for spin C 2023-01-06 14:33:56 +00:00
Mike Walters
bfe882a2fa h1r9: add MAX283x abstraction layer 2023-01-06 14:33:53 +00:00
Michael Ossmann
24f2c1d073 h1r9: MAX2839: always use the low LNA band 2023-01-06 14:33:53 +00:00
Michael Ossmann
51bae663fc h1r9: update pin assignments for board spin B 2023-01-06 14:33:53 +00:00
Michael Ossmann
dc67fbd2ee h1r9: fix Opera Cake time mode compatibility
TIMER3 match register 3 was interfering with SCT, fixed by turning off
all ORing of timer outputs with SCT outputs.
2023-01-06 14:33:53 +00:00
Michael Ossmann
7b5d8da821 h1r9: swap RX Q inversion 2023-01-06 14:33:53 +00:00
Michael Ossmann
b15509c2d9 h1r9: MAX2839: emulate MAX2837 RX gain configuration 2023-01-06 14:33:53 +00:00
Michael Ossmann
5693f7b193 h1r9: MAX2839: support maximum TX gain, not minimum 2023-01-06 14:33:53 +00:00
Michael Ossmann
eb8ed45f9a h1r9: adjust PLLA according to source frequency 2023-01-06 14:33:53 +00:00
Michael Ossmann
7a0aec00ef h1r9: fix usb_vendor_request_reset()
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.
2023-01-06 14:33:53 +00:00
Michael Ossmann
ea3b804edf h1r9: workaround platform detection problem
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.
2023-01-06 14:33:53 +00:00
Michael Ossmann
3f73290524 h1r9: configure MAX2839 HPF
Without this, the RX baseband gain amplifies a DC offset.
2023-01-06 14:33:53 +00:00
Michael Ossmann
616705b7e5 h1r9: don't write to outputs in TIMER3 ext. match register
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.
2023-01-06 14:33:53 +00:00
Michael Ossmann
4db7e8d38a h1r9: more bring-up fixes 2023-01-06 14:33:53 +00:00
Michael Ossmann
edd0a80812 h1r9: stop writing MAX2837 registers to MAX2839 2023-01-06 14:33:53 +00:00
Michael Ossmann
f4817b60a3 h1r9: MAX2839 driver updates 2023-01-06 14:33:53 +00:00
Michael Ossmann
a72f084ff0 h1r9: fix CLKOUT_EN pin setup 2023-01-06 14:33:53 +00:00
Michael Ossmann
3738270e4f h1r9: use MAX2839 2023-01-06 14:33:53 +00:00
grvvy
14183a96ea h1r9: implement additional MAX2839 functions, change some mreg definition names, fix RF gain control math 2023-01-06 14:33:53 +00:00
grvvy
cbbe94c8fe h1r9: add preliminary MAX2839 driver and accompanying header file; add some convenience macros to regs_def 2023-01-06 14:33:53 +00:00
grvvy
dcb9cd1beb h1r9: add preliminary MAX2839 register definitions 2023-01-06 14:33:53 +00:00
Michael Ossmann
b61c30a50d h1r9: bring-up wip 2023-01-06 14:33:53 +00:00
Michael Ossmann
4ffe3658be h1r9: add max2839_target.c 2023-01-06 14:33:53 +00:00
Michael Ossmann
1f73f2fd25 h1r9: add Si5351A support 2023-01-06 14:33:48 +00:00
Michael Ossmann
6d48671084 h1r9: initial GPIO definitions 2023-01-06 12:45:51 +00:00
Michael Ossmann
8aa79e9fe5 h1r9: use timer to detect external clock frequency 2023-01-06 12:45:46 +00:00
Mike Walters
060d9cbd8a Add firmware_info structure 2023-01-05 15:13:06 +00:00
Michael Ossmann
3d39660be1 Merge pull request #1237 from greatscottgadgets/tuning
restrict IF to 2170-2740 MHz
2022-12-23 11:56:38 -05:00
Michael Ossmann
3d687a20fd increase forceable IF range to 2000-3000 MHz 2022-12-23 06:06:22 -05:00
Michael Ossmann
173612ac77 add --led option to hackrf_debug
and corresponding changes to libhackrf and firmware
2022-12-18 07:22:17 -05:00
Michael Ossmann
86c1d8ce6e restrict IF to 2170-2740 MHz 2022-12-09 09:12:37 -05:00
Michael Ossmann
b106495042 Merge pull request #1235 from stevefalco/correct_register_definition
Make definition of "prev" consistent
2022-12-01 13:08:35 -05:00
Michael Ossmann
956492fb65 Merge pull request #1212 from schneider42/schneider/m0_reset
m0: reset M0 before starting it
2022-12-01 12:42:15 -05:00
Michael Ossmann
e226a416de Merge pull request #1203 from martinling/8k-transfers
Reduce firmware USB transfer size from 16KB to 8KB
2022-12-01 12:40:26 -05:00
Steven A. Falco
7dbf6d65b6 Make definition of "prev" consistent 2022-11-30 16:53:11 -05:00