summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* altos/stmf0: Add missing ao_gpio.cKeith Packard2016-02-07
| | | | | | This contains the code for power managing the GPIO pins Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add simple stats test to TRNG codeKeith Packard2016-02-07
| | | | | | | This detects broken hardware by making sure the standard deviation in the raw values used to compute each buffer is at least 128. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Delay TRNG ADC long enough for HV supply to stabilizeKeith Packard2016-02-07
| | | | | | | Looks like it takes about 70ms for the supply to start running right, so delay after powering it up for that long. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/chaoskey-v0.1: Add power management and change USB classesKeith Packard2016-02-07
| | | | | | | Enable power management. Expose only a single IN endpoint. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add power management to TRNG driverKeith Packard2016-02-07
| | | | | | | Support suspend/resume of the TRNG power supply, delaying after resume to wait for it to stabilize. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow USB drivers to skip CDC-ACM -specific descriptorsKeith Packard2016-02-07
| | | | | | | | For devices not providing the standard CDC-ACM interface, let them skip the various descriptors and interfaces to provide a more limited set of capabilities. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Add suspend/resume supportKeith Packard2016-02-07
| | | | | | Allow USB suspend to suspend USB, GPIOs and master clock. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add power management APIsKeith Packard2016-02-07
| | | | | | | This provides sequenced suspend/resume functionality, allowing modules to register for power management at configuration time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Allow projects to specify non-default stack sizeKeith Packard2016-02-07
| | | | | | 512 may not be suitable for everyone. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: remove blank line in stmf0/ao_timer.cKeith Packard2016-02-07
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/chaoskey: Delay ADC reading for 250ms at startupKeith Packard2016-01-28
| | | | | | This lets the HV supply stabilize before we start sampling values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/chaoskey: Add support for flipping between raw and cooked bitsKeith Packard2016-01-28
| | | | | | | | Plug the 'force bootloader' thing onto the board while it's running and it will generate raw bits instead of running them through the CRC to whiten. Useful for validating the raw hardware. Signed-off-by: Keith Packard <keithp@keithp.com>
* src/chaoskey-v0.1: Add HV enable supportKeith Packard2016-01-19
| | | | | | Turn on the HV supply when the OS starts. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Switch PWM constants to end up exposing µsecKeith Packard2016-01-10
| | | | | | | | This changes the constants so the clock runs at 1MHz, making the step 1µsec each. Then make the period 20000 steps, or 20ms for a 50Hz frequency as before. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Set TeleMega v2.0 PWM to support servosKeith Packard2016-01-10
| | | | | | | | Typical servos use a 50Hz signal with less than 10% duty cycle. Set the divider to 10 and the range to 64000 to provide a reasonable level of detail down in the low range. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Insert inter telemetry-packet delayKeith Packard2016-01-10
| | | | | | The receivers take some time to reset the radio between packets, so make sure we don't send back-to-back telemetry too quickly by delaying after sending each telemetry packet.
* Switch TeleMega v2.0 to CC1200 radio chiptelemega-v2Keith Packard2016-01-09
| | | | | | That's what we're using, after all Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Set AO_PWM_TIMER_SCALE for telemega-v2.0Keith Packard2015-12-25
| | | | | | This is needed to configure the PWM timer correctly Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Get stm32l pwm driver workingKeith Packard2015-12-25
| | | | | | | | | | | | | Fix the CCMR1_OC1PE and CCMR2_OC3PE values. Disable clock when no PWM outputs are running. Fix the apb1enr value for the timer. Set ARR value to PWM_MAX - 1 -- ARR is off by one. Sets the GPIO pins to 40MHz bandwidth for sharper edges. Tested on EasyMega, but that code is not included as it breaks the companion protocol. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add TeleMega v2.0, including PWM driverKeith Packard2015-12-25
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* telelco: Fix pad reset to one on radio signal lossKeith Packard2015-10-13
| | | | | | | The pad number was getting reset back to one when signal was lost, causing pad one to get fired in this case even when already set to arm mode. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telelco: Adjust drag race UIKeith Packard2015-10-13
| | | | | | | | | Enter/leave drag race is done by rotating the box selector knob to a new 'dr' position and then holding down the firing button; this avoids a potential accidental firing if you somehow don't realize you've armed the box before selecting drag race mode. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telelco: Add drag race UIKeith Packard2015-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With the unit disarmed, press and hold the fire button for five seconds to enable drag race mode. The display will show 'dr' for five seconds and beep five times to indicate that drag race mode is enabled. The decimal points in the display will all be displayed as an additional visual aid. Once every five seconds, it will beep. With drag race mode enabled, you can select a box/pad pair and press the 'fire' button to add it to the drag race group. For the current box, all members of the drag race group will have their continuity LEDs blink slowly. There will be no indication of continuity in this mode; you'll want to check that before enabling drag race mode. If you want to de-select a member of the group, just press the fire button again. Each time you push the fire button, it will beep out the pad number added or removed. Arm the box and you will not be able to add or remove members from the drag race group. Firing will simultaneously fire all members of the drag race group. To disable drag race mode, press and hold the fire button for two seconds. It will beep twice and turn off the decimal points in the display. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telelco: Infrastructure changes for drag racingKeith Packard2015-08-29
| | | | | | | This makes the lco management code support arming multiple pads and firing all of them at once. The UI code does not expose this yet. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Provide direct segment driving interface for LCD displaysKeith Packard2015-08-29
| | | | | | | This exposes a simple bit-mask for setting the seven segments instead of just allowing hex-decimal values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telefire: No reply for ARMED. Ignore time for FIRE.Keith Packard2015-08-29
| | | | | | | This will let us do drag races by letting the LCO arm multiple boxes and fire them all with a single command. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add HAS_COMPANION to new boards with companion connectorsKeith Packard2015-08-20
| | | | | | | | | | | Thanks much to Rob Derstadt for discovering this bug! TeleMetrum v2.0, TeleMega, EasyMega, TeleBalloon v2.0 all have companion connectors and yet HAS_COMPANION was not defined. This disabled companion telemetry packets on these products, but otherwise didn't have any effect. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telebt-v3.0: Report battery voltage correctlyKeith Packard2015-06-25
| | | | | | | There was an extra %d, and an extra ':' in the output, making the UI not parse the voltage correctly Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telelco: Show box voltage with pad knob instead of firing buttonKeith Packard2015-05-25
| | | | | | | | Turn left past '1' and see the firing box battery voltage instead of pushing the firing button with the box disarmed. This seems like a safer UI. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telelco: Display telefire battery voltageKeith Packard2015-05-25
| | | | | | | When the firing button is pressed while unarmed, show the telefire battery voltage in the display. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add telelco v0.3 (v0.2 with cc1200 instead of cc1120)Keith Packard2015-05-25
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* telefire: Report telefire battery voltage over telemetry linkKeith Packard2015-05-25
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Only set CMAC RSSI value on valid packet receivedKeith Packard2015-05-24
| | | | | | | | This ignores spurious packets for the purpose of showing the RSSI value in telelco/telefire, avoiding warning about 'low RSSI' when the radio receives noise. Signed-off-by: Keith Packard <keithp@keithp.com>
* telefire: Make 'good' RSSI value configurableKeith Packard2015-05-24
| | | | | | | | Different radios will have different 'good' RSSI values, so let each product configure it, leaving the default set to -90dBm, which is a solid signal value for the CC1111. Signed-off-by: Keith Packard <keithp@keithp.com>
* micropeak: Use fast load mode by default in -load scriptKeith Packard2015-05-19
| | | | | | Speed up flashing in default config Signed-off-by: Keith Packard <keithp@keithp.com>
* microsplash: Add 'publish' target to MakefileKeith Packard2015-05-19
| | | | | | | This dumps the resulting binary and -load script into the Binaries directory of the altusmetrumllc repo Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Support 32MHz xtal on cc1200Keith Packard2015-05-19
| | | | | | | I ended up building some cc1200-based boards with 32MHz xtals, so just make this an option when building the driver. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Have fast ADC ring buffer code use wrap-aroundKeith Packard2015-03-20
| | | | | | | | | Instead of requiring that the whole set of returned values fit precisely in the ring, allow for wrap-around so that we can fetch an odd number of ADC values. The previous version required that the fetch amount always be a factor of the ADC buffer size. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/chaoskey: Set USB VID/PID to 0x1d50/0x60c6Keith Packard2015-03-19
| | | | | | | These are allocated from the OpenMoko USB vendor ID page and offer a more 'official' number than from using the 0xfffe space. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add the ability to configure a different USB vendor IDKeith Packard2015-03-19
| | | | | | | ChaosKey will use an OpenMoko vid/pid, so we need the ability to configure a different USB vendor ID for each product. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Support old telemega eeprom file formats in ao_flight_testKeith Packard2015-03-10
| | | | | | | | The old eeprom format used different stoarge for the accel calibration data, which doesn't matter to this code, but the change in the format value does. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Make aprs test code compile againKeith Packard2015-03-10
| | | | | | Adding the compressed/uncompressed config option broke the APRS test harness. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Need ao_exti.h for pin configurationKeith Packard2015-03-07
| | | | | | Flash loader uses pin configuration to set up GPIOs for boot selection Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add makefile for chaoskey flash loaderKeith Packard2015-03-07
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Build chaoskey by defaultKeith Packard2015-03-07
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add .gitignore for chaoskeyKeith Packard2015-03-07
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Missing pad field in TMv2 data packetKeith Packard2015-03-02
| | | | | | | | | | The normal ARM padding would have filled this in correctly, but it's best to be explicit about the structure. This also adds a test to make sure the resulting telemetry declaration is exactly 32 bytes, Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Wait for BT disconnect before sending commandKeith Packard2015-03-02
| | | | | | | | | | | If AltosDroid manages to connect to the BT module before we've configured it, we won't be able to talk to it as we can't force the module to ignore connection attempts. Wait for AltosDroid to give up and let us configure the device. Eventually, we'll manage, if AltosDroid's delay interval is longer than the time it takes to configure the unit. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make APRS format (compressed/uncompressed) configurableKeith Packard2015-03-02
| | | | | | | | This provides a choice of compressed vs uncompressed when sending APRS packets to deal with receivers that still do not have support for the more useful compressed format. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/usbtrng: Split out random number generating code to separate driverKeith Packard2015-02-28
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>