-
Notifications
You must be signed in to change notification settings - Fork 17.8k
/
hwdef.dat
168 lines (129 loc) · 3.52 KB
/
hwdef.dat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# hw definition file for processing by chibios_hwdef.py
# for the MicoAir743 hardware
# MCU class and specific type
MCU STM32H7xx STM32H743xx
# board ID for firmware load
APJ_BOARD_ID AP_HW_MicoAir743
# crystal frequency
OSCILLATOR_HZ 8000000
# ChibiOS system timer
STM32_ST_USE_TIMER 12
define CH_CFG_ST_RESOLUTION 16
# flash size
FLASH_SIZE_KB 2048
FLASH_RESERVE_START_KB 128
define HAL_STORAGE_SIZE 32768
STORAGE_FLASH_PAGE 14
# default to all pins low to avoid ESD issues
DEFAULTGPIO OUTPUT LOW PULLDOWN
# order of UARTs (and USB)
SERIAL_ORDER OTG1 USART1 USART2 USART3 UART4 USART6 UART7 UART8
# USB
PA11 OTG_FS_DM OTG1
PA12 OTG_FS_DP OTG1
# USART1 - TELEM1
PA9 USART1_TX USART1
PA10 USART1_RX USART1
# USART2 - DJIO3
PA2 USART2_TX USART2
PA3 USART2_RX USART2
# USART3 - GPS
PD8 USART3_TX USART3
PD9 USART3_RX USART3
# UART4 - TELEM2
PA0 UART4_TX UART4
PA1 UART4_RX UART4
# UART6 - RC_INPUT
PC6 USART6_TX USART6
PC7 USART6_RX USART6
PD0 SBUS_INV OUTPUT LOW
# UART7 - ESC
PE7 UART7_RX UART7
# UART8 - TELEM3
PE1 UART8_TX UART8
PE0 UART8_RX UART8
# SWD
PA13 JTMS-SWDIO SWD
PA14 JTCK-SWCLK SWD
# CAN
PB8 CAN1_RX CAN1
PB9 CAN1_TX CAN1
# two I2C bus
I2C_ORDER I2C2 I2C1
# I2C1 - CONNECTOR
PB6 I2C1_SCL I2C1
PB7 I2C1_SDA I2C1
# I2C2 - BARO & MAG
PB10 I2C2_SCL I2C2
PB11 I2C2_SDA I2C2
# PWM output pins
PE14 TIM1_CH4 TIM1 PWM(1) GPIO(50) BIDIR
PE13 TIM1_CH3 TIM1 PWM(2) GPIO(51)
PE11 TIM1_CH2 TIM1 PWM(3) GPIO(52) BIDIR
PE9 TIM1_CH1 TIM1 PWM(4) GPIO(53)
PB1 TIM3_CH4 TIM3 PWM(5) GPIO(54) BIDIR
PB0 TIM3_CH3 TIM3 PWM(6) GPIO(55)
PD12 TIM4_CH1 TIM4 PWM(7) GPIO(56) BIDIR
PD13 TIM4_CH2 TIM4 PWM(8) GPIO(57)
PD14 TIM4_CH3 TIM4 PWM(9) GPIO(58)
PD15 TIM4_CH4 TIM4 PWM(10) GPIO(59)
# 10 PWM available by default
define BOARD_PWM_COUNT_DEFAULT 10
# LEDs
PE5 LED_RED OUTPUT LOW GPIO(0)
PE6 LED_GREEN OUTPUT LOW GPIO(1)
PE4 LED_BLUE OUTPUT LOW GPIO(2)
define AP_NOTIFY_GPIO_LED_RGB_RED_PIN 0
define AP_NOTIFY_GPIO_LED_RGB_GREEN_PIN 1
define AP_NOTIFY_GPIO_LED_RGB_BLUE_PIN 2
define AP_NOTIFY_GPIO_LED_RGB_ENABLED 1
# ADC for Power
PC0 BATT_VOLTAGE_SENS ADC1 SCALE(1)
PC1 BATT_CURRENT_SENS ADC1 SCALE(1)
define HAL_BATT_VOLT_PIN 10
define HAL_BATT_CURR_PIN 11
define HAL_BATT_VOLT_SCALE 21.12
define HAL_BATT_CURR_SCALE 40.2
# compass
define HAL_COMPASS_DISABLE_IST8310_INTERNAL_PROBE
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
COMPASS IST8310 I2C:ALL_EXTERNAL:0x0E true ROTATION_NONE
COMPASS IST8310 I2C:ALL_INTERNAL:0x0E false ROTATION_YAW_90
# barometers
BARO DPS310 I2C:0:0x76
# microSD support
PC12 SDMMC1_CK SDMMC1
PD2 SDMMC1_CMD SDMMC1
PC8 SDMMC1_D0 SDMMC1
PC9 SDMMC1_D1 SDMMC1
PC10 SDMMC1_D2 SDMMC1
PC11 SDMMC1_D3 SDMMC1
define FATFS_HAL_DEVICE SDCD1
# SPI1 - AT7456E
PA5 SPI1_SCK SPI1
PA6 SPI1_MISO SPI1
PA7 SPI1_MOSI SPI1
PB12 AT7456E_CS CS
# SPI2 - IMUs
PD3 SPI2_SCK SPI2
PC2 SPI2_MISO SPI2
PC3 SPI2_MOSI SPI2
PD5 GYRO_CS CS
PD4 ACCEL_CS CS
PA15 BMI270_CS CS
# SPI devices
SPIDEV bmi088_a SPI2 DEVID1 ACCEL_CS MODE3 10*MHZ 10*MHZ
SPIDEV bmi088_g SPI2 DEVID2 GYRO_CS MODE3 10*MHZ 10*MHZ
SPIDEV bmi270 SPI2 DEVID3 BMI270_CS MODE3 1*MHZ 10*MHZ
SPIDEV osd SPI1 DEVID4 AT7456E_CS MODE0 10*MHZ 10*MHZ
# 2 IMUs
IMU BMI088 SPI:bmi088_a SPI:bmi088_g ROTATION_ROLL_180_YAW_270
IMU BMI270 SPI:bmi270 ROTATION_ROLL_180
# enable FAT filesystem support (needs a microSD defined via SDMMC)
define HAL_OS_FATFS_IO 1
# setup for OSD
define OSD_ENABLED 1
define HAL_OSD_TYPE_DEFAULT 1
ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin
# setup for BF migration
define HAL_FRAME_TYPE_DEFAULT 12