| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
Use DATA bits to mark which sensors have failed, then report that in
beeps at startup time to help diagnose hardware failures while still
allowing the board to be used over USB.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
Products that want to remain usable (over USB) after a sensor failure
don't want to panic when the ms5607 fails, but products with limited
ROM space don't want to have extra code to check for the sensor
failure and panic. Change the MS5607 driver to allow either option,
and then make the micropeak based devices use it.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
MicroPeak v2 now has config stuff where these values get shown
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This lets AltosUI handle the eeprom data
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
MicroPeak v2.0 has tasking support, but doesn't have a separate ms5607
task. That means the device isn't getting initialized when not running
the flight code, so in cmd mode we need to make sure it's initialized,
and we also need to actually fetch a value to display.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
We don't have TRUE and FALSE anymore (they were pdclib specific).
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This was used with the 8051 bit-addressing mode to provide
single-instruction access to GPIO pins.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Now that we don't support 8051, we don't need these
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Use FALSE and TRUE in ms5607.c driver instead.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Use some code constructs that make the little AVR processor happier
and save about 16 bytes of memory.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Read data into a temp variable, block interrupts, then update the
published value.
The bug is easy to see with the HMC5883 which has to byte-swap the
output of the chip, and hence can occasionally get caught with the
wrong byte order data.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
MicroPeak V2 has tasks, but doesn't want to use another thread just
for the MS5607.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This will let the fake flight code update it as necessary, without
creating a new interface in ao_ms5607.c
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
If the MISO line goes low before we manage to configure the
interrupts, we'll miss it entirely unless we check the pin explicitly.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
The value are 'long', so use the right printf format.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Needed for TeleMini v2.0
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Mash lots of storage locations and code around to shrink stuff down to size
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
This asks the EXTI code to not mess with the pin configuration so that
the MS5607 driver can get interrupts on the MISO pin while still using
it for SPI.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Replace open-coded ao_spi_get/put and ao_gpio_set sequences
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
We've got lots of time, so get the highest resolution baro data available.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Stop using cli/sei, which are avr-specific
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Add sample-based profiling, using a 1kHz timer
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|\
| |
| |
| | |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
Makes the conversion code available even where the driver isn't needed
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
Micropeak doesn't have tasking, prepare the ms5607 driver for that
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
These just display the most recently fetched values
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of trying to get things into the ring from a variety of
functions, go back to the simpler method of storing them in globals
and having the ADC code just pluck out the most recent values.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|/
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
These were disabled to help with testing in Argonia
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
MS5611 and MS5607 use slightly different conversion functions. Alas,
there doesn't appear to be a way to tell them apart in software. This
patch adds the necessary conversion changes and makes them depend on a
compile-time configuration option.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Make it easier to tell which component is failing self test
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This has each sensor mark a bit in the current data record which is
then sent for processing when all of the data are present.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Leave CS low while releasing the SPI bus when waiting for conversion
complete -- other SPI bus users will use another set of pins.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Avoids having the interrupt re-raised multiple times until the reading
task finally wakes up.
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Yes, this is still an ugly kludge, but it's easy.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
This has the MS5607 polling once each tick for pressure and
temperature and then saving that in a global variable. The command UI
provides for dumping the prom data so that an eeprom file can have
raw sensor data along with the conversion factors necessary to compute
useful values.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
It's not ready for flight yet, but at least it's sensible now.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Reset doesn't take very long, while doing a conversion seems to take
more than 10ms.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
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>
|
|
Signed-off-by: Keith Packard <keithp@keithp.com>
|