369 Commits

Author SHA1 Message Date
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
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
Jared Boone
12bb516cc0 PortaPack: Extract non-UI code into separate portapack.[ch] module.
I'll be adding some non-UI API functions to the top-level PortaPack structure.
2019-03-18 15:09:11 -07:00
Jared Boone
b8f255356c CPLD: Change tool interface to accept --xsvf and --hackrf-data args.
More args coming shortly...
2019-03-10 12:22:51 -07:00
Dominic Spill
e27038a098 Merge branch 'master' into cpld_sram_load 2019-03-04 12:40:14 +00:00
Dominic Spill
a4c1ab65c6 Merge pull request #602 from jboone/ui_restructuring
PortaPack and rad1o Ui restructuring, take 2
2019-03-03 22:27:57 +00:00
Jared Boone
3af95903bc UI: No UI if not HackRF One or rad1o.
This was breaking BOARD=JAWBREAKER builds.
2019-03-02 22:46:21 -08:00
Jared Boone
5b5d82be56 Build rad1o UI wrapper to patch the portapack one
Also, fix building of blinky.
2019-03-02 21:12:31 -08:00
Jared Boone
4fefd829ba CMake: Fix blinky and rad1o dependencies and PortaPack-related breakage. 2019-03-02 14:23:06 -08:00
Jared Boone
c32d57158a PortaPack: Remove weak UI functions, detect and return UI function table.
TODO: Side effect was that now blinky has a lot of unreasonable dependencies.
TODO: rad1o breakage is likely...
2019-03-02 14:23:06 -08:00
Jared Boone
36cca31260 UI: Move ui_portapack.* to common.
Otherwise blinky won't build.
TODO: Tried to tease apart all the dependencies to get blinky to build without, but it's such a twisted knot...
2019-03-02 14:23:06 -08:00
Jared Boone
057b9273d5 CPLD tool: Rename to cpld_bitstream.py 2019-03-02 14:19:21 -08:00
Jared Boone
75adda314e LED: Refactor halt function from CPLD update to core API.
Also call if CPLD load fails.
2019-03-02 14:19:21 -08:00
Jared Boone
afb55e18dd CPLD: Load bitstream to SRAM at start-up. 2019-03-02 14:19:21 -08:00
Dominic Spill
e12866f81e Remove PLL1 low speed settings (it's out of spec) 2019-02-11 16:38:07 -07:00
Dominic Spill
b701579906 Allow portapack and opera cake to coexist and still enable the PP UI
The side effect of this is to disable GPIO mode for OC, but I2C still
works
Using both addons together is super unlikely
2019-02-01 12:04:40 -07:00
Jared Boone
fa2a9acd1a USB: initial CPLD checksum API support. 2019-01-31 21:19:21 +00:00
Jared Boone
499ac3ad4a PortaPack: Move UI code to hackrf_usb project.
Was in common/ and in the common CMake file, which meant it was being included in the blinky project, which was unnecessary.
2019-01-31 09:37:48 +00:00
Jared Boone
7b86403ce8 PortaPack: If hardware not detected, try to init OperaCake. 2019-01-31 09:24:59 +00:00
Jared Boone
909066cdf8 PortaPack: Replace OperaCake handlers, they were tripping up host tools. Skip operacake_init if PortaPack compiled in, letting operacake_boards be all zero. Should be safe, right? 2019-01-14 20:42:39 -08:00
Jared Boone
e87b3f4fea PortaPack: Address some unused variable/function warnings. 2019-01-09 15:30:24 -08:00
Jared Boone
e05677ab0d OperaCake: Bring together with PortaPack code.
The plan is to have them coexist in the firmware binary, even if the hardware is mutually exclusive at runtime.
2019-01-07 15:35:41 -08:00
Jared Boone
5e88bb8565 USB: Set Opera Cake USB handlers to null unless hardware is detected. 2019-01-07 15:30:32 -08:00
Jared Boone
0666dc961d USB: Bring in constants from host source code.
TODO: Deduplicate this when I'm not feeling so lazy.
2019-01-07 15:29:51 -08:00
Jared Boone
c7d761089f USB: Make vendor request handler table read/write (not const). 2019-01-07 15:29:18 -08:00
Jared Boone
0b46745aed OperaCake code conflicts with PortaPack code, make compile-time conditional. 2018-12-27 15:14:52 -08:00
Dominic Spill
9da826e9ef Add Windows build art(e|i)facts (#561)
This includes:
 * Cmake clean up - thanks @Qyriad
 * Windows binaries saved after each appveyor build
 * A bump to the Visual Studio version that we use to build it
 * An appveyor cygwin script for building firmware, it doesn't work but it seems like someone might pick it up and make it work, or blow it away if we switch to Travis firmware artefacts
2018-12-05 18:45:26 -07:00
Dominic Spill
82656b8f14 HackRF Opera Cake - GPIO test mode 2018-11-09 22:10:16 -07:00
Arnout Vandecappelle (Essensium/Mind)
a6284cb9ed Don't require a C++ compiler
By default, CMake assumes that the project is using both C and C++.  By
explicitly passing 'C' as argument of the project() macro, we tell CMake
that only C is used, which prevents CMake from erroring out if a C++
compiler doesn't exist.
2018-03-31 22:50:37 +02:00
Dominic Spill
bde5ca9f58 DFU serial number - avoid reading serial from flash chip
Set a DFU mode specific serial number
2018-03-27 18:08:49 -06:00
Dominic Spill
5f560d6ad3 Merge branch 'mossmann-master' into flash-investigation 2017-12-05 16:18:19 -07:00
Dominic Spill
3f569a8ad4 hackrf_clock: Allow CLKOUT to be enabled / disabled
hackrf_clock -o 1 / hackrf_clock -o 0
2017-11-07 11:23:48 -07:00
Dominic Spill
c416fa1294 SPI Flash: add function to clear SPI flash status register 2017-11-06 10:42:19 -07:00
Dominic Spill
8f544ee60d Add flash status read 2017-09-12 17:52:07 -06:00
Dominic Spill
46945205f2 Add USB product string for rad1o badge 2017-08-10 16:12:40 +01:00
Dominic Spill
72a03cffa8 Merge pull request #382 from dominicgs/operaglasses
Opera glasses: allow user specified ranges for operacake ports
2017-06-02 10:23:24 -06:00
Dominic Spill
8c7941b0ef Opera glasses: allow user specified ranges for operacake ports
- HackRF switches antenna when tuning
 - ports specified using hackrf_operacake cmdline tool
 hackrf_operacake -f 2350:2800:0 -f 0:400:1 -f 400:700:2 -f 700:6000:3
2017-05-16 17:18:54 -06:00
Marco Bartolucci
533f9ee332 Hardware (CPLD-based) synchronisation
=======================================

This commit allows to synchronise multiple HackRFs with a synchronisation error **below 1 sampling period**

> WARNING: Use this at your own risk. If you don't know what you are doing you may damage your HackRF.
> The author takes no responsability for potential damages

Usage example: synchronise two HackRFs
======================================
1. Chose the master HackRF which will send the synchronisation pulse (HackRF0). HackRF1 will represent the slave hackrf.
2. Retreive the serial number of both HackRFs using `hackrf_info`
3. Use a wire to connect `SYNC_CMD` of HackRF0 to `SYNC_IN` of HackRF0 and HackRF1
4. Run `hackrf_transfer` with the argument `-H 1` to enable hardware synchronisation:
    ```
    $ hackrf_tranfer ... -r rec1.bin -d HackRF1_serial -H 1 | hackrf_transfer ... -r rec0.bin -d HackRF0_serial -H 1
    ```
rec0.bin and rec1.bin will have a time offset below 1 sampling period.
The 1PPS output of GNSS receivers can be used to synchronise HackRFs even if they are far from each other.
>DON'T APPLY INCOMPATIBLE VOLTAGE LEVELS TO THE CPLD PINS

Signal | Header |Pin | Description
-------|--------|----|------------
`SYNC_IN` | P28 | 16 | Synchronisation pulse input
`SYNC_CMD` | P28 | 15 | Synchronisation pulse output

Note:
=====
I had to remove CPLD-based decimation to use a GPIO for enabling hardware.

More info:
==========
[M. Bartolucci, J. A. Del Peral-Rosado, R. Estatuet-Castillo, J. A. Garcia-Molina, M. Crisci and G. E. Corazza, "Synchronisation of low-cost open source SDRs for navigation applications," 2016 8th ESA Workshop on Satellite Navigation Technologies and European Workshop on GNSS Signals and Signal Processing (NAVITEC), Noordwijk, 2016, pp. 1-7.](http://ieeexplore.ieee.org/document/7849328/)

[Alternative link](http://spcomnav.uab.es/docs/conferences/Bartolucci_NAVITEC_2016.pdf)
2017-05-16 11:39:44 +02:00
Marco Bartolucci
747d8e2278 Removed decimation in CPLD 2017-05-15 12:56:51 +02:00
Michael Ossmann
79f95abdb3 correct discrepancy between number of samples and number of bytes in blocks of samples
related to #346
2017-02-16 12:46:17 -07:00
schneider42
4117cd3903 Merge branch 'master' into rad1o 2017-02-11 18:02:51 +01:00
Michael Ossmann
5b881e1d54 fixed bug that caused tuning glitches in interleaved sweep mode 2017-02-08 10:44:16 -07:00
Michael Ossmann
00d5b1c575 don't send first buffer to host in sweep mode until it is full 2017-02-07 17:52:09 -07:00
Michael Ossmann
e9d1c71646 fixed firmware bug with sweep ranges that start at high frequencies 2017-02-07 16:00:20 -07:00
Michael Ossmann
4b6de820ef support multiple frequency ranges in hackrf_sweep 2017-02-07 15:37:26 -07:00
Michael Ossmann
e1b1dbd647 Moved sweep mode frequency computation into firmware.
Changed from long list of tuning frequencies to short list of ranges.
2017-02-07 13:57:49 -07:00
schneider
c0c0fab368 chore(rad1o): White space fixes and cleanup 2017-02-03 19:27:19 +01:00