| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
Avoids having the interrupt re-raised multiple times until the reading
task finally wakes up.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
When it fails to signal conversion complete to the CPU, keep track of
that and report it with the rest of the current data.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
512 seems cozy given the printf implementation we're using and the
extensive interrupts.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Don't try to fly if the board isn't working right.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
It doesn't work unless USB is connected or occasionally while the
debug port is enabled. It's mystic.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
I'm having trouble getting it working reliably, so we'll like disable it
for now. This patch makes that possible.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This blocks starting the decoder until all of the data have arrived so
that the time spent in the decoder is easily computed.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
9.3ms vs 14.7ms, a clear win.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Fix both clock time and rise time.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Make the FEC code just set the CRC_OK bit like the cc1111 radio does;
eliminates a bunch of weird conventions across the FEC API.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
This slows the i2c bus to 100kHz (yuck), sets the rise time to spec
(it was way off) and adds more delays during bus setup. I've run this
for hours now without trouble. Will try to adjust things back to fast
mode and see if I can make that work as 100kHz isn't fast enough to
reliably get data at 100 samples/sec.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Must set ao_usb_in_pending before telling USB about new data or an
interrupt could arrive at the wrong time to clear it.
Same for ao_usb_in_flushed.
Without these changes, I've seen the USB bus lock up on occasion,
waiting for an IN packet to consume data, but with no IN data pending
in the hardware.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
STM needs it to be provided when enabling the SPI device, so just fix
AVR and cc1111 to do the same.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
This seems better than the random loop that it replaces, but I still
have no idea why this is required; it doesn't coorespond to the docs
at all...
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Seems to work; we'll leave the code around in case something bad
happens later.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Make some variables static, remove stale debug code
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
If you're in idle mode, you stop forever as the packet mode receiver
will own the radio mutex forever.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
The fancy stm i2c debugging code had calls to flush() that were
invoked outside of the conditionals leading to all kinds of fun --
flush() may re-enable interrupts, yield or do all kinds of wacky
stuff, none of which is appropriate from the middle of a device driver
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
I have no idea why this is required, but the mpu6000 will not come up
and run if this isn't present.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Move it to core
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Stack overflow often happens from interrupt handlers sitting on top of
a task stack. Check for this during ao_wakeup as that is often called
during interrupt processing.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This turns on everything that currently works
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This provides a simple method for getting high-resolution timer data
to use in performance tuning code. It's not used by default anywhere.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
Radio receive camps on the SPI bus, making it impossible to access
flash memory. Abort any pending receive operation when trying to get
to the flash part.
Yes, this is a total hack.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Using unsigned locals made GCC sad as it was compared with a signed value.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Now that MM has full radio functionality, we can make it work right.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Using printf is way too slow with pdclib; just hand-write hex byte output.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Integrate interleaving, CRC and padding within the decode/encode
functions.
Provide for ISR priorities so that the 1120 RX interrupt takes
precedence over the other interrupts or we risk losing bits.
Optimize the viterbi decoder a bit (goes from 10ms per packet to 7ms
per packet).
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
MM uses a different logging format with larger log blocks, so
restructure the GPS logging code to fill them up
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
No need to publish these; they're all private to cc1111
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Make stm port parameters always be pointers; this avoids the confusion
where some macros took '&port' and others took a bare 'port', and also
unifies code to run on other processors in a consistent fashion.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
libaltos has a small range of 'AltusMetrum' products to avoid opening
other devices. We've got more IDs, so open up the range.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
AltosLink owns all of the device configuration, so remove that from
AltosSerial and make sure that AltosLink provides the right function
signatures (wasn't using the new direct frequency setting command).
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Keep it parallel with ao_fec_tx.c
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Decode radio input one interleave block at a time. This overlaps the
decode computation with the packet reception, leading to lower latency
in an attempt to keep up with the transmitter.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Call the fec decode function, compute RSSI and check CRC
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Interrupt-per-bit, but it seems to work
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Not much builds without this...
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
Integrate interleaving and whitening into encode and decode steps.
Add CRC checking function for receive.
Make ao_fec_test program round-trip the data and verify correctness.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
It's not used yet, just wanted to see how big the resulting object
file was (492 bytes).
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
There aren't *any* forward bits to use when decoding the last byte.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Minimize data usage, make data arrays static
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Decode bits incrementally. Don't bother decoding the last byte; it's
always a pad byte.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Only need two cost arrays (previous and next). Create constant
full-width decoder table instead of expanding bits into bytes for each
decode step.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
I think I understand how it works now. It's not exactly speedy, and it
uses a lot of memory.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
It's not a driver as it's not specific to the 1120 chip
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Parse the new packet formats
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Required restructuring the whole telemetry system to provide abstract
interfaces to flight data.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
The cc1120 is noisy enough to break SPI data transfers at 4MHz, so
crank things down to 1MHz. It's "stable" now, but clearly needs a
filter and shorter traces.
Signed-off-by: Keith Packard <keithp@keithp.com>
|