summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* altos: Create a 32-bit 1MHz timer for use in profiling executionKeith Packard2012-06-26
| | | | | | | 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>
* altos: Abort radio receive when using flash memory on megametrumKeith Packard2012-06-26
| | | | | | | | | | 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>
* altos: Make gcc happy with ao_telemetry_set_intervalKeith Packard2012-06-26
| | | | | | Using unsigned locals made GCC sad as it was compared with a signed value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Turn radio-related bits of ao_flight_mm.cKeith Packard2012-06-26
| | | | | | Now that MM has full radio functionality, we can make it work right. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: custom hex printer for telemetry packetsKeith Packard2012-06-26
| | | | | | Using printf is way too slow with pdclib; just hand-write hex byte output. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Optimize FEC encode and decodeKeith Packard2012-06-26
| | | | | | | | | | | | | 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>
* altos: Add GPS logging code for MegaMetrumKeith Packard2012-06-26
| | | | | | | 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>
* altos: Make cc1111 radio control functions staticKeith Packard2012-06-26
| | | | | | No need to publish these; they're all private to cc1111 Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up usage of port parametersKeith Packard2012-06-26
| | | | | | | | 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>
* altos: rename ao_viterbi.c to ao_fec_rx.cKeith Packard2012-06-26
| | | | | | Keep it parallel with ao_fec_tx.c Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Incremental viterbi decodeKeith Packard2012-06-25
| | | | | | | | 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>
* altos: decode cc1120 received packetsKeith Packard2012-06-25
| | | | | | Call the fec decode function, compute RSSI and check CRC Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Get cc1120 packet reception workingKeith Packard2012-06-25
| | | | | | Interrupt-per-bit, but it seems to work Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Forgot ao_telemetry.hKeith Packard2012-06-25
| | | | | | Not much builds without this... Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: improve FEC apis to reduce data copyingKeith Packard2012-06-23
| | | | | | | | | 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>
* altos: Add ao_viterbi.c to megametrum buildKeith Packard2012-06-23
| | | | | | | 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>
* altos: fix comment about decoding last byte of FEC dataKeith Packard2012-06-23
| | | | | | There aren't *any* forward bits to use when decoding the last byte. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make ao_fec_tx_test build cleanly with -WallKeith Packard2012-06-23
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: optimize Viterbi implementationKeith Packard2012-06-23
| | | | | | Minimize data usage, make data arrays static Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: incremental viterbi decodeKeith Packard2012-06-23
| | | | | | | Decode bits incrementally. Don't bother decoding the last byte; it's always a pad byte. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Start optimizing viterbi decoderKeith Packard2012-06-22
| | | | | | | | 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>
* altos: Add the simplest possible viterbi decoderKeith Packard2012-06-22
| | | | | | | 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>
* altos: Move FEC code to coreKeith Packard2012-06-21
| | | | | | It's not a driver as it's not specific to the 1120 chip Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Crank down STM SPI speed for MMKeith Packard2012-06-21
| | | | | | | | 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>
* altos: Add full MM telemetryKeith Packard2012-06-21
| | | | | | | | Create two new telemetry packets to hold all of the MM data. This patch also splits the telemetry structures out of ao.h Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Configure STM LCD driver for giant LCD digitsKeith Packard2012-06-21
| | | | | | These devices require static mode. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make sure ao_storage_config is set before reading config blockKeith Packard2012-06-17
| | | | | | | | ao_storage_read does in fact call ao_storage_setup, but we need the value of ao_storage_config *before* calling ao_storage_read, so call ao_storage_setup first. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: hack STM serial number to 58Keith Packard2012-06-17
| | | | | | otherwise altosui won't record telemetry Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: make cc1120 ao_radio_send re-entrantKeith Packard2012-06-17
| | | | | | It gets called from multiple tasks, so put local data on the stack. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add telemetry to megametrumKeith Packard2012-06-17
| | | | | | Now that the radio works Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Software implemenation of CC1111 radio encodingKeith Packard2012-06-17
| | | | | | | Add CRC, whitening, FEC and interleaving routines for transmission path to allow cc1120 to send telem packets to cc1111. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Be more careful about register save/restore in ao_yieldKeith Packard2012-06-17
| | | | | | | Make sure the general registers are all saved before messing with any of them. Then, explicitly use r0 to save/restore apsr and primask. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't lose IRQ disabled state in ao_sleepKeith Packard2012-06-17
| | | | | | | | | | | | Using ao_arch_critical around the wchan setting will force interrupts to be re-enabled before ao_yield records the state of that bit, potentially causing problems with functions not atomically testing and sleeping. Tasks that need to set wchan with interrupts disabled should have interrupts disabled when entering ao_sleep already. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: ao_storage_read already calls ao_storage_setupKeith Packard2012-06-17
| | | | | | No need to call twice. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use interrupts to wake up after RDF transmission.Keith Packard2012-06-17
| | | | | | Also clean up the debug output Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Crank cc1120 power down to 0dBm to avoid crashing CPUKeith Packard2012-06-17
| | | | | | | Looks like RFI from the transmitter is confusing the CPU; lower the 1120 power output from +14dBm to +0dBm to keep the CPU happy. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Reduce STM SPI data rate to 4MHzKeith Packard2012-06-15
| | | | | | cc1120 doesn't want more than 6.1MHz, otherwise it gets very angry. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Start making cc1120 radio workKeith Packard2012-06-15
| | | | | | RDF tones and radio calibration work now. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix cc1120 packet mode datarate and configKeith Packard2012-06-15
| | | | | | Was using the wrong function Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make sure cc1120 is initialized correctly at startup timeKeith Packard2012-06-15
| | | | | | Check to make sure it pulls down MISO when CS is enabled. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: use 'b' command for radio beepKeith Packard2012-06-15
| | | | | | 'B' is used by the baro data dumper. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix RDF mode data rate and PKT_CFG0 valueKeith Packard2012-06-15
| | | | | | | Changes tone to the desired 1kHz frequency and ensures the PKT_CFG0 has the right value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Actually write cc1120 register valuesKeith Packard2012-06-15
| | | | | | Helps to not use 'read' mode when writing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Configure cc1120 frequencyKeith Packard2012-06-15
| | | | | | | Set default conversion value, and pull the selected frequency calibration data out of the config block. Signed-off-by: Keith Packard <keithp@keithp.com>
* Temporarily disable packet and telem on MMKeith Packard2012-06-15
| | | | | | While work on the radio code progresses Signed-off-by: Keith Packard <keithp@keithp.com>
* Allow product to override maximum number of command lists (NUM_CMDS)Keith Packard2012-06-15
| | | | | | Just in case some product wants to save memory, or have more. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make cc1111 products all depend on ao_arch.h and ao_arch_func.hKeith Packard2012-06-04
| | | | | | Ensures that files get recompiled as needed Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Other half of the ms5607 prom reporting patchKeith Packard2012-06-04
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: typo in ao_monitor prevented ground station from including codeKeith Packard2012-06-04
| | | | | | | This created ground station software that couldn't actually receive and report telemetry packets. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make 'v' command dump pressure sensor ROM valuesKeith Packard2012-06-04
| | | | | | Avoids needing a new command Signed-off-by: Keith Packard <keithp@keithp.com>