Commit Graph

455 Commits

Author SHA1 Message Date
Siddharth Purohit 6e81fcbed1 AP_HAL_ChibiOS: add support for things required to run QSPIDriver 2021-09-01 17:10:53 +10:00
Andrew Tridgell 39f44147b8 HAL_ChibiOS: reduce the impact of UART DMA contention
this changes the heuristics for UART TX DMA allocation to greatly
reduce the chances of DMA contention causing long delays on other
devices

This fixes issues with FETTec driver output and gimbal status messages
as reported by Amilcar and OlliW. The problem is particularly bad when
no GPS is connected to GPS1 on fmuv3 and derived boards (such as
CubeBlack)

key changes:

 - remember the contention_counter across begin() calls, as the GPS
   calls begin with new baudrates regularly

 - added a is_shared() API to Shared_DMA, allowing the UART driver to
   avoid TX DMA on shared streams when at low baudrates.
2021-08-31 07:55:27 +10:00
Marek Łukasiewicz 5de6c690d8 HAL_ChibiOS: Rename STM32F412 hw definition file 2021-08-30 10:27:45 +10:00
bugobliterator a32a32ab43 HAL_ChibiOS: change name for USART2_CTS pin in STM32H757xx.py 2021-08-25 10:09:23 +10:00
Andrew Tridgell 4cebcede31 HAL_ChibiOS: switched to fix allocation for BMDA streams on H7
this avoids issues with BDMA stream assignments due to bugs found
while testing boards with both I2C4 and SPI6
2021-08-25 07:11:31 +10:00
Andrew Tridgell 57e87b9820 HAL_ChibiOS: measure MCU temperature and ref voltage on H7
this uses ADC3 to measure the internal MCU temperature and the reference
voltage. This uses a currently unused BDMA channel
2021-08-25 07:11:31 +10:00
Andrew Tridgell 8df99f0d15 HAL_ChibiOS: added G431 and G441 support 2021-08-03 10:54:03 +10:00
Andrew Tridgell 4fce1ae092 HAL_ChibiOS: added G491 support 2021-07-30 10:20:52 +10:00
bugobliterator d1b0438412 AP_HAL_ChibiOS: add support for usb passthrough with baud changes 2021-07-21 17:06:41 +10:00
Andrew Tridgell 4f32fa537a HAL_ChibiOS: define HAL_HAVE_HARDWARE_DOUBLE on F765, F777 and H7 2021-07-10 07:20:41 +10:00
Andrew Tridgell 6c712c9001 HAL_ChibiOS: use SRAM1 as first ram segment on H7
this is needed to give the linker more than 128k for static variables
with double precision maths.
2021-07-10 07:20:41 +10:00
Siddharth Purohit 9b2359b34c AP_HAL_ChibiOS: allow option to enable ChibiOS features in bootloader 2021-07-02 08:50:16 +10:00
Andrew Tridgell b4b02b4ffc HAL_ChibiOS: use nargs='+' for chibios_hwdef.py 2021-07-01 09:33:16 +10:00
willpiper ce1ee6334f AP_HAL_ChibiOS: addressed reviewed comments 2021-07-01 09:33:16 +10:00
willpiper fb4a4e609a AP_HAL_ChibiOS: added --extra-hwdef option 2021-07-01 09:33:16 +10:00
Siddharth Purohit c962292bae AP_HAL_ChibiOS: add support for H757I Evaluation board 2021-06-30 19:33:17 +10:00
Siddharth Purohit abc26d1993 AP_HAL_ChibiOS: add QSPI Device Driver in HAL 2021-06-30 19:33:17 +10:00
Siddharth Purohit 4cb48da984 modules: update ChibiOS 2021-06-30 19:33:17 +10:00
bugobliterator 7e8f11b749 AP_HAL_ChibiOS: allow embedded bootloader to be excluded
Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
2021-06-24 08:36:30 +10:00
Peter Barker 3ba57fed89 AP_HAL_ChibiOS: add support for AP_Logger into AP_Periph 2021-06-08 09:57:55 +10:00
Andrew Tridgell c34d8e80e9 HAL_ChibiOS: fixed serial info indexing for EMPTY uarts 2021-06-05 18:52:33 +10:00
Andrew Tridgell 23c0f257b6 HAL_ChibiOS: default off serial protocols in AP_Periph
this allows for a GPS on high numbered ports
2021-06-01 09:19:51 +10:00
Andrew Tridgell fced5271af HAL_ChibiOS: expand pin map of G474 to cover 64 pin parts 2021-05-25 09:35:25 +10:00
Andrew Tridgell ebe858f762 HAL_ChibiOS: auto-set HAL_LOGGING_ENABLED for AP_Periph builds 2021-05-19 17:38:47 +10:00
Andrew Tridgell 6b9e4161cb HAL_ChibiOS: removed UDID_START from all MCU defs
use UID_BASE from ChibiOS headers
2021-05-09 06:44:19 +10:00
Andrew Tridgell 36d5c98e96 HAL_ChibiOS: default UDID_START to UID_BASE 2021-05-09 06:44:19 +10:00
Andrew Tridgell 03cae60471 HAL_ChibiOS: added STM32F732 support 2021-05-09 06:44:19 +10:00
Andrew Tridgell 61c829d624 HAL_ChibiOS: only use SRAM4 for DMA for now
we can enable others when we have an allocation interface that
specifies the peripheral type
2021-04-07 17:10:45 +10:00
Iampete1 2377d33417 AP_HAL_ChibiOS: H7 set SRAM4 to no cache and allow DMA 2021-04-07 17:10:45 +10:00
Andrew Tridgell ffb2876f58 HAL_ChibiOS: disable unused ChibiOS features 2021-03-23 12:01:20 +11:00
Andrew Tridgell ff31e10d9e HAL_ChibiOS: ensure that RCIN DMA channel is not shared
RCIN DMA cannot be shared as it runs all the time
2021-03-23 12:01:20 +11:00
Andrew Tridgell 2842730868 HAL_ChibiOS: fixed F3 CAN build 2021-03-23 12:01:20 +11:00
Andrew Tridgell ac9e6ba86d HAL_ChibiOS: fix label for CCM on G4 2021-03-23 12:01:20 +11:00
Andrew Tridgell f57b1b9c4b HAL_ChibiOS: support logical/physical CAN bus mapping
allow for first CAN interface to be CAN2 or CAN3
2021-03-23 12:01:20 +11:00
Andrew Tridgell 2f7ff778be HAL_ChibiOS: fixed bug in DMA resolver
idsets can be empty for a peripheral
2021-03-23 12:01:20 +11:00
Andrew Tridgell 439a944801 HAL_ChibiOS: added support for STM32G474 MCU 2021-03-23 12:01:20 +11:00
Andy Piper e1d71486e4 AP_HAL_ChibiOS: build fixes for ChibiOS 20.3.x 2021-03-23 12:01:20 +11:00
Andrew Tridgell 4fbdb59398 HAL_ChibiOS: prevent sharing the same DMA stream on TIMn_UP channels
this avoids an issue with DShot where we run the same DMA stream on
two timers at once
2021-03-02 11:58:38 +11:00
Andy Piper 6cb263056d AP_HAL_ChibiOS: build fix for iomcu 2021-03-02 11:58:38 +11:00
Andy Piper d0e4d510cf AP_HAL_ChibiOS: order PWM timers by DMA UP stream id to prevent deadlocks in dshot 2021-03-02 11:58:38 +11:00
Andy Piper f9c5f9be00 AP_HAL_ChibiOS: make dshot DMA unlock event driven in order to allow unlocking from rcout thread
refactor rcout into separate thread and process all dshot requests there
move uart DMA completion to event model
process dshot locks in strick reverse order when unlocking
convert Shared_DMA to use mutexes
move UART transmit to a thread-per-uart
do blocking UART DMA transactions
do blocking dshot DMA transactions
trim stack sizes
cancel dma transactions on dshot when timeout occurs
support contention stats on blocking locking
move thread supression into chibios_hwdef.py
invalidate DMA bounce buffer correctly
separate UART initialisation into two halves
cleanup UART transaction timeouts
add @SYS/uarts.txt
move half-duplex handling to TX thread
correct thread statistics after use of ExpandingString
set unbuffered TX thread priority owner + 1
correctly unlock serial_led_send()
don't share IMU RX on KakuteF7Mini
observe dshot pulse time more accurately.
set TRBUFF bit for UART DMA transfers
deal with UART DMA timeouts correctly
don't deadlock on reverse ordered DMA locks
change PORT_INT_REQUIRED_STACK to 128
2021-02-20 14:37:11 +11:00
Andrew Tridgell 9de1519928 HAL_ChibiOS: prevent hw flow control from hogging a DMA channel
When hw flow control is enabled check the CTS pin before we grab the
DMA channel to prevent a long timeout trying to send to a blocked port
from holding a DMA channel against another device

this fixes issue #16587
2021-02-15 07:23:56 +11:00
Andy Piper 2cdc202d19 AP_HAL_ChibiOS: use non-cachable SRAM3 for DMA on H743
Adjust SRAM1+SRAM2 to 256k as describe in the H743 reference manual
Provide access to mem_info() information

Co-authored-by: Andrew Tridgell <andrew@tridgell.net>
2021-02-03 23:35:44 +11:00
Andy Piper 06a1500f98 AP_HAL_ChibiOS: ensure GPIO pins get undef'ed properly
minimise bi-directional dshot configs for:

CubeOrange
Durandal
MatekF405
MatekH743
OmnibusNanoV6
Pixracer
mRoPixracerPro
omnibusf4pro
CUAV-X7
2021-02-03 18:49:06 +11:00
bugobliterator c02c546077 AP_HAL_ChibiOS: add support for inline comments in hwdef.dat 2021-01-18 09:37:11 +11:00
bugobliterator 41693403e2 AP_HAL_ChibiOS: retain memory of past conflicts in dma_resolver 2021-01-18 09:37:11 +11:00
bugobliterator 4346264113 AP_HAL_ChibiOS: ensure UP and CH timer channels share DMA for H7 2021-01-12 10:45:03 +11:00
Andrew Tridgell afbdd69165 AP_HAL_ChibiOS: adjust stack sizes 2021-01-10 08:28:55 +11:00
Andy Piper 8fb403c569 AP_HAL_ChibiOS: make sure BDMA channels are not adjacent 2021-01-10 08:11:37 +11:00
Andy Piper 401e5c2073 AP_HAL_ChibiOS: add support for bidir DShot support in RCOutput
add support for sampling GPIO pins using timer
don't restart pwm group when not doing bi-dir
fix hwdef generation preproc for TIM DMA
decode telemetry at the start of the dshot cycle
calculate dshot pulse separation correctly and ensure we output rapidly enough
calculate dshot min periods and timeouts correctly
refactor dshot_send() into dshot_send_groups()
use bi-dir dshot channel mask
selectively enable bi-dir RC Channels
process bi-dir mask correctly when allocating DMA channels
allow UP and CH DMA channel sharing
optionally enable bidir vars in hwdef.

enable bi-dir dshot in KakuteF7Mini
enable bi-dir dshot in OmnibusF4Pro
enable bi-dir dshot in OmnibusNanoV6
enable bi-dir dshot in MatekF405
enable bi-dir dshot in fmuv5
enable bi-dir dshot in fmuv3
enable bi-dir dshot in OmnibusF7V2
enable bi-dir dshot in OmnibusNanoV6
enable bi-dir dshot in CubeOrange
enable bi-dir dshot in Pixracer
enable bi-dir dshot in mRoPixracerPro

Co-authored-by: bugobliterator <siddharthbharatpurohit@gmail.com>
2020-12-30 19:14:16 +11:00
Andy Piper 83c8807b39 AP_HAL_ChibiOS: when HAL_ENABLE_THREAD_STATISTICS is defined add ChibiOS thread stats to threads.txt
define HAL_ENABLE_THREAD_STATISTICS in hwdef.h
2020-12-30 18:15:05 +11:00
Phillip Kocmoud 062c6cef41 HAL_ChibiOS: Fix typo relating to pin PB7:I2C4_SDA 2020-12-23 06:43:19 +11:00
Tom Pittenger da74d755d0 AP_HAL_ChibiOS: add new HAL_PWM_COUNT define 2020-12-21 18:27:07 -08:00
Andrew Tridgell b4de6fb56a HAL_ChibiOS: added new option DEFAULTGPIO for hwdef.dat
this allows ESD issues to be avoided by pulling all unused pins low
2020-12-08 11:21:57 +11:00
Andrew Tridgell f44e4aaefb HAL_ChibiOS: always set STM32_DMA_REQUIRED for non-bootloader
this fixes an issue for uart-only AP_Periph builds
2020-12-08 10:27:27 +11:00
Tom Pittenger e235fd311e AP_HAL_ChibiOS: fixed comment in script file 2020-12-03 20:33:51 +11:00
Andrew Tridgell c778d14fd3 HAL_ChibiOS: enable stack checking on f303 boards 2020-12-01 11:14:50 +11:00
Andrew Tridgell 573cd6db6d HAL_ChibiOS: adjust MAIN_STACK for more ISR stack
we need more stack to deal with interrupt nesting between CAN, system
timer and serial interrupts
2020-12-01 11:14:50 +11:00
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
2020-11-30 14:09:31 +11:00
Marek Łukasiewicz 64f208cbec HAL_ChibiOS: Add af_parse for CubeMX pinout csv 2020-11-18 18:39:07 +11:00
Marek Łukasiewicz 8813057b4c AP_HAL_ChibiOS: Tweak sorting to be py2/py3 compatible 2020-11-12 10:27:31 +11:00
Andrew Tridgell 17b4198921 HAL_ChibiOS: add WITH_FATFS to environment 2020-11-10 16:15:45 +11:00
Andrew Tridgell bb3b59966f HAL_ChibiOS: define INS_MAX_INSTANCES if less than 3
save some flash and memory
2020-11-10 16:15:45 +11:00
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
2020-10-28 19:51:45 +11:00
Andrew Tridgell 702a3926f8 HAL_ChibiOS: setup defines for more flow control pins
allow all uarts to have flow control
2020-10-03 20:22:56 +10:00
Andrew Tridgell 4b747430e1 HAL_ChibiOS: save 2k in f103 bootloader
don't include serial bl support if dev list is empty
2020-09-24 12:32:19 +10:00
Siddharth Purohit a79efaeb1d AP_HAL_ChibiOS: hwdef: add support for HAL CANIface based bootloader 2020-09-24 12:32:19 +10:00
Siddharth Purohit 882c86c394 AP_HAL_ChibiOS: add app start offset to leave space for params 2020-09-24 12:32:19 +10:00
Siddharth Purohit 62df67a4b8 HAL_ChibiOS: hwdef: modify to use HAL CAN driver instead of ChibiOS's 2020-09-24 12:32:19 +10:00
Andrew Tridgell 1ffbbb2896 HAL_ChibiOS: added FLASH_TOTAL to environment 2020-09-10 07:41:25 +10:00
Andrew Tridgell 491e82159c HAL_ChibiOS: add HAL_WITH_SPI_xx defines for SPI devices
this allows us to avoid building drivers for SPI devices we don't
have, such as OSD
2020-09-02 05:56:46 +10:00
Siddharth Purohit 8dcb973dad HAL_ChibiOS: fix SWD config in f3 boards 2020-08-20 19:08:14 +10:00
Siddharth Purohit cdf8e369f1 AP_HAL_ChibiOS: create UAVCAN agnostic CANIface driver
HAL_ChibiOS
2020-08-19 17:31:09 +10:00
Andrew Tridgell 20b2396646 HAL_ChibiOS: fixed bug in undef of pins
revert pin to initial state on undef
2020-06-30 14:28:30 +10:00
Andrew Tridgell 61d036acf3 HAL_ChibiOS: added build time check for right system clock
this helps prevent cases where we underclock a chip due to mistake in
headers or hwdef.dat
2020-05-10 15:09:28 +10:00
Andrew Tridgell 2c26807736 HAL_ChibiOS: embed hwdef.dat in ROMFS for all boards 2020-04-29 07:36:55 +10:00
Andrew Tridgell 6bacf021c8 HAL_ChibiOS: disable thread_info in AP_Periph and bootloader 2020-04-29 07:36:55 +10:00
Andrew Tridgell ea71b72c87 HAL_ChibiOS: fixed issue with I2C4 on H743
when both I2C4 and SPI4 are active on a H743 I found that some BDMA
completion interrupts were lost, which resulted in SPI transfer
timeouts. Close inspection of the ChibiOS BDMA, I2Cv3 and SPIv3
drivers did not reveal any issues, but I found that the issue only
happened when the first 4 BDMA streams were used. This change splits
the 4 streams across the first and 2nd half of the BDMA controller,
and that fixes the problem.

This works as there are only 2 peripherals (I2C4 and SPI6) that want
to use BDMA with our current setup. If we ever wish to enable ADC3
(which also uses BDMA) we will need to revisit this issue
2020-04-28 17:42:15 +10:00
Andrew Tridgell a52070d226 HAL_ChibiOS: use SERIAL_ORDER instead of UART_ORDER
SERIAL_ORDER is much easier for developers to understand as it maps
directly to the SERIALn_ parameters
2020-04-28 10:32:23 +10:00
Andrew Tridgell 82c45f6cdb HAL_ChibiOS: default STM32_VDD to 3.3V 2020-04-28 10:32:23 +10:00
Andrew Tridgell 2165fd66f1 HAL_ChibiOS: define FLASH_RESERVE_END_KB 2020-04-14 10:02:51 +10:00
bugobliterator ef91f1634b HAL_ChibiOS: add support for adding board validation test 2020-04-10 07:04:21 +10:00
Andrew Tridgell e0957c2bcc HAL_ChibiOS: include hwdef.dat in ROMFS
this allows download via ftp
2020-03-28 15:28:03 +11:00
Andrew Tridgell ea57b7b3cd HAL_ChibiOS: embed ROMFS files from hwdef directory
this allows for a scripts/ directory under hwdef board directory to
embed lua scripts
2020-03-28 15:28:03 +11:00
Andy Piper 3d0cf7e12a AP_HAL_ChibiOS: hardware M4-Cortex and M7-Cortex (and H7) implementation of HAL FFT abstraction
implements an FFT engine based on the betaflight feature using ARM hardware accelerated CMSIS library
make the FFT feature optional
add dynamic gyro windows
add quinns and candans estimators and record in DSP state
disable DSP for boards with limited flash
calculate power spectrum rather than amplitude
start/analyse version of analysis to support threading
allocate memory in a specific region
constrain window size by CPU class
control inclusion of DSP based on board size
2020-02-22 11:15:37 +11:00
Matt Lawrence e6f32f4572 AP_HAL_ChibiOS: Fix waf --default-parameters
If a defaults.parm file was present in the hwdef, waf ignored the --default-parameters=xyz.parm command line argument.  This will allow it to use that command line argument specified file.
2020-02-11 11:00:01 +11:00
Andrew Tridgell 7a812a5516 HAL_ChibiOS: use cortex m7 instructions on F7/H7 2020-01-25 08:50:09 +11:00
Andrew Tridgell 320a703afc HAL_ChibiOS: fixed UART DMA config for ALT() pins 2020-01-19 07:24:57 +11:00
Andrew Tridgell f7a65afa67 HAL_ChibiOS: allow for baro with no arguments 2020-01-18 17:00:44 +11:00
Andrew Tridgell 43172bdd57 HAL_ChibiOS: switch non-composite USB ID
use newly allocated 0x1209/0x5740
2020-01-06 11:43:15 +11:00
Andrew Tridgell 793b867706 HAL_ChibiOS: switched to new USB VID for dual-CDC boards 2020-01-06 09:55:26 +11:00
Andrew Tridgell ab0f1a8887 HAL_ChibiOS: added max uarts check 2020-01-03 17:32:23 +11:00
Andrew Tridgell 296a4cb086 HAL_ChibiOS: re-format and fix chibios_hwdef.py for flake8 2020-01-02 09:52:57 +11:00
Andrew Tridgell 9c2b5a05bd HAL_ChibiOS: fixed python3 error 2020-01-02 09:52:57 +11:00
Andrew Tridgell c5df48faa7 HAL_ChibiOS: break out make_line() for PAL_LINE defines 2020-01-02 09:52:57 +11:00
Andrew Tridgell 66dd5925cf HAL_ChibiOS: added support for alternative pin configs 2020-01-02 09:52:57 +11:00
Andrew Tridgell a30e637484 HAL_ChibiOS: fixed bug in UART pin assignment
this fixes an issue with the setting of pullup/pulldown on UARTs. It
also adds enforcement of DMA assignment for DMA required peripherals
2020-01-02 09:52:57 +11:00
Andrew Tridgell faf34970e1 HAL_ChibiOS: automatically control pullup/pulldown on inverted UARTs
this makes setup of sport telemetry much easier
2020-01-02 09:52:57 +11:00
CUAVcaijie 2df2e5c275 HAL_ChibiOS: Fix DMA of SPI1 TX on STM32F412 2019-12-26 15:50:18 +11:00
Andrew Tridgell 58292821b3 HAL_ChibiOS: fix DMA on UARTs for F303 2019-12-26 10:42:48 +11:00
Andrew Tridgell 652d137594 HAL_ChibiOS: fixed DMA channels for f3 USART2 2019-12-26 10:42:48 +11:00
Andrew Tridgell 6eb86c6cdb HAL_ChibiOS: removed PB1 and PB0 TIM1 complementary channels for F76x
these do not work, possibly a datasheet bug
2019-12-23 21:46:57 +11:00
Andrew Tridgell 1248519b11 HAL_ChibiOS: account for empty uarts in uart count
this fixes uart count on MatekF405-Wing
2019-12-22 08:27:17 +11:00
Andrew Tridgell fc867b1596 HAL_ChibiOS: automatically set AP_FEATURE_SBUS_OUT 2019-12-18 17:18:44 +11:00
Andrew Tridgell b3459c024c HAL_ChibiOS: automatically set AP_FEATURE_RTSCTS 2019-12-18 17:18:44 +11:00
Andrew Tridgell 4745c9f78d HAL_ChibiOS: setup define for number of serial ports 2019-11-19 07:13:20 +08:00
Andrew Tridgell bc1de7a208 HAL_ChibiOS: support STM32F3xx MCUs 2019-11-01 10:53:53 +11:00
Andrew Tridgell 8f14ea9e80 HAL_ChibiOS: enable advanced timers if we have any N PWM channels 2019-10-29 13:09:14 +11:00
Andrew Tridgell 49e669aa1f HAL_ChibiOS: support uncompressed bootloader on f103-periph
this allows update with very low memory
2019-10-24 22:03:43 +11:00
Andrew Tridgell 0a4576728e HAL_ChibiOS: support a app->bootloader comms region in SRAM
this allows for UAVCAN update without a 2nd BeginFirmwareUpdate call
2019-10-21 19:12:01 +11:00
Andrew Tridgell 44f895ab16 HAL_ChibiOS: fixed for ZubaxGNSS build 2019-10-21 19:12:01 +11:00
Andrew Tridgell e90bd27435 HAL_ChibiOS: fixed I2C on F103
we need to use open-drain, and the sign of the constant matters
2019-10-20 20:31:02 +11:00
Andrew Tridgell 47f2f1764d HAL_ChibiOS: generate HAL_MEMORY_TOTAL_KB for each board 2019-10-01 09:29:55 +10:00
Andrew Tridgell 850892c3d9 HAL_ChibiOS: fixes from LGTM errors 2019-09-22 18:35:15 +10:00
Andrew Tridgell 3c058851b2 HAL_ChibiOS: fixed undef for define lines
this fixes IMU heater enable for CubeBlack+
2019-09-16 12:53:44 +10:00
Andrew Tridgell 75696997cc HAL_ChibiOS: added buzzer support to CUAV_GPS 2019-09-10 16:22:33 +10:00
Andrew Tridgell b344946300 HAL_ChibiOS: prevent duplicate sensors in hwdef.dat
throw an error on configure if there is a duplicate
2019-09-05 06:37:35 +10:00
Andrew Tridgell beca17c638 HAL_ChibiOS: use GET_I2C_DEVICE() for i2c probing
this allows for the driver probing to use a macro to prevent loading
of duplicate i2c devices (AP_Compass does this)
2019-09-04 16:27:47 +10:00
Andrew Tridgell c8806acaf5 HAL_ChibiOS: use AP_PERIPH env var 2019-08-27 10:29:56 +10:00
Andrew Tridgell 2facfe0baa HAL_ChibiOS: support empty UART_ORDER
for CAN bootloader without uart support
2019-08-27 10:29:56 +10:00
Andrew Tridgell 16bdaaa1af HAL_ChibiOS: added support for STM31F10x for AP_Periph 2019-08-27 10:29:56 +10:00
Andrew Tridgell 98f578394f HAL_ChibiOS: default OTG2 protocol to mavlink2 on most boards
For boards that haven't yet had a driver update in MissionPlanner to
cope with the 2nd OTG interface this change makes both interfaces work
as MAVLink

This also fixes an issue with connecting under a windows VM within
vmware
2019-07-26 21:58:57 +10:00
Andrew Tridgell 2f0a4ff1ab HAL_ChibiOS: fixed build on boards with less than max uarts 2019-07-12 17:01:21 +10:00
Andrew Tridgell 02014776e8 HAL_ChibiOS: auto-set HAL_HAVE_DUAL_USB_CDC 2019-07-12 17:01:21 +10:00
Siddharth Purohit 2f0d1336e6 HAL_ChibiOS: add support for dual usd cdc 2019-07-12 17:01:21 +10:00
Peter Barker a61028c55d AP_HAL_ChibiOS: disable scripting if USE_FATFS=no 2019-07-08 09:55:46 +10:00
Alexey Kozin e5988f7153 AP_HAL_ChibiOS: fix voltage sensor connected to fmu adc 2019-07-02 06:42:11 +10:00
Michael du Breuil a34ac14ec5 AP_HAL_ChibiOS: Make BOARD_FLASH_SIZE available at configure time 2019-06-18 00:06:32 -07:00
Andrew Tridgell 03bb94599b HAL_ChibiOS: support I2C sensor probes by bus mask 2019-05-30 15:39:57 +10:00
Andrew Tridgell eae852962e HAL_ChibiOS: fixed case of no IMU, BARO or COMPASS config settings 2019-05-30 15:39:57 +10:00
Andrew Tridgell b47ab5c8a9 HAL_ChibiOS: support I2C sensor config in hwdef.dat 2019-05-30 15:39:57 +10:00
Andrew Tridgell e198d552a8 HAL_ChibiOS: support IMU, COMPASS and BARO lines in hwdef.dat
this allows for main sensors to be set in hwdef.dat, making adding new
boards simpler
2019-05-30 15:39:57 +10:00
Phillip Kocmoud 16f1ec8ce2 HAL_ChibiOS: added missing AF functions for F777 2019-05-10 15:05:42 +10:00
Andrew Tridgell 2b0a30a2c5 HAL_ChibiOS: ensure we don't overflow bootloader area
this modifies the ld script to use the maximum size available for the
bootloader, so we can't accidentially grow the bootloader beyond its
max size
2019-05-06 12:36:41 +10:00
Michael du Breuil b0f4611ddc AP_HAL_ChibiOS: Fix python3 with F7 builds 2019-04-20 12:33:44 +10:00
Andrew Tridgell 32ebd2080f HAL_ChibiOS: mark SDIO and SDMMC IO as pullup
this is needed for boards such as PixhackV3 which don't have hardware
pullups. Thanks to Hongle for reporting this.
2019-04-12 19:44:00 +10:00
Andrew Tridgell cd27e3022f HAL_ChibiOS: check for prefix match on peripherals 2019-03-15 11:54:57 +11:00
Andrew Tridgell 26d1371d25 HAL_ChibiOS: separate out DMA allocation for sdcard IO
this fixes an issue with DMA to SPI6 on STM32H7. On the H7 SRAM4 can
be used for DMA and BDMA to all devices except for SDMMC which uses
IDMA.

by separating out DMA of sdcard data from other data we can arrange
for DMA to all devices to work
2019-03-09 07:33:47 +11:00
Andrew Tridgell a59e1d0e0f HAL_ChibiOS: fixed H7 dma sharing between BDMA and DMA
the BDMA and DMA controllers have separate namespaces for streams, so
we can allocate a lot more streams than we were
2019-03-02 20:50:59 +11:00
Andrew Tridgell c7ca6d77c7 HAL_ChibiOS: H7 doesn't need a DMA mapping for SDMMC
it uses a dedicated internal DMA controller in the SDMMC peripheral
2019-03-02 20:50:59 +11:00
Andrew Tridgell 603d9f6907 HAL_ChibiOS: fixed typo in ITCM base address 2019-03-02 09:01:20 +11:00
Andrew Tridgell 9966fbea0f HAL_ChibiOS: fixed bootloader build error 2019-02-26 16:18:26 +11:00
Andrew Tridgell 8e745f74fb HAL_ChibiOS: support SPI6 on Pixhawk4Pro 2019-02-26 16:18:26 +11:00
Andrew Tridgell 75cd20aea4 HAL_ChibiOS: handle DMAMUX2 on H7
with BDMA
2019-02-26 16:18:26 +11:00
Andrew Tridgell 778d892fc2 HAL_ChibiOS: fixed dma resolved for H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell e92c66418d HAL_ChibiOS: fixed bouncebuffer code on STM32F7 2019-02-26 16:18:26 +11:00
Andrew Tridgell cda1959629 HAL_ChibiOS: added support for more flexible memory regions
this allows for an arbitrary number of memory regions, with each one
flagged as DMA safe, fast or normal
2019-02-26 16:18:26 +11:00
Andrew Tridgell 6177129e41 HAL_ChibiOS: fixed typo in dma_resolver.py 2019-02-26 16:18:26 +11:00
Andrew Tridgell cb77b06460 HAL_ChibiOS: generate a dma map for H7
this allows for DMA sharing, allowing for more peripherals with DMA
2019-02-26 16:18:26 +11:00
Andrew Tridgell 9647a68c9e HAL_ChibiOS: fixed UART RX DMA for H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell efc8da9f9a HAL_ChibiOS: enable TX DMA on uarts on H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell d6bedc3bdf HAL_ChibiOS: use ifndef on more peripheral types 2019-02-26 16:18:26 +11:00
Andrew Tridgell 50b7b7beb5 HAL_ChibiOS: disable DTCM on H7 for now
DTCM doesn't allow for DMA yet
2019-02-26 16:18:26 +11:00
Andrew Tridgell de335f14d7 HAL_ChibiOS: fixed GPIO init for H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell acf77ba49a HAL_ChibiOS: fixed dma resolver for H7 2019-02-26 16:18:26 +11:00
Andrew Tridgell 84ac98622c HAL_ChibiOS: fixed charset issue in H7 database 2019-02-26 16:18:26 +11:00
Andrew Tridgell aab911ac50 HAL_ChibiOS: added hwdef database for STM32H743 2019-02-26 16:18:26 +11:00
Andrew Tridgell 1b06b0f41c HAL_ChibiOS: fixed F765 build 2019-02-26 16:18:26 +11:00
Andrew Tridgell 2765f6e8f0 HAL_ChibiOS: setup APJ board IDs in environment 2019-01-19 17:19:41 +11:00
Jani Hirvinen d9b9638b4a HAL_ChibiOS: fixed F405 PE15 afnum
should be 15 and not 1
2018-12-06 12:43:47 +11:00
Andrew Tridgell 7459709acb HAL_ChibiOS: allow ROMFS to override a file
this allows a hwdef.dat with an include to change an embedded file
specified in the include
2018-11-28 10:35:50 +11:00
Andrew Tridgell a6ab885866 HAL_ChibiOS: fixed typo in F767 pin def file 2018-11-20 18:28:11 +11:00
Andrew Tridgell adf7fefc2e HAL_ChibiOS: detect stuck I2C bus and clear with SCL
This detects the I2C bus becoming stuck with SDA low after a timeout
and clears the bus by toggling SCL. Many thanks to @jhw84 for the
suggestion
2018-11-16 08:30:40 +11:00
Andrew Tridgell bd117f1548 HAL_ChibiOS: define pins for inverting uarts 2018-11-14 19:05:09 +11:00
Michael du Breuil be8d4e6c9d AP_HAL_ChibiOS: Assume that IOMCU implies servo voltage monitoring 2018-11-12 23:29:04 +00:00
Michael du Breuil a5115930dd AP_HAL_ChibiOS: Fix board voltage checks being disabled 2018-11-12 23:29:04 +00:00
Andrew Tridgell a0c57979ab HAL_ChibiOS: use opendrain outputs for LEDs on iomcu 2018-11-07 07:35:45 +11:00
Andrew Tridgell fcc259ae31 HAL_ChibiOS: separate out F1 CR1 calculations
and modify pin speeds for iomcu uarts
2018-11-07 07:35:45 +11:00
Andrew Tridgell 78a32df2e7 HAL_ChibiOS: make all boards base GPIOs for servos at 50
this makes the docs for GPIO pins consistent across boards
2018-10-31 20:10:52 +11:00
Andrew Tridgell b3946fc458 HAL_ChibiOS: added uart for sbus out in IOMCU 2018-10-30 13:00:48 +11:00
Andrew Tridgell af4340d1d1 HAL_ChibiOS: enable analog input on IOMCU 2018-10-30 13:00:48 +11:00
Andrew Tridgell a6b35d6496 HAL_ChibiOS: restore old ODR behaviour for F4 boards
This fixes an issue with ESP8366 on Pixracer
2018-10-30 12:49:16 +11:00
Kevin Lopez Alvarez 6f99c706d6 HAL_ChibiOS: add MCU tables for STM32F469 2018-10-21 09:59:44 +11:00
Andrew Tridgell c622a4c4d6 HAL_ChibiOS: fixed output pins on F100 iomcu 2018-10-17 16:45:37 +11:00
Siddharth Purohit 05539cd93b HAL_ChibiOS:remove print statement left over from previous changes 2018-09-19 12:14:15 +10:00
Siddharth Purohit 2d1153081c HAL_ChibiOS: do not build float support for bootloader builds 2018-09-19 12:14:15 +10:00
Siddharth Purohit 22f74b0827 HAL_ChibiOS: add option to set iomcu firmware environment var 2018-09-19 12:14:15 +10:00
Siddharth Purohit 42b4730d88 HAL_ChibiOS: add changes to hwdef to support STM32F1 based controller 2018-09-19 12:14:15 +10:00
Siddharth Purohit e824a9c360 HAL_ChibiOS: add hwdef files to support IOMCU 2018-09-19 12:14:15 +10:00
Andrew Tridgell d3af854949 HAL_ChibiOS: fixed bootloader build 2018-08-16 12:40:10 +10:00
Andrew Tridgell 4e6ac85057 HAL_ChibiOS: use 32 bit time intervals
this makes for smaller and faster code. We really don't need 64 bit
intervals as long sleeps are done with a loop.
2018-08-03 13:44:59 +10:00
Andrew Tridgell 7aba99e229 HAL_ChibiOS: fixes for ChibiOS version update 2018-08-03 13:44:59 +10:00
Siddharth Purohit 4e8d072d6d HAL_ChibiOS: move to using recent pal driver api for GPIO IRQ events 2018-08-03 13:44:59 +10:00
Andrew Tridgell b0badf8caf HAL_ChibiOS: fixes for F745 builds 2018-08-02 11:56:33 +10:00
Andrew Tridgell 409e857f6b HAL_ChibiOS: use pullup on CTS line
this makes life less difficult for SiK radios which go into bootloader
mode on low CTS
2018-07-13 07:34:30 +10:00
Andrew Tridgell 11e09a846c HAL_ChibiOS: setup RTS pins as pullup
this prevents RTS pins from keeping SiK radios in bootloader mode on
peripheral powerup
2018-07-13 07:34:30 +10:00
Andrew Tridgell a7d9f4eef7 HAL_ChibiOS: don't add defaults.parm when building bootloader 2018-07-09 20:59:51 +10:00
Andrew Tridgell fd02865a8b HAL_ChibiOS: use wildcard ROMFS name for fonts 2018-07-09 19:41:56 +10:00
Andrew Tridgell 15ee9593b5 HAL_ChibiOS: fixed duplicate pin definitions
thanks to @liang-tang for noticing
2018-07-05 12:07:55 +10:00
Andrew Tridgell d3bc281a10 HAL_ChibiOS: use generic ROMFS embedding system 2018-07-02 10:43:48 +10:00
Andrew Tridgell 8ba137bd9a waf: moved ROMFS embed script into waf folder 2018-07-02 10:43:48 +10:00
Andrew Tridgell 6cf205bdbe HAL_ChibiOS: make sure we populate up to uartG 2018-06-29 08:17:38 +10:00
Andrew Tridgell 54dc67e2a9 HAL_ChibiOS: default bootloader product string to XX-BL 2018-06-28 11:35:13 +10:00
Andrew Tridgell 3a5b3b4b1b HAL_ChibiOS: fixed adding bootloader to ROMFS 2018-06-28 11:35:13 +10:00
Peter Barker e332bece0f AP_HAL_ChibiOS: embed any bootloader found for a board 2018-06-28 11:35:13 +10:00
Andrew Tridgell f71d2a7417 HAL_ChibiOS: support bootloaders with no uarts 2018-06-25 21:22:31 +10:00
Andrew Tridgell e40457d98f HAL_ChibiOS: avoid malloc in usbcfg
this avoids the need for malloc in the bootloader
2018-06-25 21:22:31 +10:00
Andrew Tridgell 369ac5edd0 HAL_ChibiOS: save more space in the bootloader 2018-06-25 21:22:31 +10:00
Andrew Tridgell e868a4fe8b HAL_ChibiOS: set FLASH_RESERVE_START_KB in the environment
used to correctly setup an intel hex file
2018-06-23 17:06:38 +10:00
Andrew Tridgell 1c807e0078 HAL_ChibiOS: added option to limit size of bootloader
this will ensure our F4 bootloaders stay under 16k
2018-06-23 17:06:38 +10:00