2018-04-13 18:47:38 -03:00
|
|
|
# hw definition file for processing by chibios_pins.py
|
2019-06-15 17:04:02 -03:00
|
|
|
# Omnibus F4 PRO with on-board current sensor
|
2018-04-25 18:49:43 -03:00
|
|
|
# with F405 mcu, mpu6000 imu, bmp280 barometer, 7456 series osd and sdcard
|
|
|
|
|
2018-04-13 18:47:38 -03:00
|
|
|
MCU STM32F4xx STM32F405xx
|
|
|
|
|
|
|
|
HAL_CHIBIOS_ARCH_F405 1
|
|
|
|
|
|
|
|
# board ID for firmware load
|
2018-06-23 06:27:28 -03:00
|
|
|
APJ_BOARD_ID 131
|
2018-04-13 18:47:38 -03:00
|
|
|
|
|
|
|
# crystal frequency
|
|
|
|
OSCILLATOR_HZ 8000000
|
|
|
|
|
|
|
|
STM32_ST_USE_TIMER 5
|
|
|
|
|
|
|
|
# flash size
|
|
|
|
FLASH_SIZE_KB 1024
|
|
|
|
FLASH_RESERVE_START_KB 64
|
|
|
|
|
|
|
|
# order of I2C buses
|
|
|
|
I2C_ORDER I2C2
|
|
|
|
|
|
|
|
# order of UARTs
|
2020-04-24 08:10:08 -03:00
|
|
|
SERIAL_ORDER OTG1 USART1 USART3 USART6 UART4
|
2018-04-13 18:47:38 -03:00
|
|
|
|
|
|
|
#adc
|
|
|
|
PC1 BAT_CURR_SENS ADC1 SCALE(1)
|
|
|
|
PC2 BAT_VOLT_SENS ADC1 SCALE(1)
|
2020-04-01 17:59:53 -03:00
|
|
|
|
|
|
|
#analog rssi pin (also could be used as analog airspeed input)
|
2018-04-13 18:47:38 -03:00
|
|
|
PA0 RSSI_IN ADC1
|
2020-04-01 17:59:53 -03:00
|
|
|
define BOARD_RSSI_ANA_PIN 0
|
2018-04-13 18:47:38 -03:00
|
|
|
|
2019-06-15 17:04:02 -03:00
|
|
|
#pwm output. 1 - 4 on main header, 5 & 6 on separated header w/o 5V supply, 7 & 8 on CH5 and CH6 pads
|
2018-10-31 02:10:16 -03:00
|
|
|
PB0 TIM1_CH2N TIM1 PWM(1) GPIO(50)
|
|
|
|
PB1 TIM1_CH3N TIM1 PWM(2) GPIO(51)
|
2019-06-15 17:04:02 -03:00
|
|
|
PA3 TIM2_CH4 TIM2 PWM(3) GPIO(52)
|
|
|
|
PA2 TIM2_CH3 TIM2 PWM(4) GPIO(53)
|
|
|
|
PA1 TIM2_CH2 TIM2 PWM(5) GPIO(54)
|
|
|
|
PA8 TIM1_CH1 TIM1 PWM(6) GPIO(55)
|
|
|
|
PC8 TIM8_CH3 TIM8 PWM(7) GPIO(56)
|
2019-06-21 09:57:52 -03:00
|
|
|
PC9 TIM8_CH4 TIM8 PWM(8) GPIO(59)
|
2018-04-13 18:47:38 -03:00
|
|
|
|
|
|
|
PA4 MPU6000_CS CS
|
|
|
|
PA5 SPI1_SCK SPI1
|
|
|
|
PA6 SPI1_MISO SPI1
|
|
|
|
PA7 SPI1_MOSI SPI1
|
|
|
|
|
2018-07-10 19:33:49 -03:00
|
|
|
# note that this board needs PULLUP on I2C pins
|
|
|
|
PB10 I2C2_SCL I2C2 PULLUP
|
|
|
|
PB11 I2C2_SDA I2C2 PULLUP
|
2018-04-13 18:47:38 -03:00
|
|
|
|
2020-05-10 19:40:51 -03:00
|
|
|
# use I2C pins as USART3 (SERIAL2) in BRD_ALT_CONFIG=1 & 4
|
2020-04-14 18:24:51 -03:00
|
|
|
PB10 USART3_TX USART3 ALT(1)
|
|
|
|
PB11 USART3_RX USART3 ALT(1)
|
2020-05-10 19:40:51 -03:00
|
|
|
PB10 USART3_TX USART3 ALT(4)
|
|
|
|
PB11 USART3_RX USART3 ALT(4)
|
2020-04-14 18:24:51 -03:00
|
|
|
|
2018-04-13 18:47:38 -03:00
|
|
|
PB15 SPI2_MOSI SPI2
|
|
|
|
PB14 SPI2_MISO SPI2
|
|
|
|
PB13 SPI2_SCK SPI2
|
|
|
|
PB12 SDCARD_CS CS
|
|
|
|
|
|
|
|
PA10 USART1_RX USART1
|
|
|
|
PA9 USART1_TX USART1
|
|
|
|
|
|
|
|
PC6 USART6_TX USART6
|
|
|
|
PC7 USART6_RX USART6
|
|
|
|
|
2020-05-01 15:16:22 -03:00
|
|
|
# UART4 TX available as an alternative config on PA0 (RSSI pad) with BRD_ALT_CONFIG=2
|
2020-04-01 17:59:53 -03:00
|
|
|
PA0 UART4_TX UART4 ALT(2)
|
|
|
|
|
2020-05-10 19:40:51 -03:00
|
|
|
# full UART4 also available as alt config on PA0 (RSSI pad) and PA1 (PWM output chan 5) with BRD_ALT_CONFIG=3 & 4
|
2020-05-01 15:16:22 -03:00
|
|
|
PA0 UART4_TX UART4 ALT(3)
|
|
|
|
PA1 UART4_RX UART4 ALT(3)
|
2020-05-10 19:40:51 -03:00
|
|
|
PA0 UART4_TX UART4 ALT(4)
|
|
|
|
PA1 UART4_RX UART4 ALT(4)
|
2020-05-01 15:16:22 -03:00
|
|
|
|
2018-04-13 18:47:38 -03:00
|
|
|
PA13 JTMS-SWDIO SWD
|
|
|
|
PA14 JTCK-SWCLK SWD
|
|
|
|
|
|
|
|
PA15 OSD_CS CS
|
|
|
|
PB3 BMP280_CS CS
|
|
|
|
PC12 SPI3_MOSI SPI3
|
|
|
|
PC11 SPI3_MISO SPI3
|
|
|
|
PC10 SPI3_SCK SPI3
|
|
|
|
|
2019-06-21 18:33:54 -03:00
|
|
|
PB5 LED_BLUE OUTPUT LOW GPIO(1)
|
|
|
|
define HAL_GPIO_A_LED_PIN 1
|
2019-06-22 16:15:40 -03:00
|
|
|
|
|
|
|
#dummy assignment required to allow AP_NOTIFY to use board led
|
|
|
|
define HAL_GPIO_B_LED_PIN 2
|
2019-06-21 09:57:52 -03:00
|
|
|
|
2019-08-25 22:17:46 -03:00
|
|
|
PB4 TIM3_CH1 TIM3 GPIO(58) ALARM LOW
|
2018-04-13 18:47:38 -03:00
|
|
|
|
2020-05-20 12:36:46 -03:00
|
|
|
#use LED-STRIP output as general purpose GPIO
|
|
|
|
PB6 GP_GPIO OUTPUT LOW GPIO(70)
|
|
|
|
|
2018-04-13 18:47:38 -03:00
|
|
|
PA11 OTG_FS_DM OTG1
|
|
|
|
PA12 OTG_FS_DP OTG1
|
|
|
|
PC5 VBUS INPUT OPENDRAIN
|
|
|
|
|
2018-04-25 18:49:43 -03:00
|
|
|
# "PPM" solder pad/resistor should be soldered and "S-BUS" resistor/solder pad removed
|
|
|
|
# Overwise UART1 or UART6 or RCIN will not work
|
2018-04-22 09:43:49 -03:00
|
|
|
PB8 TIM4_CH3 TIM4 RCININT PULLDOWN LOW
|
2018-04-13 18:47:38 -03:00
|
|
|
|
2018-04-25 18:49:43 -03:00
|
|
|
|
2018-04-13 18:47:38 -03:00
|
|
|
# SPI Device table
|
|
|
|
SPIDEV mpu6000 SPI1 DEVID1 MPU6000_CS MODE3 1*MHZ 8*MHZ
|
2018-04-28 21:09:09 -03:00
|
|
|
SPIDEV sdcard SPI2 DEVID2 SDCARD_CS MODE0 400*KHZ 25*MHZ
|
2018-04-13 18:47:38 -03:00
|
|
|
SPIDEV bmp280 SPI3 DEVID3 BMP280_CS MODE3 1*MHZ 8*MHZ
|
2018-06-23 04:11:05 -03:00
|
|
|
SPIDEV osd SPI3 DEVID4 OSD_CS MODE0 10*MHZ 10*MHZ
|
2018-04-13 18:47:38 -03:00
|
|
|
|
2019-06-02 04:39:07 -03:00
|
|
|
# one IMU
|
|
|
|
IMU Invensense SPI:mpu6000 ROTATION_YAW_180
|
2018-04-13 18:47:38 -03:00
|
|
|
|
2019-06-02 04:39:07 -03:00
|
|
|
# one baro
|
|
|
|
BARO BMP280 SPI:bmp280
|
2018-04-13 18:47:38 -03:00
|
|
|
|
2018-07-13 07:14:03 -03:00
|
|
|
# no built-in compass, but probe the i2c bus for all possible
|
|
|
|
# external compass types
|
2018-07-05 17:35:46 -03:00
|
|
|
define ALLOW_ARM_NO_COMPASS
|
2018-07-13 07:14:03 -03:00
|
|
|
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
|
|
|
|
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
|
|
|
|
define HAL_I2C_INTERNAL_MASK 0
|
2018-07-28 02:36:37 -03:00
|
|
|
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
|
2018-07-05 17:35:46 -03:00
|
|
|
|
2018-04-13 18:47:38 -03:00
|
|
|
define STORAGE_FLASH_PAGE 1
|
2018-06-23 05:00:05 -03:00
|
|
|
define HAL_STORAGE_SIZE 15360
|
2018-04-13 18:47:38 -03:00
|
|
|
|
2018-04-28 21:09:09 -03:00
|
|
|
define HAL_OS_FATFS_IO 1
|
|
|
|
define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS"
|
|
|
|
define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN"
|
|
|
|
|
2018-04-13 18:47:38 -03:00
|
|
|
# define default battery setup
|
2018-04-25 18:49:43 -03:00
|
|
|
define HAL_BATT_VOLT_PIN 12
|
|
|
|
define HAL_BATT_CURR_PIN 11
|
2018-04-13 18:47:38 -03:00
|
|
|
define HAL_BATT_VOLT_SCALE 11
|
2018-04-25 18:49:43 -03:00
|
|
|
define HAL_BATT_CURR_SCALE 18.2
|
2018-04-13 18:47:38 -03:00
|
|
|
|
2019-12-20 13:46:24 -04:00
|
|
|
define OSD_ENABLED 1
|
2018-10-31 21:10:21 -03:00
|
|
|
define HAL_OSD_TYPE_DEFAULT 1
|
2018-06-23 04:11:05 -03:00
|
|
|
|
2018-04-25 18:49:43 -03:00
|
|
|
#To complementary channels work we define this
|
2018-04-13 18:47:38 -03:00
|
|
|
define STM32_PWM_USE_ADVANCED TRUE
|
|
|
|
|
2019-06-15 17:04:02 -03:00
|
|
|
define BOARD_PWM_COUNT_DEFAULT 8
|
2018-06-23 04:11:05 -03:00
|
|
|
|
|
|
|
#font for the osd
|
2021-04-08 18:27:54 -03:00
|
|
|
ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin
|
2020-01-18 04:38:19 -04:00
|
|
|
|
|
|
|
# disable SMBUS and fuel battery monitors to save flash
|
|
|
|
define HAL_BATTMON_SMBUS_ENABLE 0
|
|
|
|
define HAL_BATTMON_FUEL_ENABLE 0
|
|
|
|
|
|
|
|
# disable parachute and sprayer to save flash
|
|
|
|
define HAL_PARACHUTE_ENABLED 0
|
|
|
|
define HAL_SPRAYER_ENABLED 0
|
2020-01-30 19:53:03 -04:00
|
|
|
|
|
|
|
# reduce max size of embedded params for apj_tool.py
|
|
|
|
define AP_PARAM_MAX_EMBEDDED_PARAM 1024
|
2021-04-08 18:27:54 -03:00
|
|
|
|
|
|
|
# save some flash
|
|
|
|
define GENERATOR_ENABLED 0
|
|
|
|
define AC_OAPATHPLANNER_ENABLED 0
|
|
|
|
define PRECISION_LANDING 0
|