mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_HAL_ChibiOS: hardware definitions for Kakute F7 Mini
This commit is contained in:
parent
8de44ec319
commit
28b866cc8f
97
libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/README.md
Normal file
97
libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/README.md
Normal file
@ -0,0 +1,97 @@
|
||||
# KakuteF7 Mini Flight Controller
|
||||
|
||||
http://www.holybro.com/product/kakute-f7-mini/
|
||||
|
||||
The KakuteF7 Mini is a flight controller produced by [Holybro](http://www.holybro.com/product/59).
|
||||
|
||||
## Features
|
||||
|
||||
- STM32F745 microcontroller
|
||||
- ICM20689 IMU
|
||||
- BMP280 barometer
|
||||
- 128Mbit dataflash
|
||||
- MAX7456 OSD
|
||||
- 6 UARTs
|
||||
- 6 PWM outputs
|
||||
|
||||
### KakuteF7 Mini Pinout
|
||||
|
||||
![KakuteF7 Mini Board](kakutef7mini.jpg "KakuteF7 Mini")
|
||||
|
||||
## UART Mapping
|
||||
|
||||
The UARTs are marked Rn and Tn in the above pinouts. The Rn pin is the
|
||||
receive pin for UARTn. The Tn pin is the transmit pin for UARTn.
|
||||
|
||||
- SERIAL0 -> USB
|
||||
- SERIAL1 -> UART1 (Telem1)
|
||||
- SERIAL2 -> UART2 (Telem2)
|
||||
- SERIAL3 -> UART3 (GPS)
|
||||
- SERIAL4 -> UART4
|
||||
- SERIAL6 -> UART6 (Transmit only, FrSky)
|
||||
- SERIAL7 -> UART7 (Receive only, ESC Telemetry)
|
||||
|
||||
## ESC Telemetry
|
||||
|
||||
The SERIAL7 port (UART7) is for ESC telemetry. It is connected through the
|
||||
motor connector and works out of the box with the [Tekko32 F3 Mini](https://shop.holybro.com/tekko32-f3-4in1-45a-mini-esc_p1132.html) which is commonly paired with this flight controller
|
||||
|
||||
## RC Input
|
||||
|
||||
RC input is configured on the R6 (UART6_RX) pin. It supports all RC protocols.
|
||||
|
||||
## FrSky Telemetry
|
||||
|
||||
FrSky Telemetry is supported using the T6 pin (UART6 transmit). You need to set the following parameters to enable support for FrSky S.PORT
|
||||
|
||||
- SERIAL6_PROTOCOL 10
|
||||
- SERIAL6_OPTIONS 7
|
||||
|
||||
## OSD Support
|
||||
|
||||
The KakuteF7 Mini supports OSD using OSD_TYPE 1 (MAX7456 driver).
|
||||
|
||||
## PWM Output
|
||||
|
||||
The KakuteF7 supports up to 6 PWM outputs. M1 to M4 are accessed via the connector. M5 and M6 are the pads shown on the above diagram. All 6 outputs support DShot as well as all PWM types.
|
||||
|
||||
The PWM is in 3 groups:
|
||||
|
||||
- PWM 1, 2 and 3 in group1
|
||||
- PWM 4 and 5 in group2
|
||||
- PWM 6 in group3
|
||||
|
||||
Channels within the same group need to use the same output rate. If
|
||||
any channel in a group uses DShot then all channels in the group need
|
||||
to use DShot.
|
||||
|
||||
## Battery Monitoring
|
||||
|
||||
The board has a builting voltage and current sensor. The current
|
||||
sensor can read up to 130 Amps. The voltage sensor can handle up to 6S
|
||||
LiPo batteries.
|
||||
|
||||
The correct battery setting parameters are:
|
||||
|
||||
- BATT_MONITOR 4
|
||||
- BATT_VOLT_PIN 13
|
||||
- BATT_CURR_PIN 12
|
||||
- BATT_VOLT_MULT 10.9
|
||||
- BATT_AMP_PERVLT 28.5
|
||||
|
||||
## Compass
|
||||
|
||||
The KakuteF7 Mini does not have a builtin compass, but you can attach an external compass using I2C on the SDA and SCL pads.
|
||||
|
||||
## Loading Firmware
|
||||
|
||||
Initial firmware load can be done with DFU by plugging in USB with the
|
||||
bootloader button pressed. Then you should load the "with_bl.hex"
|
||||
firmware, using your favourite DFU loading tool.
|
||||
|
||||
Note that this hardware has problems going into DFU mode if a GPS is connected and powered - please disconnect your GPS when flashing for the first time.
|
||||
|
||||
Once the initial firmware is loaded you can update the firmware using
|
||||
any ArduPilot ground station software. Updates should be done with the
|
||||
*.apj firmware files.
|
||||
|
7
libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/hwdef-bl.dat
Normal file
7
libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/hwdef-bl.dat
Normal file
@ -0,0 +1,7 @@
|
||||
# hw definition file for processing by chibios_pins.py
|
||||
# for Holybro KakuteF7 Mini bootloader
|
||||
|
||||
include ../KakuteF7/hwdef-bl.dat
|
||||
undef APJ_BOARD_ID
|
||||
|
||||
APJ_BOARD_ID 145
|
156
libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/hwdef.dat
Normal file
156
libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/hwdef.dat
Normal file
@ -0,0 +1,156 @@
|
||||
# hw definition file for processing by chibios_pins.py
|
||||
# for Holybro KakuteF7 Mini hardware.
|
||||
@ thanks to betaflight for pin information
|
||||
|
||||
# MCU class and specific type
|
||||
MCU STM32F7xx STM32F745xx
|
||||
|
||||
# board ID for firmware load
|
||||
APJ_BOARD_ID 145
|
||||
|
||||
# crystal frequency, setup to use external oscillator
|
||||
OSCILLATOR_HZ 8000000
|
||||
|
||||
define STM32_LSECLK 32768U
|
||||
define STM32_LSEDRV (3U << 3U)
|
||||
|
||||
define STM32_PLLSRC STM32_PLLSRC_HSE
|
||||
define STM32_PLLM_VALUE 8
|
||||
define STM32_PLLN_VALUE 432
|
||||
define STM32_PLLP_VALUE 2
|
||||
define STM32_PLLQ_VALUE 9
|
||||
|
||||
FLASH_SIZE_KB 1024
|
||||
|
||||
# leave 2 sectors free
|
||||
FLASH_RESERVE_START_KB 96
|
||||
|
||||
# board voltage
|
||||
STM32_VDD 330U
|
||||
|
||||
# only one I2C bus
|
||||
I2C_ORDER I2C1
|
||||
|
||||
# order of UARTs (and USB), USART3 should be in second place to map order with the board's silk screen
|
||||
UART_ORDER OTG1 USART3 USART1 USART2 UART4 EMPTY USART6 UART7
|
||||
|
||||
# buzzer
|
||||
PD15 TIM4_CH4 TIM4 GPIO(77) ALARM
|
||||
#PD15 BUZZER OUTPUT GPIO(80) LOW
|
||||
#define HAL_BUZZER_PIN 80
|
||||
#define HAL_BUZZER_ON 1
|
||||
#define HAL_BUZZER_OFF 0
|
||||
|
||||
# PA10 IO-debug-console
|
||||
PA11 OTG_FS_DM OTG1
|
||||
PA12 OTG_FS_DP OTG1
|
||||
|
||||
PA13 JTMS-SWDIO SWD
|
||||
PA14 JTCK-SWCLK SWD
|
||||
|
||||
# SPI1 for M25P16 dataflash
|
||||
PA4 FLASH_CS CS
|
||||
PA5 SPI1_SCK SPI1
|
||||
PA6 SPI1_MISO SPI1
|
||||
PA7 SPI1_MOSI SPI1
|
||||
|
||||
# SPI2 for MAX7456 OSD
|
||||
PB12 MAX7456_CS CS
|
||||
PB13 SPI2_SCK SPI2
|
||||
PB14 SPI2_MISO SPI2
|
||||
PB15 SPI2_MOSI SPI2
|
||||
|
||||
# SPI4 for ICM20689
|
||||
PE4 ICM20689_CS CS
|
||||
PE2 SPI4_SCK SPI4
|
||||
PE5 SPI4_MISO SPI4
|
||||
PE6 SPI4_MOSI SPI4
|
||||
|
||||
# I2C1 for baro
|
||||
PB6 I2C1_SCL I2C1
|
||||
PB7 I2C1_SDA I2C1
|
||||
|
||||
PC3 BATT_VOLTAGE_SENS ADC1 SCALE(1)
|
||||
PC2 BATT_CURRENT_SENS ADC1 SCALE(1)
|
||||
|
||||
# define default battery setup
|
||||
define HAL_BATT_VOLT_PIN 13
|
||||
define HAL_BATT_CURR_PIN 12
|
||||
define HAL_BATT_VOLT_SCALE 10.9
|
||||
define HAL_BATT_CURR_SCALE 28.5
|
||||
|
||||
PC5 RSSI_ADC ADC1
|
||||
|
||||
PA2 LED0 OUTPUT LOW
|
||||
|
||||
# USART1
|
||||
PA10 USART1_RX USART1
|
||||
PA9 USART1_TX USART1
|
||||
|
||||
# USART2
|
||||
PD5 USART2_TX USART2
|
||||
PD6 USART2_RX USART2
|
||||
|
||||
# USART3 (GPS)
|
||||
PB11 USART3_RX USART3
|
||||
PB10 USART3_TX USART3
|
||||
|
||||
# UART4 (GPS2)
|
||||
PA0 UART4_TX UART4 NODMA
|
||||
PA1 UART4_RX UART4 NODMA
|
||||
|
||||
# USART6, RX only for RCIN
|
||||
PC7 TIM8_CH2 TIM8 RCININT FLOAT LOW
|
||||
PC6 USART6_TX USART6 NODMA LOW
|
||||
|
||||
# UART7, RX only for ESC Telemetry
|
||||
PE7 UART7_RX UART7
|
||||
PE8 UART7_TX UART7 NODMA LOW
|
||||
|
||||
# Motors
|
||||
PB1 TIM1_CH3N TIM1 PWM(1) GPIO(50)
|
||||
PE9 TIM1_CH1 TIM1 PWM(2) GPIO(51)
|
||||
PE11 TIM1_CH2 TIM1 PWM(3) GPIO(52)
|
||||
PB0 TIM3_CH3 TIM3 PWM(4) GPIO(53)
|
||||
PC9 TIM3_CH4 TIM3 PWM(5) GPIO(54)
|
||||
PA3 TIM5_CH4 TIM5 PWM(6) GPIO(55)
|
||||
|
||||
# extra PWM outs
|
||||
#PD12 TIM4_CH1 TIM4 PWM(7) GPIO(56) # led pin
|
||||
#PD15 TIM4_CH4 TIM4 PWM(8) GPIO(57) # buzzer pin (need to comment out buzzer)
|
||||
|
||||
DMA_PRIORITY S*
|
||||
|
||||
define HAL_STORAGE_SIZE 16384
|
||||
define STORAGE_FLASH_PAGE 1
|
||||
|
||||
# enable logging to dataflash
|
||||
define HAL_LOGGING_DATAFLASH
|
||||
|
||||
# spi devices
|
||||
SPIDEV mpu6000 SPI4 DEVID1 ICM20689_CS MODE3 1*MHZ 4*MHZ
|
||||
SPIDEV dataflash SPI1 DEVID1 FLASH_CS MODE3 32*MHZ 32*MHZ
|
||||
SPIDEV osd SPI2 DEVID4 MAX7456_CS MODE0 10*MHZ 10*MHZ
|
||||
|
||||
# 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
|
||||
|
||||
# one IMU
|
||||
IMU Invensense SPI:mpu6000 ROTATION_YAW_180
|
||||
|
||||
# one BARO
|
||||
BARO BMP280 I2C:0:0x76
|
||||
|
||||
# setup for OSD
|
||||
define OSD_ENABLED ENABLED
|
||||
define HAL_OSD_TYPE_DEFAULT 1
|
||||
ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin
|
||||
|
||||
define BOARD_PWM_COUNT_DEFAULT 6
|
||||
define STM32_PWM_USE_ADVANCED TRUE
|
||||
|
BIN
libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/kakutef7mini.jpg
Normal file
BIN
libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/kakutef7mini.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 188 KiB |
Loading…
Reference in New Issue
Block a user