From 6be519fb0d44617aa700e4ed13bee7a0975e3482 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 2 Apr 2020 07:59:53 +1100 Subject: [PATCH] HAL_ChibiOS: added alt-config for UART4 on omnibusf4pro --- .../AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat index 1380021eac..92b1c325fa 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat @@ -26,12 +26,15 @@ FLASH_RESERVE_START_KB 64 I2C_ORDER I2C2 # order of UARTs -UART_ORDER OTG1 USART6 USART1 USART3 +UART_ORDER OTG1 USART6 USART1 USART3 UART4 #adc PC1 BAT_CURR_SENS ADC1 SCALE(1) PC2 BAT_VOLT_SENS ADC1 SCALE(1) + +#analog rssi pin (also could be used as analog airspeed input) PA0 RSSI_IN ADC1 +define BOARD_RSSI_ANA_PIN 0 #pwm output. 1 - 4 on main header, 5 & 6 on separated header w/o 5V supply, 7 & 8 on CH5 and CH6 pads PB0 TIM1_CH2N TIM1 PWM(1) GPIO(50) @@ -52,7 +55,7 @@ PA7 SPI1_MOSI SPI1 PB10 I2C2_SCL I2C2 PULLUP PB11 I2C2_SDA I2C2 PULLUP -# use I2C pins as USART3 (SERIAL2) in ALT_CONFIG 1 +# use I2C pins as USART3 (SERIAL2) in BRD_ALT_CONFIG=1 PB10 USART3_TX USART3 ALT(1) PB11 USART3_RX USART3 ALT(1) @@ -67,6 +70,9 @@ PA9 USART1_TX USART1 PC6 USART6_TX USART6 PC7 USART6_RX USART6 +# UART4 available as an alternative config on PA0 with BRD_ALT_CONFIG=2 +PA0 UART4_TX UART4 ALT(2) + PA13 JTMS-SWDIO SWD PA14 JTCK-SWCLK SWD @@ -127,13 +133,6 @@ define HAL_BATT_CURR_PIN 11 define HAL_BATT_VOLT_SCALE 11 define HAL_BATT_CURR_SCALE 18.2 -#analog rssi pin (also could be used as analog airspeed input) -# PA0 - ADC123_CH0 -define BOARD_RSSI_ANA_PIN 0 - - - - define OSD_ENABLED 1 define HAL_OSD_TYPE_DEFAULT 1