| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
With ao_packet_getchar returning 'char', AO_READ_AGAIN would get
converted to 0xff instead of -1 on return, making ao_packet_echo
either produce a bogus character on output, breaking command
responses, or wedge and never exit when the link was dropped.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Allow enabling telemetry when USB is connected without also enabling
the motion debugging output.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
There are just too many limitations in when interrupts are delivered
to make them useful. Instead, just drive the SPI directly with the
CPU. At higher spi speeds (6Mhz or more), it's probably faster to do
it this way anyways.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
The datasheet says that the maximum for back-to-back data is 6.5MHz.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
This allocates twice the space in the USB memory so that transactions
can be double buffered without using separate CPU memory.
Signed-off-by: Keith Packard <keithp@keithp.com>
Conflicts:
src/lpc/ao_usb_lpc.c
|
|
|
|
|
|
|
|
|
| |
The USB device endpoints can have two pointers in them, but we use
only the first. Fix the access functions to take an index as to which
we want so that we can disable the other address registers with them
instead of requiring open-coded access.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Reverting the USB double buffering means using more RAM, need to
shrink the EasyMini stack to accomodate that.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
The old USB code had static in/out buffers in ram
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
There's something screwy going on, sticking garbage in the input
buffer at boot time
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
This reverts commit 41a0604ad1ea1a03e2db7d41731dbadf466b45db.
|
|
|
|
|
|
| |
No hardware changes from the 1.9 prototypes to the 3.0 final version.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
CC1200 uses a different xtal than CC1120, so the default calibration
needs to change. This value hit 434.550 on SN 2407, so it seems like a
reasonable place to start.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Will be useful to actually be able to receive telemetry
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Small pin-count versions of the STMF0 can remap PA11/PA12 on the same
pins as PA9/PA10. These are used by USB, so have the USB driver deal
with remapping them.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This lets the user know the device successfully initialized.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Make sure the BTM module is allowed to be included in stdio, but delay
adding that until the BT link is running.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
For some reason, the check for running out of space to record stdio
devices was disabled when only one device was expected.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Adds an interactive debugging mode to help diagnose BTM issues.
Discovered that the serial reset pin on the BTM needs to be pulled low
for the device to work correctly.
Leave the bt link interrupt disabled until things are initialized.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Bluetooth needs to delay adding the serial port to stdio until the
link is up and running. The cc1111 serial driver had
DELAY_SERIAL_*_STDIN bits which have been added to the STM serial driver.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
git doesn't warn about files named 'Makefile' because they're supposed
to be generated...
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This creates a ring buffer for ADC data so that ADC fetching can run
in parallel with other activities.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Switch from software to hardware for CRC computation. I think this
must be faster, right?
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Sets up the stm32f0 CRC hardware, exposing inline functions to access
it. DMA access is possible, but usbtrng can't use that.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
These were left over from the stm32f0 initial implementation work; now
it's more useful to list only the bits which are valid.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This crept in while working on the stmf0 bits. oops.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Read chunks of random ADC data, do some CRC16 computations to de-bias
and merge 4 bytes of input data into 2 bytes of output data, then dump
that out over USB.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
The ADC api is what USBtrng wants; a way to repeatedly read a single
ADC input as fast as possible.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
This adds a way to allocate private USB buffers for sending data
without needing to copy it again. It requires ensuring that all
accesses are 16 bits aligned to 16 bit boundaries.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
The flash loader ended up assuming ao_boot was at the start of ram,
while the application stuck it after the interrupt table (where it
needs to go).
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This waits forever for USB writes to complete, instead of timing out
after five seconds. Useful when debugging the device.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Uses the new STM32F042 flash loading bits.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Also moves the usual address for applications out of the way of the
flash loader.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Gets the USB connection running and blinks the LEDs.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Basic clock configuration, OS support, LED and USB drivers.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Add support to the BTM driver for non-CC1111 interrupts
Add HW flow control to STM serial driver
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
These got merged when we were down in Auckland, but before they'd been
finished. Transmitting worked fine, but receiving was mis-configuring
the OUT buffer size in the hardware.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
I was debugging the accelerometer calibration code and left some
printfs in it, which made TM run out of flash space.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
|
|
|
|
|
|
|
| |
This improves performance for SPI transfers, while allowing other
tasks to get work done during longer SPI transfers.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
On the test setup, we were about 13dB off, so tweak the settings to
suit. This result wasn't tested; it's just a rough offset until we get
a production run of TeleDongle boards back to do more systematic
measurements.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
We built a custom TeleGPS load for radio sensitivity measurements with
the lowest documented power level setting (0x03), and measured the
power out at that value of -31.75dBm on the test board.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
Because we're allowing even signals only weakly correlated with the
preamble through to sync detection, we can't use the PQT_REACHED
symbol to tell when a packet header has been seen. Instead, just look
for SYNC_FOUND.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Increase soft decision PQT value to max (15) to ensure that we detect
even weak packets.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the receive code to use MCU_STATUS, waiting for
MARC_STATUS1 to indicate that the packet is in the fifo before reading
it out.
It also fixes the receive timeout code to keep receiving if the
preamble or sync have been seen when the timeout fires. This makes
TeleLCO able to use short timeouts during scanning while still
successfully receiving packets.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Remove RSSI LED blinking, add CRC error LED
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Robert Braibish's board has a dead MPU6000; this fix lets the TeleMega
firmware build without that driver so the rest of the board could be verified.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
|
|
|
|
|
|
|
| |
Failing to reset the flags set during interrupt leads to
short-circuiting transmission and not a lot of packets going out.
Signed-off-by: Keith Packard <keithp@keithp.com>
|