2018-07-21 18:40:34 -03:00
|
|
|
# hw definition file for processing by chibios_pins.py
|
|
|
|
# Omnibus F4 Nano V6 only
|
2020-08-30 05:28:31 -03:00
|
|
|
# with F405 mcu, mpu6000 imu, bmp280 barometer, 7456 series osd, flash log storage
|
2018-07-21 18:40:34 -03:00
|
|
|
|
|
|
|
MCU STM32F4xx STM32F405xx
|
|
|
|
|
|
|
|
# board ID for firmware load
|
|
|
|
APJ_BOARD_ID 133
|
|
|
|
|
|
|
|
# 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
|
2020-08-30 05:28:31 -03:00
|
|
|
I2C_ORDER I2C2 I2C1
|
2018-07-21 18:40:34 -03:00
|
|
|
|
|
|
|
# order of UARTs
|
2020-08-30 05:28:31 -03:00
|
|
|
SERIAL_ORDER OTG1 USART1 UART4 USART6 USART3
|
2018-07-21 18:40:34 -03:00
|
|
|
|
|
|
|
#adc
|
|
|
|
PC1 BAT_CURR_SENS ADC1 SCALE(1)
|
|
|
|
PC2 BAT_VOLT_SENS ADC1 SCALE(1)
|
|
|
|
PA0 RSSI_IN ADC1
|
|
|
|
|
|
|
|
#pwm output
|
|
|
|
PB0 TIM1_CH2N TIM1 PWM(1) GPIO(50)
|
|
|
|
PB1 TIM1_CH3N TIM1 PWM(2) GPIO(51)
|
|
|
|
PA3 TIM2_CH4 TIM2 PWM(3) GPIO(52)
|
|
|
|
PB5 TIM3_CH2 TIM3 PWM(4) GPIO(53)
|
|
|
|
|
|
|
|
|
|
|
|
PA4 MPU6000_CS CS
|
|
|
|
PA5 SPI1_SCK SPI1
|
|
|
|
PA6 SPI1_MISO SPI1
|
|
|
|
PA7 SPI1_MOSI SPI1
|
|
|
|
|
|
|
|
# note that this board needs PULLUP on I2C pins
|
|
|
|
PB10 I2C2_SCL I2C2 PULLUP
|
|
|
|
PB11 I2C2_SDA I2C2 PULLUP
|
|
|
|
|
2020-08-30 05:28:31 -03:00
|
|
|
# I2C1 on PPM / PB9 pads of V6.x board revision
|
2022-01-10 09:16:23 -04:00
|
|
|
# On ALT config as it interferes with 6.0 revisions
|
|
|
|
PB8 I2C1_SCL I2C1 PULLUP ALT(1)
|
|
|
|
PB9 I2C1_SDA I2C1 PULLUP ALT(1)
|
2020-08-30 05:28:31 -03:00
|
|
|
|
|
|
|
# use RX3 / TX3 pins as USART3 = SERIAL4 in BRD_ALT_CONFIG = 1
|
|
|
|
PB10 USART3_TX USART3 ALT(1)
|
|
|
|
PB11 USART3_RX USART3 ALT(1)
|
|
|
|
|
2019-01-22 17:22:55 -04:00
|
|
|
# SPI2 for flash
|
2018-07-21 18:40:34 -03:00
|
|
|
PB15 SPI2_MOSI SPI2
|
|
|
|
PB14 SPI2_MISO SPI2
|
|
|
|
PB13 SPI2_SCK SPI2
|
2019-01-22 17:22:55 -04:00
|
|
|
PB12 FLASH_CS CS
|
2018-07-21 18:40:34 -03:00
|
|
|
|
2020-08-30 05:28:31 -03:00
|
|
|
# USART1 = SERIAL1 on original V6 revision only
|
|
|
|
# not available on V6.x revisions due to altered inverter layout
|
2018-07-21 18:40:34 -03:00
|
|
|
PA10 USART1_RX USART1
|
|
|
|
PA9 USART1_TX USART1
|
|
|
|
|
2020-08-30 05:28:31 -03:00
|
|
|
# USART6 = SERIAL3
|
2018-07-21 18:40:34 -03:00
|
|
|
PC6 USART6_TX USART6
|
|
|
|
PC7 USART6_RX USART6
|
|
|
|
|
2018-10-16 12:35:05 -03:00
|
|
|
# UART4 (ESC sensor)
|
|
|
|
PA1 UART4_RX UART4
|
|
|
|
|
2018-07-21 18:40:34 -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
|
|
|
|
|
|
|
|
PA8 LED OUTPUT HIGH GPIO(41)
|
2019-08-20 00:30:34 -03:00
|
|
|
|
|
|
|
# passive buzzer disabled, timer 3 used for PWM(4) output
|
2018-07-21 18:40:34 -03:00
|
|
|
#PB4 TIM3_CH1 TIM3 GPIO(70) ALARM
|
|
|
|
|
2019-08-20 00:30:34 -03:00
|
|
|
# use active buzzer instead
|
|
|
|
PB4 BUZZER OUTPUT GPIO(80) LOW
|
|
|
|
define HAL_BUZZER_PIN 80
|
2023-04-22 18:11:08 -03:00
|
|
|
|
2023-04-21 10:26:50 -03:00
|
|
|
|
2019-08-20 00:30:34 -03:00
|
|
|
|
2018-07-21 18:40:34 -03:00
|
|
|
PA11 OTG_FS_DM OTG1
|
|
|
|
PA12 OTG_FS_DP OTG1
|
|
|
|
PC5 VBUS INPUT OPENDRAIN
|
|
|
|
|
|
|
|
#LED strip output pad used for RC input
|
|
|
|
PB6 TIM4_CH1 TIM4 RCININT PULLDOWN LOW
|
|
|
|
|
|
|
|
#Omnibus F4 V3 and later had hw inverter on UART6
|
|
|
|
#Overide it to use as GPS UART port
|
|
|
|
PC8 SBUS_INVERT_RX OUTPUT LOW
|
|
|
|
PC9 SBUS_INVERT_TX OUTPUT LOW
|
|
|
|
|
|
|
|
# SPI Device table
|
|
|
|
SPIDEV mpu6000 SPI1 DEVID1 MPU6000_CS MODE3 1*MHZ 8*MHZ
|
2019-01-22 17:22:55 -04:00
|
|
|
SPIDEV bmp280 SPI3 DEVID3 BMP280_CS MODE3 1*MHZ 8*MHZ
|
|
|
|
SPIDEV osd SPI3 DEVID4 OSD_CS MODE0 10*MHZ 10*MHZ
|
|
|
|
SPIDEV dataflash SPI2 DEVID1 FLASH_CS MODE3 32*MHZ 32*MHZ
|
|
|
|
|
|
|
|
# enable logging to dataflash
|
2021-11-18 18:37:31 -04:00
|
|
|
define HAL_LOGGING_DATAFLASH_ENABLED 1
|
2018-07-21 18:40:34 -03:00
|
|
|
|
2019-06-02 04:39:07 -03:00
|
|
|
# one IMU
|
|
|
|
IMU Invensense SPI:mpu6000 ROTATION_YAW_90
|
2018-07-21 18:40:34 -03:00
|
|
|
|
2019-06-02 04:39:07 -03:00
|
|
|
# one baro
|
|
|
|
BARO BMP280 SPI:bmp280
|
2018-07-21 18:40:34 -03:00
|
|
|
|
|
|
|
# no built-in compass, but probe the i2c bus for all possible
|
|
|
|
# external compass types
|
|
|
|
define ALLOW_ARM_NO_COMPASS
|
|
|
|
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
|
|
|
|
define HAL_I2C_INTERNAL_MASK 0
|
|
|
|
|
2021-10-27 02:32:43 -03:00
|
|
|
STORAGE_FLASH_PAGE 1
|
2018-07-21 18:40:34 -03:00
|
|
|
define HAL_STORAGE_SIZE 15360
|
|
|
|
|
|
|
|
|
|
|
|
# define default battery setup
|
|
|
|
define HAL_BATT_VOLT_PIN 12
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2024-07-09 00:19:56 -03:00
|
|
|
define AP_NOTIFY_GPIO_LED_1_ENABLED 1
|
2024-07-23 09:18:41 -03:00
|
|
|
define AP_NOTIFY_GPIO_LED_1_PIN 41
|
2018-07-21 18:40:34 -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-07-21 18:40:34 -03:00
|
|
|
|
|
|
|
#font for the osd
|
|
|
|
ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin
|
2020-07-24 14:47:16 -03:00
|
|
|
|
2022-04-14 03:28:05 -03:00
|
|
|
# minimal drivers to reduce flash usage
|
2023-10-20 09:18:16 -03:00
|
|
|
include ../include/minimize_fpv_osd.inc
|