HAL_ChibiOS: updates to hwdef.dat from plane3.9.0

This commit is contained in:
Andrew Tridgell 2018-08-01 21:03:34 +10:00 committed by Randy Mackay
parent 3710099709
commit 1bc1f33cad
15 changed files with 122 additions and 71 deletions

View File

@ -120,14 +120,15 @@ FLASH_RESERVE_START_KB 64
define HAL_INS_DEFAULT HAL_INS_MPU60XX_SPI
define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_180
# there is no compass fitted by default
# no built-in compass, but probe the i2c bus for all possible
# external compass types
define ALLOW_ARM_NO_COMPASS
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
define HAL_I2C_INTERNAL_MASK 0
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843
define HAL_COMPASS_HMC5843_I2C_BUS 0
define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
define HAL_COMPASS_HMC5843_ROTATION ROTATION_YAW_90
# baro is a bmp280 on i2c
define HAL_BARO_DEFAULT HAL_BARO_BMP280_I2C
define HAL_BARO_BMP280_BUS 0
define HAL_BARO_BMP280_I2C_ADDR 0x76
@ -139,7 +140,7 @@ SPIDEV osd SPI3 DEVID4 MAX7456_CS MODE0 10*MHZ 10*MHZ
# setup for OSD
define OSD_ENABLED ENABLED
ROMFS osd_font.bin libraries/AP_OSD/fonts/clarity.bin
ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin
# 8 PWM available by default
define BOARD_PWM_COUNT_DEFAULT 8

View File

@ -158,20 +158,27 @@ define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS"
define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN"
define HAL_DATAFLASH_FILE_BUFSIZE 8
define HAL_DATAFLASH_MAV_BUFSIZE 2
# define default battery setup
define HAL_BATT_VOLT_PIN 10
define HAL_BATT_CURR_PIN 11
define HAL_BATT_VOLT_SCALE 11
define HAL_BATT_CURR_SCALE 31.7
define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843
define HAL_COMPASS_HMC5843_I2C_BUS 1
define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
define HAL_COMPASS_HMC5843_ROTATION ROTATION_NONE
#analog rssi pin (also could be used as analog airspeed input)
# PC5 - ADC12_CH15
define BOARD_RSSI_ANA_PIN 15
# no built-in compass, but probe the i2c bus for all possible
# external compass types
define ALLOW_ARM_NO_COMPASS
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
define HAL_I2C_INTERNAL_MASK 0
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
define OSD_ENABLED ENABLED
ROMFS osd_font.bin libraries/AP_OSD/fonts/clarity.bin
ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin
define BOARD_PWM_COUNT_DEFAULT 9

View File

@ -9,8 +9,6 @@
# MCU class and specific type
MCU STM32F4xx STM32F405xx
define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_CHIBIOS_MATEKF405
# board ID for firmware load
APJ_BOARD_ID 125
@ -75,11 +73,17 @@ PC4 BATT_CURRENT_SENS ADC1 SCALE(1)
PB1 RSSI_ADC_PIN ADC1 SCALE(1)
# define default battery setup
define HAL_BATT_VOLT_PIN 13
define HAL_BATT_CURR_PIN 12
# PC5 - ADC12_CH15
define HAL_BATT_VOLT_PIN 15
# PC4 - ADC12_CH14
define HAL_BATT_CURR_PIN 14
define HAL_BATT_VOLT_SCALE 10.1
define HAL_BATT_CURR_SCALE 17.0
#analog rssi pin (also could be used as analog airspeed input)
# PB1 - ADC12_CH9
define BOARD_RSSI_ANA_PIN 9
# USART1
PA9 USART1_TX USART1
PA10 USART1_RX USART1
@ -132,13 +136,13 @@ FLASH_RESERVE_START_KB 64
define HAL_INS_DEFAULT HAL_INS_MPU60XX_SPI
define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_180
# there is no compass fitted by default
# no built-in compass, but probe the i2c bus for all possible
# external compass types
define ALLOW_ARM_NO_COMPASS
define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843
define HAL_COMPASS_HMC5843_I2C_BUS 0
define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
define HAL_COMPASS_HMC5843_ROTATION ROTATION_YAW_90
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
define HAL_I2C_INTERNAL_MASK 0
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
define HAL_BARO_DEFAULT HAL_BARO_BMP280_I2C
define HAL_BARO_BMP280_BUS 0
@ -168,4 +172,4 @@ define BOARD_PWM_COUNT_DEFAULT 8
# setup for OSD
define OSD_ENABLED ENABLED
ROMFS osd_font.bin libraries/AP_OSD/fonts/clarity.bin
ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin

View File

@ -90,8 +90,8 @@ PC5 RSSI_ADC ADC1
PA10 USART1_RX USART1
PA9 USART1_TX USART1
# USART2 for SBUS input, RX only
#PA3 USART2_RX USART2
# USART2 for RC input, RX only
PA3 TIM9_CH2 TIM2 RCININT FLOAT LOW
# USART3
PD9 USART3_RX USART3
@ -120,8 +120,18 @@ SPIDEV sdcard SPI4 DEVID1 SDCARD_CS MODE0 400*KHZ 25*MHZ
SPIDEV osd SPI2 DEVID1 MAX7456_CS MODE0 10*MHZ 10*MHZ
define HAL_OS_FATFS_IO 1
define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS"
define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN"
# no built-in compass, but probe the i2c bus for all possible
# external compass types
define ALLOW_ARM_NO_COMPASS
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
define HAL_I2C_INTERNAL_MASK 0
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
define HAL_BARO_DEFAULT HAL_BARO_BMP280_SPI
define OSD_ENABLED ENABLED
ROMFS osd_font.bin libraries/AP_OSD/fonts/clarity.bin
ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin

View File

@ -86,9 +86,11 @@ define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C
define HAL_BARO_MS5611_I2C_BUS 0
define HAL_BARO_MS5611_I2C_ADDR 0x77
define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843
define HAL_COMPASS_HMC5843_I2C_BUS 0
define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
define ALLOW_ARM_NO_COMPASS
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
define HAL_I2C_INTERNAL_MASK 0
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
define STORAGE_FLASH_PAGE 1
define HAL_STORAGE_SIZE 15360

View File

@ -113,10 +113,12 @@ define HAL_BARO_LPS25H_I2C_BUS 0
define HAL_BARO_LPS25H_I2C_ADDR 0x5D
define HAL_BARO_LPS25H_I2C_IMU_ADDR HAL_INS_MPU60x0_I2C_ADDR
define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_I2C
define HAL_COMPASS_AK8963_I2C_BUS 0
define HAL_COMPASS_AK8963_I2C_ADDR 0x0c
# no built-in compass, but probe the i2c bus for all possible
# external compass types
define ALLOW_ARM_NO_COMPASS
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
define HAL_I2C_INTERNAL_MASK 0
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
define MAG_BOARD_ORIENTATION ROTATION_YAW_180

View File

@ -2,7 +2,7 @@
# for ProfiCNC/Hex CUBE RED hardware
# MCU class and specific type
MCU STM32F7xx STM32F769xx
MCU STM32F7xx STM32F767xx
# board ID for firmware load
APJ_BOARD_ID 9
@ -48,7 +48,7 @@ PA7 SPI1_MOSI SPI1
PA8 CAN3_RX CAN3
PA9 VBUS INPUT OPENDRAIN
PA10 IO-debug-console
#PA10 IO-debug-console
PA11 OTG_FS_DM OTG1
PA12 OTG_FS_DP OTG1
PA13 JTMS-SWDIO SWD
@ -85,19 +85,19 @@ PC1 HW_REV_SENSE INPUT
PC6 USART6_TX USART6
PC7 USART6_RX USART6
PC8 SDIO_D0 SDIO
PC9 SDIO_D1 SDIO
PC10 SDIO_D2 SDIO
PC11 SDIO_D3 SDIO
PC12 SDIO_CK SDIO
PC8 SDMMC_D0 SDMMC1
PC9 SDMMC_D1 SDMMC1
PC10 SDMMC_D2 SDMMC1
PC11 SDMMC_D3 SDMMC1
PC12 SDMMC_CK SDMMC1
PD2 SDMMC_CMD SDMMC1
PC13 GYRO_EXT_CS CS
PC14 32KHz_IN
PC15 32KHz_OUT
PD0 CAN1_RX CAN1
PD1 CAN1_TX CAN1
PD2 SDIO_CMD SDIO
# USART2 serial2 telem1
PD3 USART2_CTS USART2
PD4 USART2_RTS USART2
@ -139,18 +139,18 @@ PE15 VDD_5V_PERIPH_OC INPUT
#PF0
#PF1
PF2 ICM20649_CS CS
PF3 FMU_AUX_POWER ADC1 SCALE(1)
PF4 FMU_AUX_ADC2 ADC1 SCALE(1)
PF5 PRESSURE_SENS ADC1 SCALE(1)
#PF3 FMU_AUX_POWER ADC1 SCALE(1)
#PF4 FMU_AUX_ADC2 ADC1 SCALE(1)
#PF5 PRESSURE_SENS ADC1 SCALE(1)
#PF6
#PF7
#PF8
#PF9
PF10 SPI4_MS5611_CS CS
PF11 SPI4_SPARE_CS CS
PF10 MS5611_CS CS
PF11 SPARE_CS CS
#PF12
PF13 VDD_5V_HIPOWER_OC
PF13 VDD_5V_HIPOWER_OC INPUT
#PF14
#PF15
@ -163,10 +163,10 @@ PG4 VDD_5V_PERIPH_EN OUTPUT LOW
#PG6
#PG7
PG8 SPI6_CS CS
#PG8 SPI6_CS CS
#PG9
#PG10
PG11 SPI6_CS2 CS
#PG11 SPI6_CS2 CS
PG12 SPI6_MISO SPI6
PG13 SPI6_SCK SPI6
#PG14
@ -182,7 +182,7 @@ PH3 HW_REV_DRIVE OUTPUT HIGH
#PH7
#PH8
PH9 ALARM
PH9 ALARM OUTPUT
#PH10
#PH11
#PH12
@ -195,7 +195,7 @@ PH9 ALARM
#PI2
#PI3
#PI4
PI5 PPM_IN
#PI5 PPM_IN
#PI6
#PI7
@ -210,20 +210,20 @@ PI5 PPM_IN
# when moving to ChibiOS
#sensors on Main FMU board
SPIDEV ms5611 SPI1 DEVID3 SPI1_MS5611_CS MODE3 20*MHZ 20*MHZ
SPIDEV ICM20649 SPI1 DEVID ICM20649_CS MODE3 1*MHZ 8*MHZ
SPIDEV ms5611 SPI1 DEVID3 MS5611_CS MODE3 20*MHZ 20*MHZ
SPIDEV ICM20649 SPI1 DEVID2 ICM20649_CS MODE3 1*MHZ 8*MHZ
#Sensors on the isolated IMU Board
SPIDEV ICM20602 SPI4 DEVID ICM20602_CS MODE3 1*MHZ 8*MHZ
SPIDEV ms5611_ext SPI4 DEVID2 SPI4_MS5611_CS MODE3 20*MHZ 20*MHZ
SPIDEV ICM20948 SPI4 DEVID ICM20948_CS MODE3 1*MHZ 8*MHZ
#SPIDEV ICM20602 SPI4 DEVID1 ICM20602_CS MODE3 1*MHZ 8*MHZ
SPIDEV ms5611_ext SPI4 DEVID2 MS5611_CS MODE3 20*MHZ 20*MHZ
SPIDEV ICM20948 SPI4 DEVID3 ICM20948_CS MODE3 1*MHZ 8*MHZ
#FRAM
SPIDEV ramtron SPI2 DEVID10 FRAM_CS MODE3 8*MHZ 8*MHZ
#Spare CS Pins for external SPI devices (SPI6)
SPIDEV EXTERNAL_DEV1 SPI6 DEVID SPI6_CS MODE0 2*MHZ 2*MHZ
SPIDEV EXTERNAL_DEV2 SPI6 DEVID SPI6_CS2 MODE1 2*MHZ 2*MHZ
#SPIDEV EXTERNAL_DEV1 SPI6 DEVID1 SPI6_CS MODE0 2*MHZ 2*MHZ
#SPIDEV EXTERNAL_DEV2 SPI6 DEVID2 SPI6_CS2 MODE1 2*MHZ 2*MHZ
define HAL_CHIBIOS_ARCH_CUBE_RED 1

View File

@ -5,6 +5,7 @@ include ../fmuv4/hwdef.dat
# SPI2 SCK is on PB13
#define GPIO_SPI2_SCK (GPIO_SPI2_SCK_2|GPIO_SPEED_50MHz)
undef SPI2_SCK
undef PB13
PB13 SPI2_SCK SPI2
# note that PC13 (SBUS invert) is active low on this board

View File

@ -94,8 +94,13 @@ I2C_ORDER I2C3 I2C1 I2C2 I2C4
# enable pins
PE3 VDD_3V3_SENSORS_EN OUTPUT HIGH
PF12 nVDD_5V_HIPOWER_EN OUTPUT LOW
PG4 nVDD_5V_PERIPH_EN OUTPUT LOW
# start peripheral power off, then enable after init
# this prevents a problem with radios that use RTS for
# bootloader hold
PF12 nVDD_5V_HIPOWER_EN OUTPUT HIGH
PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH
PG5 VDD_5V_RC_EN OUTPUT HIGH
PG6 VDD_5V_WIFI_EN OUTPUT HIGH
PG7 VDD_3V3_SD_CARD_EN OUTPUT HIGH
@ -240,11 +245,10 @@ PD2 SDMMC_CMD SDMMC1
define HAL_STORAGE_SIZE 16384
define HAL_WITH_RAMTRON 1
# define STORAGE_FLASH_PAGE 11
define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
DMA_PRIORITY SDMMC* UART8* ADC* SPI* TIM*

View File

@ -195,3 +195,5 @@ define HAL_BATT_CURR_SCALE 17.0
# 12 PWM available by default
define BOARD_PWM_COUNT_DEFAULT 12
define HAL_COMPASS_AUTO_ROT_DEFAULT 2

View File

@ -115,7 +115,14 @@ define HAL_BARO_DEFAULT HAL_BARO_LPS22H_SPI
define HAL_INS_DEFAULT HAL_INS_MPU60XX_SPI
define HAL_INS_DEFAULT_ROTATION ROTATION_PITCH_180
define HAL_COMPASS_DEFAULT HAL_COMPASS_QMC5883L
# the mini-pix has a QMC5883L both internal and external, detected
# using HAL_PROBE_EXTERNAL_I2C_COMPASSES
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
define HAL_COMPASS_QMC5883L_ORIENTATION_INTERNAL ROTATION_PITCH_180_YAW_270
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS"

View File

@ -21,7 +21,6 @@ FLASH_RESERVE_START_KB 0
# LEDs
PB5 LED_BOOTLOADER OUTPUT LOW
PB4 LED_ACTIVITY OUTPUT LOW
define HAL_LED_ON 0
# the location where the bootloader will put the firmware

View File

@ -100,9 +100,13 @@ define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_180
define HAL_BARO_DEFAULT HAL_BARO_BMP280_SPI
define HAL_BARO_BMP280_NAME "bmp280"
define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843
define HAL_COMPASS_HMC5843_I2C_BUS 0
define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
# no built-in compass, but probe the i2c bus for all possible
# external compass types
define ALLOW_ARM_NO_COMPASS
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
define HAL_I2C_INTERNAL_MASK 0
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
define STORAGE_FLASH_PAGE 1
define HAL_STORAGE_SIZE 15360
@ -119,6 +123,11 @@ 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 HAL_GPIO_A_LED_PIN 57
define OSD_ENABLED ENABLED
@ -134,4 +143,4 @@ define BOARD_PWM_COUNT_DEFAULT 6
#define CH_DBG_ENABLE_STACK_CHECK TRUE
#font for the osd
ROMFS osd_font.bin libraries/AP_OSD/fonts/clarity.bin
ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin

View File

@ -123,6 +123,7 @@ define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843
define HAL_COMPASS_HMC5843_I2C_BUS 0
define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E
define HAL_COMPASS_HMC5843_ROTATION ROTATION_YAW_270
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C
define HAL_BARO_MS5611_I2C_BUS 0

View File

@ -127,7 +127,9 @@ FLASH_RESERVE_START_KB 64
define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI
define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_MPU9250
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
define HAL_I2C_INTERNAL_MASK 0
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
# SPI devices
SPIDEV mpu9250 SPI1 DEVID4 MPU_CS MODE3 1*MHZ 4*MHZ