fw/altos
11 years agoaltos: Provide ISR-based code paths for SPI serial-at-interrupt
Keith Packard [Sat, 19 May 2012 03:13:05 +0000 (20:13 -0700)]
altos: Provide ISR-based code paths for SPI

This allows SPI to be entirely interrupt driven, with callbacks for
completion. It's not tested yet...

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add conversion between Pa and meters
Keith Packard [Sat, 19 May 2012 03:04:57 +0000 (20:04 -0700)]
altos: Add conversion between Pa and meters

To be used with the MS5607 which generates data in calibrated units.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Check MS5607 CRC. Clean up MS5607 API
Keith Packard [Tue, 8 May 2012 06:14:57 +0000 (23:14 -0700)]
altos: Check MS5607 CRC. Clean up MS5607 API

It's not ready for flight yet, but at least it's sensible now.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Conditional byte swapping in mpu6000 driver
Keith Packard [Tue, 8 May 2012 06:14:14 +0000 (23:14 -0700)]
altos: Conditional byte swapping in mpu6000 driver

Only needed on LSB machines.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Wed, 16 May 2012 15:13:53 +0000 (09:13 -0600)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

11 years agobuild-dep on default-jdk instead of openjdk-6-jdk, closes: #655580
Bdale Garbee [Wed, 16 May 2012 15:09:44 +0000 (09:09 -0600)]
build-dep on default-jdk instead of openjdk-6-jdk, closes: #655580

11 years agoaltosui: Try to make telem tick counts match eeprom
Keith Packard [Tue, 8 May 2012 04:53:53 +0000 (21:53 -0700)]
altosui: Try to make telem tick counts match eeprom

telem files can have an extra wrap or two of tick count if they start
recording a long time before the flight. Account for this so that the
CSV file output from each have matching tick values.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Output recorded clock tick in CSV files
Keith Packard [Tue, 8 May 2012 04:53:11 +0000 (21:53 -0700)]
altosui: Output recorded clock tick in CSV files

This allows eeprom and telem files to be correlated accurately

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Hacking at cc1120 driver
Keith Packard [Tue, 8 May 2012 04:52:12 +0000 (21:52 -0700)]
altos: Hacking at cc1120 driver

Still doesn't work, but this adds a ton more register definitions

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Get mpu6000 working
Keith Packard [Tue, 8 May 2012 04:51:25 +0000 (21:51 -0700)]
altos: Get mpu6000 working

This initializes the device appropraitely, and provides a command to
dump the current values in converted form.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: stm: pass DMA buffer index to DMA completion callback
Keith Packard [Tue, 8 May 2012 04:50:26 +0000 (21:50 -0700)]
altos: stm: pass DMA buffer index to DMA completion callback

This lets the user know which DMA has finished.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: stm: delay during USB config with pull-up off
Keith Packard [Tue, 8 May 2012 04:49:24 +0000 (21:49 -0700)]
altos: stm: delay during USB config with pull-up off

This makes sure that a reboot will reliably cause the device to
disconnect from the USB bus.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: stm: share i2c_stop code between send and recv
Keith Packard [Tue, 8 May 2012 04:47:17 +0000 (21:47 -0700)]
altos: stm: share i2c_stop code between send and recv

This waits for the stop signal to appear on the bus, necessary before
starting another transaction.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: stm i2c DMA for large recv appears to work
Keith Packard [Mon, 7 May 2012 06:54:13 +0000 (23:54 -0700)]
altos: stm i2c DMA for large recv appears to work

Transaction appears to be clean on the i2c bus now; correct number of
bytes received, and the nack and stop at the right time. This tests >
2 length reads; should try that too.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: megametrum needs ao_mpu6000.h
Keith Packard [Mon, 7 May 2012 05:53:25 +0000 (22:53 -0700)]
altos: megametrum needs ao_mpu6000.h

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Switch megametrum compile to -Os
Keith Packard [Mon, 7 May 2012 05:52:56 +0000 (22:52 -0700)]
altos: Switch megametrum compile to -Os

Looks like gcc has compiler bugs with -O0

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: STM i2c work.
Keith Packard [Mon, 7 May 2012 05:47:33 +0000 (22:47 -0700)]
altos: STM i2c work.

Start now driven by interrupts
Send now done with DMA and interrupts

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoao-tools: Add GPS and rssi printing to ao-telem
Keith Packard [Wed, 2 May 2012 01:12:41 +0000 (18:12 -0700)]
ao-tools: Add GPS and rssi printing to ao-telem

This prints all of the basic telemetrum messages now.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Report latest telemetry data, rather than using the oldest
Keith Packard [Tue, 1 May 2012 18:08:49 +0000 (11:08 -0700)]
altos: Report latest telemetry data, rather than using the oldest

ao_sample_adc points to the *next* ADC entry, rather than the most
recent one. Step back one entry to get the latest valid data.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add hmc5883 and mpu6000 drivers to megametrum build
Keith Packard [Thu, 26 Apr 2012 06:29:20 +0000 (23:29 -0700)]
altos: Add hmc5883 and mpu6000 drivers to megametrum build

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add mpu6000 and hmc5883 stubs
Keith Packard [Thu, 26 Apr 2012 06:27:58 +0000 (23:27 -0700)]
altos: Add mpu6000 and hmc5883 stubs

No real drivers here yet, just some testing stubs

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add STM I2C recv and stop funcs
Keith Packard [Thu, 26 Apr 2012 06:26:57 +0000 (23:26 -0700)]
altos: Add STM I2C recv and stop funcs

Recv doesn't appear to work with more than one byte

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Oopsed the STM DMA channels for I2C1
Keith Packard [Thu, 26 Apr 2012 06:25:43 +0000 (23:25 -0700)]
altos: Oopsed the STM DMA channels for I2C1

TX is 6, RX is 7

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltosui: Mac OS Lion Java default heap space is too small (Trac #37)
Keith Packard [Sat, 21 Apr 2012 03:26:16 +0000 (22:26 -0500)]
altosui: Mac OS Lion Java default heap space is too small (Trac #37)

Increase it to 512M in the Info.plist file.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Starting to write cc1120 driver
Keith Packard [Tue, 17 Apr 2012 18:01:18 +0000 (11:01 -0700)]
altos: Starting to write cc1120 driver

This does "something" in radio test mode, appearing to generate a
730MHz signal.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltosui: Add apogee lockout configuration
Keith Packard [Sat, 14 Apr 2012 20:53:36 +0000 (13:53 -0700)]
altosui: Add apogee lockout configuration

Provide suggested values of 5/10/15/20 seconds.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltosui: Read frequency from device while configuring ground station
Keith Packard [Sat, 14 Apr 2012 20:52:37 +0000 (13:52 -0700)]
altosui: Read frequency from device while configuring ground station

Missed this when adding the TD config UI.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Remove debug printf from cc1111 check-stack script
Keith Packard [Sat, 14 Apr 2012 19:05:28 +0000 (12:05 -0700)]
altos: Remove debug printf from cc1111 check-stack script

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Respect apogee lockout time in flight algorithm
Keith Packard [Sat, 14 Apr 2012 19:02:14 +0000 (12:02 -0700)]
altos: Respect apogee lockout time in flight algorithm

This prevents any apogee detection from occurring until the specified
number of seconds after boost. This also prevents the switch from
accel+baro to baro only mode in the Kalman filter.

The test frame work is also changed to look for Apogee lockout: in the
eeprom input file.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Clean up test scripts
Keith Packard [Sat, 14 Apr 2012 19:00:32 +0000 (12:00 -0700)]
altos: Clean up test scripts

The flight test scripts were using invalid bash syntax. Clean that up
and also switch the default flight directory to my new
~/misc/rockets/flights directory.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Correct STM USB driver
Keith Packard [Sat, 14 Apr 2012 01:38:29 +0000 (18:38 -0700)]
altos: Correct STM USB driver

Configure endpoint registers correctly now.
Restructure code to make sure we send the right IN packets.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Check all USE_SERIAL_*_STDIO when computing AO_NUM_STDIOS
Keith Packard [Sat, 14 Apr 2012 01:35:46 +0000 (18:35 -0700)]
altos: Check all USE_SERIAL_*_STDIO when computing AO_NUM_STDIOS

AO_NUM_STDIOS is allocated based on the total number of possible stdio
values. Now that multiple serial stdio are possible, make sure to
check all of them.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Set USB Interrupt endpoint interval to maximum allowed
Keith Packard [Sat, 14 Apr 2012 01:34:52 +0000 (18:34 -0700)]
altos: Set USB Interrupt endpoint interval to maximum allowed

We don't ever send anything over this channel, so there's no sense
asking the host to poll it very often.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Pull more interfaces out of ao.h and move to separate files
Keith Packard [Fri, 13 Apr 2012 16:39:20 +0000 (09:39 -0700)]
altos: Pull more interfaces out of ao.h and move to separate files

This moves the aes, btm, companion, lcd and packet interfaces out of ao.h

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: ao_telelaunch.c got left in src directory
Keith Packard [Fri, 13 Apr 2012 16:36:00 +0000 (09:36 -0700)]
altos: ao_telelaunch.c got left in src directory

Should live in product/ao_telelaunch.c

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Massive product config cleanup
Keith Packard [Thu, 12 Apr 2012 21:51:07 +0000 (14:51 -0700)]
altos: Massive product config cleanup

Support multiple serial ports more cleanly

Split out parts of ao.h into separate feature header files

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Start adding apogee lockout support
Keith Packard [Thu, 12 Apr 2012 21:50:12 +0000 (14:50 -0700)]
altos: Start adding apogee lockout support

Remove radio channel support too.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Switch stm-demo to HSE clock, add USB
Keith Packard [Thu, 12 Apr 2012 06:31:28 +0000 (23:31 -0700)]
altos: Switch stm-demo to HSE clock, add USB

Requires that SB17 be soldered shut so that the MCO from the STlink
CPU is available the target for HSE input.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Rework how STM clocks are initialized.
Keith Packard [Thu, 12 Apr 2012 06:30:13 +0000 (23:30 -0700)]
altos: Rework how STM clocks are initialized.

Clean all of the RCC configuration up after turning on the clocks.
Use the MSI clock during initialization to avoid messing around with
the HSI clock temporarily.

Allow for an external clock on the HSE line.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Use new USB driver in megametrum-v0.1 product
Keith Packard [Thu, 12 Apr 2012 06:29:38 +0000 (23:29 -0700)]
altos: Use new USB driver in megametrum-v0.1 product

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add STM USB driver
Keith Packard [Thu, 12 Apr 2012 06:28:45 +0000 (23:28 -0700)]
altos: Add STM USB driver

Emulates the usual CDC-ACM device

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add STM ao_arch_reboot implementation
Keith Packard [Thu, 12 Apr 2012 06:26:30 +0000 (23:26 -0700)]
altos: Add STM ao_arch_reboot implementation

Uses the AIRCR register to force a reset

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add register definitions for STM syscfg and usb
Keith Packard [Thu, 12 Apr 2012 06:25:36 +0000 (23:25 -0700)]
altos: Add register definitions for STM syscfg and usb

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add support for multiple SPI busses and sharing device drivers
Keith Packard [Tue, 10 Apr 2012 06:27:43 +0000 (23:27 -0700)]
altos: Add support for multiple SPI busses and sharing device drivers

The STM32L151 has several SPI busses, and we want to use more than
one, so add a 'bus' parameter to the SPI interfaces. To avoid wasting
time on AVR and CC1111 processors which only use one SPI bus, elide
those parameters from the actual functions by wrapping them with
macros.

Configuring chip select is now all macroized so that each chip can
have its own version, allowing the STM to share the various SPI device
drivers with the cc1111 and avr processors. Note that only the M25
driver has been ported; porting the others is 'trivial', but not
necessary at this point.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: make megametrum beeper test keep beeping
Keith Packard [Tue, 10 Apr 2012 05:25:59 +0000 (22:25 -0700)]
altos: make megametrum beeper test keep beeping

Used to measure the beep frequency.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Check for cc1111 flash overflow
Keith Packard [Tue, 10 Apr 2012 05:25:13 +0000 (22:25 -0700)]
altos: Check for cc1111 flash overflow

The linker is supposed to do this, but it ignores the static
initializer data added after the code.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Increase STM SPI speed to PCLK/4
Keith Packard [Tue, 10 Apr 2012 05:24:36 +0000 (22:24 -0700)]
altos: Increase STM SPI speed to PCLK/4

The pressure sensor seems happy at this speed.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Move MS5607 configuration to ao_pins.h
Keith Packard [Tue, 10 Apr 2012 05:23:52 +0000 (22:23 -0700)]
altos: Move MS5607 configuration to ao_pins.h

Which SPI port and where chip select is to be found are product specific.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add missing parens in ao_ms5607.h
Keith Packard [Tue, 10 Apr 2012 05:22:58 +0000 (22:22 -0700)]
altos: Add missing parens in ao_ms5607.h

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Reduce MS5607 reset delay, increase conversion delay
Keith Packard [Tue, 10 Apr 2012 05:21:46 +0000 (22:21 -0700)]
altos: Reduce MS5607 reset delay, increase conversion delay

Reset doesn't take very long, while doing a conversion seems to take
more than 10ms.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Make STM clock configuration per-product. Fix 32MHz CPU speed
Keith Packard [Tue, 10 Apr 2012 05:17:33 +0000 (22:17 -0700)]
altos: Make STM clock configuration per-product. Fix 32MHz CPU speed

This moves all of the STM clock configuration into ao_pins.h so that
each product can configure it separately. While doing this, I
discovered that the flash memory mode (64-bit, prefetch, latency 1)
wasn't actually getting set, which is why the CPU refused to work at
32MHz.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add beeper driver to STM arch
Keith Packard [Tue, 10 Apr 2012 03:28:19 +0000 (20:28 -0700)]
altos: Add beeper driver to STM arch

Drives the MegaMetrum beeper

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Test I2C code on discovery board.
Keith Packard [Mon, 9 Apr 2012 07:10:43 +0000 (00:10 -0700)]
altos: Test I2C code on discovery board.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: ARM -O0 flag appears to generate buggy code
Keith Packard [Mon, 9 Apr 2012 07:10:01 +0000 (00:10 -0700)]
altos: ARM -O0 flag appears to generate buggy code

Use -Os always, which is annoying...

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Make ms5607 driver do something
Keith Packard [Mon, 9 Apr 2012 07:09:18 +0000 (00:09 -0700)]
altos: Make ms5607 driver do something

It's loading prom values and converting sensor data, but it's getting
the wrong answer at present.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: add STM I2C driver.
Keith Packard [Mon, 9 Apr 2012 07:08:20 +0000 (00:08 -0700)]
altos: add STM I2C driver.

Not well tested yet...

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Slow STM SPI down a bit so the MS5607 returns values
Keith Packard [Mon, 9 Apr 2012 07:06:35 +0000 (00:06 -0700)]
altos: Slow STM SPI down a bit so the MS5607 returns values

It's still not working right, but at least it returns something other
than all zeros...

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Allow STM DMA channels to be reserved for one use
Keith Packard [Mon, 9 Apr 2012 07:05:18 +0000 (00:05 -0700)]
altos: Allow STM DMA channels to be reserved for one use

This allows a single user of a DMA channel to reserve it for use
without needing to lock the mutex; this is required for DMA from the
ADC to work on megametrum as it wants to start DMA from an interrupt
handler, which cannot block on a mutex.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Show temperature in stm-demo
Keith Packard [Sun, 8 Apr 2012 03:35:17 +0000 (20:35 -0700)]
altos: Show temperature in stm-demo

Use the ADC to show current temperature

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Use 384 cycle ADC sample time
Keith Packard [Sun, 8 Apr 2012 03:33:27 +0000 (20:33 -0700)]
altos: Use 384 cycle ADC sample time

This is plenty fast, and provides nice stable readings.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add STM temperature sensor calibration data
Keith Packard [Sun, 8 Apr 2012 03:31:58 +0000 (20:31 -0700)]
altos: Add STM temperature sensor calibration data

Each stm32l has two-point factory temperature calibration data.
Provide access to that for displaying temperature data.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add ADC support to megametrum firmware
Keith Packard [Sun, 8 Apr 2012 01:55:53 +0000 (18:55 -0700)]
altos: Add ADC support to megametrum firmware

Measures all MM igniter and battery voltages.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add ADC tests to stm-demo
Keith Packard [Sun, 8 Apr 2012 01:55:20 +0000 (18:55 -0700)]
altos: Add ADC tests to stm-demo

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: STM SPI is not using interrupts itself
Keith Packard [Sun, 8 Apr 2012 01:54:32 +0000 (18:54 -0700)]
altos: STM SPI is not using interrupts itself

All SPI transfers are done via DMA, so the DMA interrupts suffice.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add support for STM ADC
Keith Packard [Sun, 8 Apr 2012 01:53:12 +0000 (18:53 -0700)]
altos: Add support for STM ADC

DMA-based driver for the STM analog to digital converter.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltosui: remove debug printf from AltosFlightStats
Keith Packard [Sun, 8 Apr 2012 01:44:11 +0000 (18:44 -0700)]
altosui: remove debug printf from AltosFlightStats

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltosui: When computing flight stats, auto-detect boost time
Keith Packard [Sun, 8 Apr 2012 01:36:36 +0000 (18:36 -0700)]
altosui: When computing flight stats, auto-detect boost time

Detect when boost actually starts by looking for the last low
acceleration value before the recorded boost time. This improves the
computation of the boost state data.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltosui: Integrate accel speed from very start of eeprom record
Keith Packard [Sun, 8 Apr 2012 01:35:26 +0000 (18:35 -0700)]
altosui: Integrate accel speed from very start of eeprom record

Don't wait for the flight computer to have detected boost--that's
often several samples after boost actually occurred, which can leave a
bunch of acceleration out of the speed computation.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add ability to change radio frequency in TeleTerra
Keith Packard [Sat, 7 Apr 2012 08:01:33 +0000 (01:01 -0700)]
altos: Add ability to change radio frequency in TeleTerra

Provide a way to set the frequency locally.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Make ao_config_set_radio public
Keith Packard [Sat, 7 Apr 2012 08:01:06 +0000 (01:01 -0700)]
altos: Make ao_config_set_radio public

Allows other bits of code to reset the radio parameters.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Force radio channel to zero when setting frequency
Keith Packard [Sat, 7 Apr 2012 07:25:50 +0000 (00:25 -0700)]
altos: Force radio channel to zero when setting frequency

Otherwise, the actual radio frequency will include the channel offset,
which is not useful.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Make ao_freq_to_set reentrant
Keith Packard [Sat, 7 Apr 2012 07:25:26 +0000 (00:25 -0700)]
altos: Make ao_freq_to_set reentrant

Save a bunch of data space this way.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Shorten help strings
Keith Packard [Sat, 7 Apr 2012 07:24:59 +0000 (00:24 -0700)]
altos: Shorten help strings

Save a bit of code space

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Save memory in ao_config.c
Keith Packard [Sat, 7 Apr 2012 07:23:55 +0000 (00:23 -0700)]
altos: Save memory in ao_config.c

Shorten help messages.
Stop setting aes_key on products not using aes key.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Save memory in ao_cmd.c
Keith Packard [Sat, 7 Apr 2012 07:22:41 +0000 (00:22 -0700)]
altos: Save memory in ao_cmd.c

Shrink a couple of help strings
move a variable in ao_cmd from data to pdata.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add fake install/uninstall targets for stm-bringup
Keith Packard [Sat, 7 Apr 2012 07:22:02 +0000 (00:22 -0700)]
altos: Add fake install/uninstall targets for stm-bringup

Keep global 'make install' from failing.
Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltosui: Radio channel gets set to zero by altos when frequency is set
Keith Packard [Sat, 7 Apr 2012 07:21:03 +0000 (00:21 -0700)]
altosui: Radio channel gets set to zero by altos when frequency is set

Just remember what the channe is going to get set to.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Shuffle stm-demo SPI test code around a bit
Keith Packard [Sat, 7 Apr 2012 05:40:49 +0000 (22:40 -0700)]
altos: Shuffle stm-demo SPI test code around a bit

Move a debug printf beyond the chip select boundary to
allow for more accurate timing.

Send four bytes instead of just one.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Declare stm DMA address registers as volatile void *
Keith Packard [Sat, 7 Apr 2012 05:40:17 +0000 (22:40 -0700)]
altos: Declare stm DMA address registers as volatile void *

Eliminates a cast when assigning to them.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Disable DMA unit when idle
Keith Packard [Sat, 7 Apr 2012 05:39:45 +0000 (22:39 -0700)]
altos: Disable DMA unit when idle

Should save a bit of power

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Disable STM SPI transceiver when idle
Keith Packard [Sat, 7 Apr 2012 05:39:12 +0000 (22:39 -0700)]
altos: Disable STM SPI transceiver when idle

Should save a bit of power.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add DMA, SPI and MS5607 drivers
Keith Packard [Sat, 7 Apr 2012 01:07:07 +0000 (18:07 -0700)]
altos: Add DMA, SPI and MS5607 drivers

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: megametrum builds an ELF file, not an IHX file
Keith Packard [Tue, 3 Apr 2012 06:00:29 +0000 (23:00 -0700)]
altos: megametrum builds an ELF file, not an IHX file

Name it appropriately.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Move SPI functions to architecture-specific location
Keith Packard [Tue, 3 Apr 2012 05:58:54 +0000 (22:58 -0700)]
altos: Move SPI functions to architecture-specific location

Some architecture specific stuff needs to use core altos code, so
create new ao_arch_funcs.h files per architecture that get pulled in
at the end of ao.h

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Oops. Set per-USART STM baud rate register instead of usart1
Keith Packard [Tue, 3 Apr 2012 02:27:53 +0000 (19:27 -0700)]
altos: Oops. Set per-USART STM baud rate register instead of usart1

Was accidentally always setting usart1 instead of the per-usart
register. Didn't work too well for other usarts...

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agobe explicit in a couple places about only using single-cell LiPo batteries
Bdale Garbee [Sat, 31 Mar 2012 23:53:25 +0000 (17:53 -0600)]
be explicit in a couple places about only using single-cell LiPo batteries

12 years agouse explicit path not $(HOME) to find ARM toolchain for now
Bdale Garbee [Sat, 31 Mar 2012 22:43:39 +0000 (16:43 -0600)]
use explicit path not $(HOME) to find ARM toolchain for now

12 years agoadd config file for gdb use with MegaMetrum via Olimex dongle
Bdale Garbee [Sat, 31 Mar 2012 22:43:11 +0000 (16:43 -0600)]
add config file for gdb use with MegaMetrum via Olimex dongle

12 years agoBuild megametrum-v0.1 by default
Keith Packard [Sat, 31 Mar 2012 19:44:14 +0000 (12:44 -0700)]
Build megametrum-v0.1 by default

12 years agoaltos: Add stub cc1120 driver
Keith Packard [Sat, 31 Mar 2012 19:43:58 +0000 (12:43 -0700)]
altos: Add stub cc1120 driver

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Move cc1111 DMA engine interface to cc1111/ao_arch.h from ao.h
Keith Packard [Thu, 29 Mar 2012 04:54:32 +0000 (21:54 -0700)]
altos: Move cc1111 DMA engine interface to cc1111/ao_arch.h from ao.h

It's hardware specific

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Move cc1111 AES driver to cc1111 directory
Keith Packard [Thu, 29 Mar 2012 04:53:30 +0000 (21:53 -0700)]
altos: Move cc1111 AES driver to cc1111 directory

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoopenocd config file for MegaMetrum
Bdale Garbee [Sat, 31 Mar 2012 19:29:15 +0000 (13:29 -0600)]
openocd config file for MegaMetrum

12 years agoBump version to 1.0.9.4 1.0.9.4
Keith Packard [Thu, 29 Mar 2012 04:45:44 +0000 (21:45 -0700)]
Bump version to 1.0.9.4

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoaltos: Add ao_freq.c to megametrum build
Keith Packard [Thu, 29 Mar 2012 04:45:02 +0000 (21:45 -0700)]
altos: Add ao_freq.c to megametrum build

I think this will be needed to compute radio settings on the cc1120

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agostm-demo does not use altitude.h
Keith Packard [Sun, 25 Mar 2012 20:08:05 +0000 (13:08 -0700)]
stm-demo does not use altitude.h

12 years agoUse -Os for STM apps. Fix altos.ld to matchall .rodata* sections
Keith Packard [Fri, 23 Mar 2012 08:42:32 +0000 (01:42 -0700)]
Use -Os for STM apps. Fix altos.ld to matchall .rodata* sections

Without .rodata*, it would stick the flash copy of the data on top of
any further .rodata* sections. Fortunately, the linker catches that
and complains...

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoGet config stuff hooked up for MegaMetrum
Keith Packard [Fri, 23 Mar 2012 07:55:53 +0000 (00:55 -0700)]
Get config stuff hooked up for MegaMetrum

This stubs out enough stuff to let ao_config link and work

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoAdd preliminary MegaMetrum v0.1 support
Keith Packard [Fri, 23 Mar 2012 07:43:47 +0000 (00:43 -0700)]
Add preliminary MegaMetrum v0.1 support

This turns on an LED, enables the internal R/C clock, hooks USART3 to
the GPS chip and USART1 to the console.

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoUse new Makefile.defs in stm-demo
Keith Packard [Fri, 23 Mar 2012 07:43:17 +0000 (00:43 -0700)]
Use new Makefile.defs in stm-demo

Signed-off-by: Keith Packard <keithp@keithp.com>