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
7243db7d68
Merge pull request #1181 from greatscottgadgets/cleanup
...
pre-release clean-up and platform detection improvement
2022-09-27 13:19:52 -04:00
Martin Ling
1db39c0e61
Flush queues on control endpoint when a new SETUP is received.
...
On macOS 12.6 running libusb 1.0.26, the host was seen to sometimes
make an incomplete ClearFeature(ENDPOINT_HALT) request when
ClearPipeStallBothEnds was called from libusb_cancel_transfer.
The host would send the SETUP packet, and the firmware would
call usb_transfer_schedule_ack to acknowledge the upcoming IN
token. However, the host would then not send the IN token,
proceeding directly to the next SETUP.
Since an empty transfer was queued to schedule the ACK, the
firmware would leak one transfer from the free_transfers list.
After a few iterations of this, the firmware would run out of
free transfers and the next request would hang waiting for one.
Fix this by flushing the transfer queues for the control endpoint
when a new SETUP is received, since that token implicitly cancels
any previously ongoing request.
2022-09-27 09:45:43 +01:00
Michael Ossmann
f3d10dcc62
firmware: improve platform detection
...
Slow down the detection of pull-up and pull-down resistors to make
detection more reliable.
2022-09-26 16:44:38 -04:00
Michael Ossmann
b026c07000
firmware: fix duration of delay_us_at_mhz()
2022-09-26 16:43:43 -04:00
Michael Ossmann
06b9d7bee0
Clean up source code copyright notices.
2022-09-23 14:46:52 -04:00
Martin Ling
3dd2e51d71
Initialise rf_path->switchctrl to SWITCHCTRL_SAFE.
...
This was previously never being initialised.
2022-09-21 12:22:58 +01:00
Martin Ling
cf34beebb0
Remove extra call to switchctrl_set and global switchctrl variable.
...
This call is not required since the GPIOs are already configured in
rf_path_pin_setup(). The global switchctrl is not used anywhere else.
2022-09-21 12:17:18 +01:00
Martin Ling
eec6963759
Initialise RF path GPIOs to safe settings.
...
Previously these calls were leaving the amplifiers on, since the
control settings passed were missing SWITCHCTRL_NO_TX_AMP_PWR and
SWITCHCTRL_NO_RX_AMP_PWR. Use the predefined SWITCHCTRL_SAFE here.
Also move these calls before setting the GPIO pins to output mode,
to avoid driving them to the wrong states briefly first.
2022-09-21 12:05:17 +01:00
Martin Ling
44511c6c3b
Move RFFC5072 setup before enabling RF power.
2022-09-19 13:02:29 +01:00
Martin Ling
5d78302d97
Change default RFFC5072 register settings to disable antenna bias.
2022-09-19 13:02:01 +01:00
Martin Ling
6d57709000
Move delay after enabling RF power to rad1o-specific code.
2022-09-19 10:46:01 +01:00
Michael Ossmann
75e3137d55
Merge pull request #1155 from greatscottgadgets/platform-detect
...
Detect hardware platform at run-time.
2022-09-14 17:45:58 -04:00
Michael Ossmann
9329c5e44e
Detect hardware platform at run-time.
...
Firmware now detects the hardware it is running on at startup and
refuses to run if it is compiled for the wrong platform. The board ID
returned by firmware to the host is now derived from run-time detection
rather than a compile-time value. A separate method to retrieve
compile-time supported platform is added.
On HackRF One, pin straps are checked to determine hardware revision.
This is informational to aid troubleshooting and does not affect any
function.
2022-09-14 07:08:47 -04:00
Michael Ossmann
2104291594
firmware: use consistent clock source
...
CLKOUT now switches to the active clock source whenever the internal
clocks change source. It previously did so only when (re)enabled.
2022-09-10 06:54:51 -04:00
grvvy
5d7b203058
operacake: disable the usage of time mode when a portapack is installed
2022-09-01 14:03:18 -06:00
Martin Ling
c0d13de598
Add braces to all control statements without them.
2022-08-03 23:46:46 +01:00
Martin Ling
55bea828ea
Add missing stdbool.h include to rom_iap.h.
...
Fixes a clang-tidy error.
2022-08-03 23:46:46 +01:00
Martin Ling
c3fdf402d7
Reformat all code to new clang-format standard.
2022-08-03 23:46:44 +01:00
Martin Ling
ebb9e43fde
Move some trailing comments on long lines.
2022-08-03 23:42:55 +01:00
Martin Ling
b50aeb4082
fixup clang-format off
2022-08-03 23:34:28 +01:00
Martin Ling
dbcc46d221
Mark code sections to be left alone by clang-format.
2022-08-03 23:03:15 +01:00
Martin Ling
b4c828915a
Use an empty block for empty while loops.
2022-08-03 23:03:15 +01:00
Martin Ling
6cd9ca9483
sgpio: Clean up comments.
2022-08-03 23:03:15 +01:00
Martin Ling
51b76d33a6
sgpio: Remove a redundant variable.
2022-08-03 23:03:15 +01:00
Martin Ling
efd5603c80
Reformat sct.h to avoid long lines.
2022-08-03 23:03:15 +01:00
Martin Ling
a66492b8b7
rom_iap: Clean up comments and realign with spaces.
2022-08-03 23:03:15 +01:00
Martin Ling
1acc71bebf
rf_path: Realign scu_pinmux calls.
2022-08-03 23:03:15 +01:00
Martin Ling
6b5193198b
Realign GPIO assignments with spaces rather than tabs.
2022-08-03 23:03:15 +01:00
Martin Ling
405515d5b4
Implement NXP's recommended setup sequence for the PLL and M4 clock.
...
This follows the sequence described in:
UM10503 Rev 2.4 (Aug 2018), section 13.2.1.1, page 167
2022-06-13 16:49:45 +01:00
Martin Ling
273e6a1217
Add an accurate delay loop.
...
The existing 'delay' function is not calibrated to any specific measure
of time. Add a new function using a loop with a known cycle count, to
produce delays of a given duration at a given CPU clock speed.
2022-06-13 16:32:55 +01:00
Martin Ling
077095451a
Schedule ACK after CLEAR_FEATURE / ENDPOINT_HALT request.
2022-03-30 00:34:32 +01:00
Martin Ling
2fba08cf42
Reset endpoint specified in request, not the one it arrived on.
2022-03-29 23:40:08 +01:00