980 Commits

Author SHA1 Message Date
Andreas Gibhardt
fc8b3c18d6 fix stream glitch on rate change 2021-12-02 16:27:43 +01:00
Michael Ossmann
bd4b786136 Merge pull request #990 from miek/fix_m0_rebuild
Fix automatic rebuilding of M0 code
2021-11-11 17:03:12 -07:00
Michael Ossmann
74fb86f8bc Do not set USB device address to zero (#987)
When setting the USB configuration to zero  return from the
configured state to the address state according to the USB
specification.
2021-11-10 11:22:08 -05:00
Mike Walters
6d56217762 Fix automatic rebuilding of M0 code
This uses `add_custom_command` to run a cmake script instead of using
`configure_file` directly, which allows for adding dependencies and
creates an ouput that can be depended on.

It also uses `add_custom_command` instead of `add_custom_target` to
create the M0 binary, since custom targets have no output file to depend
on.

Unfortunately, multiple targets cannot depend on the same generated file
or cmake tries to run the generation multiple times in parallel. So, the
.bin/.s generation is now duplicated for each target so they don't
conflict.

fixes #693
2021-11-10 11:31:42 +00:00
Linar Yusupov
909c0ca17f sgpio_cpld_stream_rx_set_decimation() is no longer available 2021-11-08 16:45:11 +03:00
Mike Walters
e41314f130 operacake: add API function to set port dwell times 2021-10-14 14:41:52 +01:00
Mike Walters
c50ebb1a36 operacake: add time switching mode 2021-10-14 14:41:52 +01:00
Schuyler St. Leger
9ee25ab48a operacake: add support for port switching using SCTimer
Based on Schuyler St. Leger's operacake-sctimer branch
2021-10-14 14:36:18 +01:00
Mike Walters
790b5d35cf operacake: add get/set switching mode functions 2021-10-14 14:36:18 +01:00
Mike Walters
7fd3db9b2b operacake: create struct for operacake state 2021-10-14 14:36:18 +01:00
Mike Walters
7f21c93c33 Copy M0 image directly from ROM, instead of shadow region.
This changes m0_rom_to_ram to read directly from the ROM region, rather
than copying from where .text has been copied to RAM.

Previously the second .text section would be merged with the first one,
so the M0 image would be copied to RAM during `pre_main`. However, on
newer linkers the sections are not merged together so the second .text
section did not get copied to RAM.

fixes #936
2021-10-06 18:40:34 +01:00
Mike Walters
0293cf23db Opera Cake: use 0-7 instead of I2C addresses & bump USB API version 2021-07-14 18:35:31 +01:00
Michael Ossmann
becc016c35 update README files for CPLD SRAM loading 2021-03-17 21:57:35 -06:00
Mike Walters
1cb2abf747 Disable USB interrupts during sweep set_freq call
Previously, a USB vendor request could interrupt in the middle of
set_freq and make conflicting changes, leaving the HackRF in an
undefined state.

fixes #772
2021-03-17 13:03:06 +00:00
Michael Ossmann
e93d70eddc Merge pull request #756 from mossmann/spi-names
adopt OSHWA convention for SPI signal names
2020-07-26 07:53:43 -06:00
Michael Ossmann
5e6a2b5d95 adopt OSHWA convention for SPI signal names
https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names
2020-07-03 16:37:15 -06:00
Mike Walters
54bdb86a89 Fix CPLD update 2020-02-12 18:53:59 +00:00
Michael Ossmann
7d900268de fix compiler warnings 2020-02-11 16:59:59 +00:00
Michael Ossmann
c0aed2edb7 firmware: clean up transceiver modes 2020-02-11 16:59:59 +00:00
Mike Walters
d8250c6396 Don't re-init bulk endpoints on every set_transceiver_mode call
Previously the firmware would re-initialise the bulk endpoints on
every transceiver mode change including a USB data toggle reset,
which could cause the first bulk packet (512-bytes) to be dropped
by the host if the PID no longer matched.
2020-02-10 15:46:55 +00:00
Mike Walters
4aac303480 Add option to disable HackRF UI
Fixes #608
2020-01-22 21:23:30 +00:00
Mike Walters
c6e1a5f7f7 Fix Operacake GPIO mode initialisation 2020-01-22 14:21:03 +00:00
Mike Walters
05b1650a6a Rename hackrf-ui.[ch]
Every other source file uses underscores! :(
2020-01-22 14:20:23 +00:00
Michael Ossmann
ba26b742a9 Merge pull request #692 from miek/m0_sgpio
Use the M0 core to handle SGPIO samples
2020-01-20 17:22:03 -07:00
Mike Walters
4d23acd2fd Add sgpio_debug tools 2020-01-20 23:33:44 +00:00
Mike Walters
f59b1e9c15 cpld/sgpio_debug: Add TX/RX counters to check SGPIO
For RX, this replaces received samples with an 8-bit incrementing counter.
This allows for identification of any dropped or repeated samples across the
SGPIO interface.

For TX, this compares transmitted samples against another 8-bit incrementing
counter, and raises pin B2AUX1 if they don't match. This should be used with
a tool on the host-side that transmits a matching counter.
2020-01-20 23:33:41 +00:00
Mike Walters
77f9c124f7 cpld/sgpio_debug: Start with copy of sgpio_if 2020-01-20 23:30:50 +00:00
Mike Walters
e76eace09d Use the M0 to collect SGPIO samples 2020-01-20 14:22:30 +00:00
Mike Walters
3e2ca4e6c3 Bring up the M0 & blink TX LED 2020-01-20 14:22:30 +00:00
Michael Ossmann
208fae7538 Merge pull request #645 from jboone/master
Sync up PortaPack UI changes.
2020-01-06 16:31:28 -07:00
Michael Ossmann
1569737109 Merge pull request #607 from dominicgs/portapack_ui_opera_cake_coexistence
Allow portapack and opera cake to coexist and still enable the PP UI
2020-01-06 16:28:58 -07:00
Jared Boone
923f9fe617 Merge remote-tracking branch 'mossmann/master' 2019-09-26 10:01:37 -07:00
Michael Ossmann
e9c6c2d2e6 sharebrained is the cmake master and we are all unworthy 2019-09-25 23:15:49 -06:00
Jared Boone
6b474cbbd7 Merge remote-tracking branch 'mossmann/master' 2019-09-23 13:35:29 -07:00
Michael Ossmann
b9558ba910 update libopencm3 to avoid unsafe yaml.load() 2019-09-01 15:12:16 -06:00
Jared Boone
53e8d698c7 CMake: Extracted custom binary targets into a macro.
Less error-prone, making changes across the (now three) different binaries for each project.
2019-03-27 11:18:24 -07:00
Jared Boone
cb821e4602 CMake: Separate run-from-RAM and DFU binaries.
PortaPack uses the run-from-RAM build for HackRF mode, but doesn't want the serial number to show up as "RunningFromRAM".
2019-03-27 10:44:26 -07:00
Jared Boone
1b7ef4212d PortaPack: Show RX/TX "waves" when radio is operating. 2019-03-22 10:14:34 -07:00
Jared Boone
f0a45e3f0e PortaPack: Change initial UI radio topology to match boot state.
So the RX amp isn't rendered for a moment at power-up.
2019-03-21 11:16:06 -07:00
Jared Boone
6e5b31d579 PortaPack: Add display of clock reference source. 2019-03-20 20:18:49 -07:00
Jared Boone
190c3972f4 Clock reference: Add UI hook. Simplify selection code. 2019-03-20 20:18:25 -07:00
Jared Boone
027a0eca97 rad1o: Fix #include. 2019-03-20 20:16:24 -07:00
Jared Boone
a535a9bb6b PortaPack: Clear the baseband RX gain label on TX. 2019-03-20 19:09:10 -07:00
Jared Boone
78e27001aa PortaPack: Make label-drawing functions take a label enum. 2019-03-20 19:08:44 -07:00
Jared Boone
84463eb0e1 PortaPack: Improve speed of frequency rendering.
To reduce impact on hackrf_sweep speed.
2019-03-20 16:33:32 -07:00
Jared Boone
ddec31c0a2 PortaPack: Double draw speed of UI, which was impacting hackrf_sweep. 2019-03-20 16:01:49 -07:00
Jared Boone
891eaa9e62 Clock reference: Return enum for selected clock source. 2019-03-20 14:38:18 -07:00
Jared Boone
dccb748216 PortaPack: Add check for PortaPack clock reference, use if present.
Wow, it takes a lot of ugly code to keep blinky happy...
2019-03-20 13:27:20 -07:00
Jared Boone
46fd11af5b Si5351C: Extract best block source function into hackrf_core.
It's not an Si5351C driver thing, but a HackRF thing. Also added a driver function to check if CLKIN signal is valid, and made use of it, instead of opaque register read code.
2019-03-20 11:16:44 -07:00
Jared Boone
b4d8ee678e PortaPack: Lots of clean-up
Perform PortaPack initialization separately from and earlier than UI initialization. Track if PortaPack was detected, provide (mostly useless) pointer if so. Put "weak" declarations into respective headers. Moving #includes around.
2019-03-20 10:46:46 -07:00