2018-05-06 10:42:30 -03:00
|
|
|
# hw definition file for processing by chibios_pins.py
|
2018-05-07 03:30:20 -03:00
|
|
|
# Airbot F4, Flip32 F4
|
|
|
|
# with F405 mcu, mpu6000 imu
|
2018-05-06 10:42:30 -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 128
|
2018-05-06 10:42:30 -03:00
|
|
|
|
|
|
|
# crystal frequency
|
|
|
|
OSCILLATOR_HZ 8000000
|
|
|
|
STM32_PLLM_VALUE 8
|
|
|
|
|
|
|
|
# board voltage
|
|
|
|
STM32_VDD 330U
|
|
|
|
|
|
|
|
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
|
|
|
|
UART_ORDER OTG1 USART6 USART1
|
|
|
|
|
|
|
|
#adc
|
|
|
|
PC1 BAT_CURR_SENS ADC1 SCALE(1)
|
|
|
|
PC2 BAT_VOLT_SENS ADC1 SCALE(1)
|
|
|
|
PA0 RSSI_IN ADC1
|
|
|
|
|
|
|
|
#pwm output
|
2018-10-31 02:10:16 -03:00
|
|
|
PB0 TIM1_CH2N TIM1 PWM(1) GPIO(50)
|
|
|
|
PB1 TIM1_CH3N TIM1 PWM(2) GPIO(51)
|
|
|
|
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)
|
2018-05-06 10:42:30 -03:00
|
|
|
|
|
|
|
PA4 MPU6000_CS CS
|
|
|
|
PA5 SPI1_SCK SPI1
|
|
|
|
PA6 SPI1_MISO SPI1
|
|
|
|
PA7 SPI1_MOSI SPI1
|
|
|
|
|
|
|
|
PB10 I2C2_SCL I2C2
|
|
|
|
PB11 I2C2_SDA I2C2
|
|
|
|
|
|
|
|
PA10 USART1_RX USART1
|
|
|
|
PA9 USART1_TX USART1
|
|
|
|
|
|
|
|
PC6 USART6_TX USART6
|
|
|
|
PC7 USART6_RX USART6
|
|
|
|
|
|
|
|
PA13 JTMS-SWDIO SWD
|
|
|
|
PA14 JTCK-SWCLK SWD
|
|
|
|
|
2018-05-07 03:30:20 -03:00
|
|
|
PB3 FLASH_CS CS
|
|
|
|
PC12 SPI3_MOSI SPI3
|
|
|
|
PC11 SPI3_MISO SPI3
|
|
|
|
PC10 SPI3_SCK SPI3
|
2018-05-06 10:42:30 -03:00
|
|
|
|
|
|
|
PB5 LED OUTPUT HIGH GPIO(57)
|
|
|
|
PB4 TIM3_CH1 TIM3 GPIO(56) ALARM
|
|
|
|
|
|
|
|
PA11 OTG_FS_DM OTG1
|
|
|
|
PA12 OTG_FS_DP OTG1
|
|
|
|
PC5 VBUS INPUT OPENDRAIN
|
|
|
|
|
|
|
|
# "PPM" solder pad/resistor should be soldered and "S-BUS" resistor/solder pad removed
|
2018-05-07 03:30:20 -03:00
|
|
|
# Overwise UART1 or RCIN will not work
|
2018-05-06 10:42:30 -03:00
|
|
|
PB14 TIM12_CH1 TIM12 RCININT PULLDOWN LOW
|
|
|
|
|
|
|
|
# SPI Device table
|
|
|
|
SPIDEV mpu6000 SPI1 DEVID1 MPU6000_CS MODE3 1*MHZ 8*MHZ
|
2019-01-20 20:25:05 -04:00
|
|
|
SPIDEV dataflash SPI3 DEVID1 FLASH_CS MODE3 32*MHZ 32*MHZ
|
|
|
|
|
|
|
|
# enable logging to dataflash
|
|
|
|
define HAL_LOGGING_DATAFLASH
|
2018-05-06 10:42:30 -03:00
|
|
|
|
|
|
|
define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_CHIBIOS_AIRBOTF4
|
|
|
|
|
2019-05-29 22:34:45 -03:00
|
|
|
# one IMU
|
|
|
|
IMU Invensense SPI:mpu6000_cs ROTATION_YAW_180
|
2018-05-06 10:42:30 -03:00
|
|
|
|
2019-05-29 22:34:45 -03:00
|
|
|
# one baro
|
2019-06-05 21:17:00 -03:00
|
|
|
BARO MS56XX I2C:0:0x77
|
2018-05-06 10:42:30 -03:00
|
|
|
|
2019-05-29 22:34:45 -03:00
|
|
|
# no builtin compasses
|
2018-07-28 02:36:37 -03:00
|
|
|
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
|
2018-05-06 10:42:30 -03:00
|
|
|
|
|
|
|
define STORAGE_FLASH_PAGE 1
|
2018-06-23 05:00:05 -03:00
|
|
|
define HAL_STORAGE_SIZE 15360
|
2018-05-06 10:42:30 -03:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
define HAL_GPIO_A_LED_PIN 57
|
|
|
|
|
|
|
|
#To complementary channels work we define this
|
|
|
|
define STM32_PWM_USE_ADVANCED TRUE
|
|
|
|
|
|
|
|
define BOARD_PWM_COUNT_DEFAULT 6
|