Andrew Tridgell
f17178ace0
HAL_ChibiOS: fixed build of SPI clock test
5 years ago
Andrew Tridgell
d8445928d1
HAL_ChibiOS: fixed SPI timeout bug
...
thanks to CUAV for noticing
5 years ago
Mirko Denecke
b84dcd483d
AP_HAL_ChibiOS: remove unnecessary tabs and whitespaces
5 years ago
Andrew Tridgell
59678840a8
HAL_ChibiOS: log SPI and I2C counters
6 years ago
Andrew Tridgell
ce9b75fdf0
HAL_ChibiOS: added timeouts on all SPI transfers
...
this is never expected to trigger unless we have a severe MCU error as
SPI transfers don't rely on a response from a device.
The only case that we could get a timeout is when a bug leads to use
doing transfers from memory that does not support the DMA
transaction (such as on H7). This change turns that from a immediately
fatal lockup into a bus error and failed sensor
6 years ago
Andrew Tridgell
63895d8b0c
HAL_ChibiOS: setup dummy pointers for H7 SPI
6 years ago
Andrew Tridgell
1414988870
HAL_ChibiOS: use spiSend/spiReceive
...
this fixes an issue with microSD on F405.
6 years ago
Andrew Tridgell
a7c91d1cb4
HAL_ChibiOS: show all SPI clocks
6 years ago
Andrew Tridgell
807d9e4b92
HAL_ChibiOS: added optional polled SPI mode
6 years ago
Andrew Tridgell
a3e69e715d
HAL_ChibiOS: avoid doing one-way SPI transfers
...
these transfers use dummy bytes in the hal driver, which may not be in
DMA safe memory, so best to avoid them
6 years ago
Andrew Tridgell
7c61d66d75
HAL_ChibiOS: fixed SPI clocks on H7
6 years ago
Andrew Tridgell
4c7fa7c6fb
HAL_ChibiOS: make SPI clock test non-blocking
6 years ago
Andrew Tridgell
d9c888ab45
HAL_ChibiOS: port SPI, I2C and UART drivers to H7
6 years ago
Andrew Tridgell
24f6d6d647
HAL_ChibiOS: support microSD slowdown
...
allow use of BRD_SD_SLOWDOWN to slow down clock on microSD
6 years ago
Randy Mackay
8b963e7b92
AP_HAL_ChibiOS: remove debug print when SPI device not found
6 years ago
Lucas De Marchi
668c941717
Global: use new version of ARRAY_SIZE
7 years ago
Andrew Tridgell
5bf078cc86
HAL_ChibiOS: fixed build with -Werror-sign-compare
7 years ago
Andrew Tridgell
a945c97ec6
HAL_ChibiOS: fixed 3-way DMA sharing bug
...
when we have 3 way contention across two DMA streams we could get the
dma_deallocate function called in an object from two places at
once. This adds a mutex that prevents that scenario
7 years ago
Andrew Tridgell
2493cdbcb6
HAL_ChibiOS: switch to new bouncebuffer system
...
this removes the dma_flush and dma_invalidate methods and uses a
common bouncebuffer system for all CPU types. This enables microSD
support on STM32F7
7 years ago
Andrew Tridgell
edb831653f
HAL_ChibiOS: added dma_flush and dma_invalidate operations
...
these are needed to manage the data cache on the STM32F7
7 years ago
Andrew Tridgell
eca634ec62
HAL_ChibiOS: support 6 SPI buses
7 years ago
Andrew Tridgell
86ded2c40c
HAL_ChibiOS: cleanup sdcard API usage
7 years ago
Andrew Tridgell
52c8d3ed9f
HAL_ChibiOS: fixed SPI select error
...
changes by sdcard PR
7 years ago
Alexander Malishev
6b15b2f44f
HAL_ChibiOS: Enable sdcard on spi bus
7 years ago
mirkix
79f3fd532b
AP_HAL_ChibiOS: fix spi clock calculation
7 years ago
Andrew Tridgell
01e9c55721
HAL_ChibiOS: fixed SPI bus speed on SPI3
...
and add optional bootup test of SPI bus speeds to help with porting to
new MCUs
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
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
9301e4888a
HAL_ChibiOS: make not having bus lock a soft error
...
this is nicer for driver developers
7 years ago
Andrew Tridgell
f1ce321a2f
HAL_ChibiOS: added checking of bus owner
...
this ensures all bus transfers are only done by the thread that owns
the semaphore
7 years ago
Andrew Tridgell
63a825dd2c
HAL_ChibiOS: don't call spiStart() unless bus is stopped
7 years ago
Andrew Tridgell
e29b79f41b
HAL_ChibiOS: fixed DMA allocation bug on SPI
...
thanks to Mark Whitehorn for finding this crash
7 years ago
Andrew Tridgell
f5c8754d75
HAL_ChibiOS: use ARRAY_SIZE_SIMPLE
...
this allows for boards without a device type (eg. no SPI bus)
7 years ago
Andrew Tridgell
58796ff435
HAL_Chibios: moved SPI device tables to hwdef.dat
7 years ago
Andrew Tridgell
d1f93cd66c
HAL_Chibios: auto-generate I2C, SPI and UART device lists
...
this is less error prone and make a port faster as more information is
in hwdef.dat
7 years ago
Andrew Tridgell
280140bf25
HAL_ChibiOS: added support for MindPX-v2
7 years ago
Andrew Tridgell
9f5e01d20a
HAL_Chibios: fixed FMUv4 compasses
7 years ago
Andrew Tridgell
c3435e45c5
HAL_ChibiOS: initial port to FMUv4
7 years ago
bugobliterator
5feef04f5f
HAL_ChibiOS: add support for CCM memory
...
this uses DMA bounce buffers for bus transfers, and falls back to CCM
ram in allocations if the type is unspecified
7 years ago
Andrew Tridgell
791edee0ff
HAL_Chibios: added more SPI devices for FMUv3
7 years ago
Andrew Tridgell
755eca31c2
HAL_Chibios: don't unregister shared DMA
...
the shared DMA handle is a property of the bus, not the device, so
should not be unregistered when the device is removed
7 years ago
Andrew Tridgell
7971f03bde
Hal_Chibios: fixed F412 SPI config
7 years ago
Andrew Tridgell
c742543565
HAL_Chibios: align SPI device IDs with px4 IDs
...
this makes for easier update to ChibiOS without redoing accelcal
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