Andrew Tridgell
4d171ec19a
AP_HAL_ChibiOS: support uartI, allowing a total of 9 uarts
...
this allows for OTG2 on the MatekH743 board, which makes SLCAN much
easier
4 years ago
Andrew Tridgell
46976c4358
HAL_ChibiOS: fixed remapping of ioline_t with BRD_ALT_CONFIG
...
when a peripheral is made available via BRD_ALT_CONFIG we need to
remap the existing ioline_t in the UART and I2C drivers to use the new
pin.
This fixes an issue with half-duplex, inverted, swapped UART pins for
protocols like FPort and FPort2
4 years ago
Andrew Tridgell
989f8c5d41
HAL_ChibiOS: fixed a race condition in UART DMA transmit
...
this fixes an issue seen on one board which caused a watchdog on high
uart DMA load. We have reproduced the issue on another board by
forcing a very high DMA transfer rate on the same DMA channel while
also requesting very high transfer rates on the UART. The likely race
is in the DMA transmit timeout code, and the simplest fix is to lock
out interrupts during the DMA setup to ensure the tx timeout cannot
trigger during the setup
4 years ago
Siddharth Purohit
a7d641c705
AP_HAL_ChibiOS: add available method for locked state
5 years ago
Peter Barker
6d9e563ede
AP_HAL_ChibiOS: override read(buffer,count) method to be more efficient
5 years ago
Peter Barker
8f54de4184
AP_HAL_ChibiOS: add discard_input method on UARTDriver
5 years ago
Andrew Tridgell
e8ab35a192
HAL_ChibiOS: fixed stdout in early startup bug
...
this caused a failure to boot on some boards if they tried to print
messages in early startup code before hal was initialised
thanks to @Shadowru for reporting the issue
5 years ago
Andrew Tridgell
982cff0695
AP_HAL_ChibiOS: make all semaphores recursive
...
the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
5 years ago
Andrew Tridgell
a7b83b1e26
HAL_ChibiOS: allow for unbuffered writes without DMA
5 years ago
Andrew Tridgell
bb5c1d07e1
HAL_ChibiOS: implement new UART option bits
5 years ago
Andrew Tridgell
b1ca7380be
HAL_ChibiOS: re-implement half-duplex using HDSEL switching
...
this makes half-duplex more reliable on UARTs with pullups or level
shifters
5 years ago
Andrew Tridgell
faf34970e1
HAL_ChibiOS: automatically control pullup/pulldown on inverted UARTs
...
this makes setup of sport telemetry much easier
5 years ago
Andrew Tridgell
4b4642dd4d
HAL_ChibiOS: allow handling of much higher receiver baudrates with DMA
...
this uses two DMA RX bouncebuffers to minimise the time with DMA
disabled so that we can handle much higher baudrates
5 years ago
Andrew Tridgell
58292821b3
HAL_ChibiOS: fix DMA on UARTs for F303
5 years ago
Mirko Denecke
b84dcd483d
AP_HAL_ChibiOS: remove unnecessary tabs and whitespaces
5 years ago
Andrew Tridgell
bf2cf7834d
HAL_ChibiOS: fixed a bug in parity/stop-bit setting on STM32F7 and H7
...
and add get_options() method
6 years ago
Andrew Tridgell
16bdaaa1af
HAL_ChibiOS: added support for STM31F10x for AP_Periph
6 years ago
Andrew Tridgell
0075b96f3a
HAL_ChibiOS: added uartH
6 years ago
Andrew Tridgell
8c43db1a00
HAL_ChibiOS: implement half-duplex delay and read locking
6 years ago
Andrew Tridgell
85243ad522
HAL_ChibiOS: enable support for half-duplex uart config
6 years ago
Andrew Tridgell
acf03980ca
HAL_ChibiOS: added UART inversion options
...
support GPIO pins or STM32F7
6 years ago
Peter Barker
17f643719a
AP_HAL_ChibiOS: add override keyword in many places
6 years ago
Peter Barker
d2cf065fdf
AP_HAL_ChibiOS: return uart link bandwidth
6 years ago
Andrew Tridgell
83f38d536e
HAL_ChibiOS: fixed flow control auto-detect without DMA
...
this fixes automatic flow control detection when we are not using DMA
for TX
7 years ago
Andrew Tridgell
0a5d287326
HAL_ChibiOS: support uartG
7 years ago
Andrew Tridgell
5bf078cc86
HAL_ChibiOS: fixed build with -Werror-sign-compare
7 years ago
Michael du Breuil
037e53ba8a
AP_HAL_ChibiOS: Reduce flash space of UARTDriver
...
Saves 32 bytes
7 years ago
Andrew Tridgell
8431a677d9
HAL_ChibiOS: added a timeout to DMA UART TX
...
this prevents a shared DMA channel being held for a long time if a CTS
pin is held either by not being connected or by a radio
7 years ago
Andrew Tridgell
0fade4eb9e
HAL_ChibiOS: make sure the UART bounce buffers are DMA safe
7 years ago
Andrew Tridgell
89898bae1d
HAL_ChibiOS: take account of available bytes in receive_time_constraint_us
7 years ago
Andrew Tridgell
7005383f82
HAL_ChibiOS: implement uart receive timestamp API
7 years ago
Andrew Tridgell
e4ce2f532b
HAL_ChibiOS: make smaller builds possible
...
this allows for much smaller builds when you disable a lot of
options. This is part of an effort to create a bootloader of less than
16k using ChibiOS
7 years ago
Andrew Tridgell
e448b5d069
HAL_ChibiOS: implement UART port locking
7 years ago
Andrew Tridgell
bc32276966
HAL_ChibiOS: support DShot output
...
use DMAR burst DMA to minimise number of DMA channels needed
thanks to betaflight for the great reference implementation!
7 years ago
Andrew Tridgell
a64819cbf2
HAL_ChibiOS: minimise DMA TX latency on contended UARTs
...
try to prevent long delays on other users of a DMA channel
7 years ago
Andrew Tridgell
556f3ba53f
HAL_ChibiOS: make UARTs non-blocking by default
...
we never want blocking ports any more with ArduPilot, so defaulting to
blocking makes no sense
7 years ago
Andrew Tridgell
306d35655e
HAL_ChibiOS: allow for bare board builds
...
this allows for a build with no UARTs, no SPI, no I2C, no PWM. Great
for initial board bringup with just USB
7 years ago
Andrew Tridgell
82f1f462ae
HAL_ChibiOS: ensure we don't init a uart driver twice
7 years ago
Andrew Tridgell
dce4c90467
HAL_ChibiOS: moved UART thread to UART driver
...
use an event model for triggering sends from tx complete DMA handler
for unbuffered uarts
7 years ago
Andrew Tridgell
979a2a4796
HAL_ChibiOS: removed debug code
7 years ago
Mark Whitehorn
b94b1dcd97
AP_HAL_ChibiOS: add missing declaration
7 years ago
Siddharth Purohit
02696882e9
HAL_ChibiOS: if unbuffered write, do continue to invoke DMA writes
...
adds higher latency to device sharing DMA
7 years ago
Andrew Tridgell
ad26ca4a27
HAL_ChibiOS: implement parity and stop bits controls
7 years ago
Andrew Tridgell
3f2cc2c9d6
HAL_ChibiOS: implement low latency UART writes
...
this implements the set_unbuffered_writes() API by performing writes
directly in the write() call and not from a timer
7 years ago
Andrew Tridgell
865e4f3104
HAL_ChibiOS: implement _timer_tick in UARTDriver
7 years ago
Andrew Tridgell
f14a847b97
HAL_ChibiOS: rename classes to remove 'Chibi'
...
it is redundent as all classes are in ChibiOS namespace, and makes the
code harder to read
7 years ago
Andrew Tridgell
41be81af34
HAL_Chibios: added hardware flow control for UARTs
...
implement RTS in software and CTS in hardware
7 years ago
Andrew Tridgell
8b6bab7b17
HAL_Chibios: added ChibiOS HAL
...
this is based on initial work by Sid, reset here for easier merging
7 years ago