| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
Make sure AO_TICK_TYPE is used "everywhere", instead of uint16_t or other.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Support -Wcast-align and -Wpointer-arith while still allowing
architectures to pick whether they want an 8-bit or 32-bit stack.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Support -Wstrict-prototypes
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Remove address parameter (doesn't work with gcc), create shared
ao_romconfig in kernel.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Stop using pdclib
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
No need requiring it to be uint16_t
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
If you've got a complicated LED pin arrangement, you can ask for each
one to be configured separately, instead of using groups in a couple
of GPIO registers. The code isn't as efficient this way, but at least
it's easy to read.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows for high priority interrupts (priority 0) to run, even
when other interrupts are blocked. Code executing in such interrupt
handlers must not attempt to control task execution as that will race
with the scheduler.
Select this by defining AO_NONMASK_INTERRUPT in ao_pins.h.
non-maskable interrupt priority is AO_STM_NVIC_NONMASK_PRIORITY
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
Because the STM32L only offers 16 priority levels, the bottom four
bits of each priority mask are not used. All of the interrupt priority
settings in the system were using values < 16, making them all
effectively the same. Fix that by moving them into the upper 4 bits
and using symbolic constants everywhere.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
While 512 bytes is a reasonable size, sometimes apps don't have that
much stack space.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Flash is at 0x08000000, but when the chip boots, it can be at 0x0 as
well. Use the 0x08000000 address when rebooting to flash
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This makes APRS more usable when you mute the RF audio on the HT.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Adds new telemetry and logging formats along with code for TeleMetrum
v2.0 design.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Split the flash loader prototype into pieces so that each product can
build a custom flash loader with very little code.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Allows that value to change
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Includes the boot chain stuff
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
It's probably more power efficient than using one of the timers, and
it's certainly easier to configure.
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sdcc offers __critical as a machine-independent way to block
interrupts, but as gcc doesn't, we need to use a compiler-independent
construct instead. ao_arch_critical has been around since the AVR
port, but some old __critical usages remained.
This fixes a bunch of random hangs when communicating with MM over USB
or the radio as the various stdio loops were running without
interrupts blocked between the test and the sleep.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Add sample-based profiling, using a 1kHz timer
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Useful when doing time comparisons.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
512 bytes should be enough for anybody.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Just like cc1111, stick the serial number and radio calibration values
at known fixed addresses so that when re-flashing the board, we can go
find the existing values.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
512 seems cozy given the printf implementation we're using and the
extensive interrupts.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Uses the AIRCR register to force a reset
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
DMA-based driver for the STM analog to digital converter.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This stubs out enough stuff to let ao_config link and work
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This also adds the alternate pin configurations for the other two
usarts
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
It's all very specific to the 14-segment display, so
stick it there.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This enables the 6-digit 14-character display on the STM32L discovery
board and provides an ascii output to it.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This preserves the interrupt-enabled bit across context switches
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This gets stm-demo working
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This runs AltOS and talks over the serial port.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
The stm-bringup doesn't run altos, it just initializes the device and
writes stuff over a serial port. Works on the STM32L Discovery board
at least, should do stuff on other boards too.
Signed-off-by: Keith Packard <keithp@keithp.com>
|