| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
We don't write to this, so let it be const for type checking
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
Instead of blocking on PQT, just set up the receiver to start going
and when the first bit interrupt comes in, grab the SPI bus if
possible and configure it for reception. This improves sensitivity in
the radio by a significant amount while making the code conceptually a
bit nicer.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This sticks a barrier in the CPU to prevent using the wrong stack
register past the change.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Disable the separate stack as that means we can't figure out the PC
from the timer interrupt. Move ao_idle_loc after the interrupt release
so that we see idle tasks correctly.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
If other drivers use the SPI bus, the MPU6000 gets confused as its
sitting on the bus looking for I2C messages. Just grab the mutex
before the OS is running and hold onto it until the MPU6000 has been initialized.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
The necessary data structures aren't defined in this case.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This allows the real application to get loaded at 0x2000 and jumps to
that at startup time if the boot pin is set appropriately
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
This reserves 512 bytes of memory for a stack, then makes sure that
exceptions continue to use that stack while processes use the per-task
stack.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
With the GPIO pins set to 10MHz now, we can run SPI at the maximum
possible speed (8MHz).
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
We were stealing one value (0xff) in the return value from pollchar to
indicate 'not ready yet'. Instead of doing that, use the integer value
-1 and have pollchar return an int instead of a char. That
necessitated cleaning a few other bits to make sure that 0xff wouldn't
get promoted to -1 on accident.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Otherwise, we run the risk of an interrupt waking a task after we've
decided to idle the CPU.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Turn a bunch of the macros into inline functions.
Clean up the reboot method to use the stm_scb structure.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Just list them all so users can pick what they like
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
This allows multiple STM pin groups to be used for each SPI
bus. Useful for the MS5607 sensor which signals conversion complete on
the MISO line.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Needed to support general GPIO interrupts
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This lets the cc1111 use the atomic bit operation instead of a mask,
which is immune to interrupt issues as well as being a shorter code sequence.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Will need versions for other architectures
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>
|
|
|
|
|
|
|
| |
Start now driven by interrupts
Send now done with DMA and interrupts
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Recv doesn't appear to work with more than one byte
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This does "something" in radio test mode, appearing to generate a
730MHz signal.
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>
|
|
|
|
|
|
| |
Not well tested yet...
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
DMA-based driver for the STM analog to digital converter.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Should save a bit of power.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
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>
|