Martin Ling 79853d2b28 Add a second counter to keep track of bytes transferred by the M4.
With both counters in place, the number of bytes in the buffer is now
indicated by the difference between the M0 and M4 counts.

The M4 count needs to be increased whenever the M4 produces or consumes
data in the USB bulk buffer, so that the two counts remain correctly
synchronised.

There are three places where this is done:

1. When a USB bulk transfer in or out of the buffer completes, the count
   is increased by the number of bytes transferred. This is the most
   common case.

2. At TX startup, the M4 effectively sends the M0 16K of zeroes to
   transmit, before the first host-provided data.

   This is done by zeroing the whole 32K buffer area, and then setting
   up the first bulk transfer to write to the second 16K, whilst the M0
   begins transmission of the first 16K.

   The count is therefore increased by 16K during TX startup, to account
   for the initial 16K of zeros.

3. In sweep mode, some data is discarded. When this is done, the count
   is incremented by the size of the discarded data.

   The USB IRQ is masked whilst doing this, since a read-modify-write is
   required, and the bulk transfer completion callback may be called at
   any point, which also increases the count.
2022-02-13 16:46:12 +00:00
2020-01-20 23:33:44 +00:00
2021-12-28 18:27:01 -05:00
2016-07-14 10:27:28 -06:00
2012-03-16 09:59:45 -06:00
2021-11-15 19:29:01 -05:00

HackRF

This repository contains hardware designs and software for HackRF, a low cost, open source Software Defined Radio platform.

HackRF One

(photo by fd0 from https://github.com/fd0/hackrf-one-pictures)

principal author: Michael Ossmann mike@ossmann.com

Information on HackRF and purchasing HackRF: https://greatscottgadgets.com/hackrf/


Documentation

Documentation for HackRF can be viewed on Read the Docs. The raw documenation files for HackRF are in the docs folder in this repository and can be built locally by installing Sphinx Docs and running make html. Documentation changes can be submitted through pull request and suggestions can be made as GitHub issues.


Getting Help

Before asking for help with HackRF, check to see if your question is listed in the FAQ.

For assistance with HackRF general use or development, please look at the issues on the GitHub project. This is the preferred place to ask questions so that others may locate the answer to your question in the future.

We invite you to join our community discussions on Discord. Note that while technical support requests are welcome here, we do not have support staff on duty at all times. Be sure to also submit an issue on GitHub if you've found a bug or if you want to ensure that your request will be tracked and not overlooked.

If you wish to see past discussions and questions about HackRF, you may also view the mailing list archives.

GitHub issues on this repository that are labelled "technical support" by Great Scott Gadgets employees can expect a response time of two weeks. We currently do not have expected response times for other GitHub issues or pull requests for this repository.

Description
No description provided
Readme 49 MiB
Languages
KiCad 70.6%
C 26%
CMake 1%
Python 1%
Assembly 0.8%
Other 0.5%