mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-26 01:33:56 -04:00
AP_HAL_ChibiOS: hwdef for BeastF7 v2
Fix undef of alt pins
This commit is contained in:
parent
f50f8c7a2a
commit
c357c1e521
@ -37,7 +37,7 @@ PA12 OTG_FS_DP OTG1
|
||||
PA13 JTMS-SWDIO SWD
|
||||
PA14 JTCK-SWCLK SWD
|
||||
|
||||
# SPI1 for BMI270
|
||||
# SPI1 for BMI270 / MPU6000
|
||||
PA4 BMI270_CS CS
|
||||
PA5 SPI1_SCK SPI1
|
||||
PA6 SPI1_MISO SPI1
|
||||
@ -113,7 +113,6 @@ define HAL_LOGGING_DATAFLASH_ENABLED 1
|
||||
|
||||
# spi devices
|
||||
SPIDEV mpu6000 SPI1 DEVID1 BMI270_CS MODE3 1*MHZ 4*MHZ
|
||||
SPIDEV bmi270 SPI1 DEVID1 BMI270_CS MODE3 10*MHZ 10*MHZ
|
||||
SPIDEV dataflash SPI3 DEVID2 FLASH_CS MODE3 32*MHZ 32*MHZ
|
||||
SPIDEV osd SPI4 DEVID4 AT7456E_CS MODE0 10*MHZ 10*MHZ
|
||||
|
||||
@ -124,13 +123,10 @@ define HAL_I2C_INTERNAL_MASK 0
|
||||
|
||||
# one IMU, v1 mpu6000 and v2 bmi270
|
||||
IMU Invensense SPI:mpu6000 ROTATION_YAW_270
|
||||
IMU BMI270 SPI:bmi270 ROTATION_ROLL_180_YAW_225
|
||||
define HAL_DEFAULT_INS_FAST_SAMPLE 1
|
||||
|
||||
# one BARO
|
||||
BARO BMP280 I2C:0:0x76
|
||||
# v2 has no BARO
|
||||
define HAL_BARO_ALLOW_INIT_NO_BARO 1
|
||||
|
||||
# setup for OSD
|
||||
define OSD_ENABLED 1
|
||||
|
87
libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/README.md
Normal file
87
libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/README.md
Normal file
@ -0,0 +1,87 @@
|
||||
# iFlight Beast F7 v2 55A AIO Flight Controller
|
||||
|
||||
https://shop.iflight-rc.com/quad-parts-cat20/electronics-cat27/beast-series-cat330/Beast-F7-45A-V2-AIO-MPU6000-25.5-25.5-Pro1625
|
||||
|
||||
The Beast F7 AIO is a flight controller produced by [iFlight](https://shop.iflight-rc.com/).
|
||||
|
||||
## Features
|
||||
|
||||
- MCU: BGA-STM32F745
|
||||
- Gyro: BMI270
|
||||
- 16Mb Onboard Flash
|
||||
- BEC output: 5V 2.5A
|
||||
- No Barometer
|
||||
- OSD: AT7456E
|
||||
- 5 UARTS: (UART1, UART2, UART3, UART4, UART7)
|
||||
- 5 PWM outputs (4 motors and 1 LED)
|
||||
|
||||
## Pinout
|
||||
|
||||

|
||||
|
||||
## 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.
|
||||
|Name|Pin|Function|
|
||||
|:-|:-|:-|
|
||||
|SERIAL1|RX1/TX1|UART1 (DJI)|
|
||||
|SERIAL2|TX2/RX2|UART2 (DJI RC Input)|
|
||||
|SERIAL3|RX3|UART3 (Telem1 / Alt RC Input/Output)|
|
||||
|SERIAL4|TX4/RX4|UART4 (GPS)|
|
||||
|SERIAL7|TX7/RX7|UART7|
|
||||
|
||||
|
||||
UART1 supports RX and TX DMA. UART2, UART3 and UART4 support RX DMA. UART7 supports TX DMA
|
||||
|
||||
## RC Input
|
||||
|
||||
RC input is configured on the (UART3_RX) pin which forms part of the DJI connector. It supports all RC protocols.
|
||||
For RC input/output use UART1 wih SERIAL1_PROTOCOL as 23 and set SERIAL3_PROTOCOL set to -1
|
||||
|
||||
## OSD Support
|
||||
|
||||
The Beast F7 AIO supports OSD using OSD_TYPE 1 (MAX7456 driver).
|
||||
|
||||
## PWM Output
|
||||
|
||||
The Beast F7 AIO supports up to 4 PWM outputs. The pads for motor output ESC1 to ESC4 on the above diagram are for the 4 outputs. All 4 outputs support DShot as well as all PWM types.
|
||||
|
||||
The PWM are in in two groups.
|
||||
|
||||
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 builtin voltage sensor. The voltage sensor can handle up to 6S
|
||||
LiPo batteries.
|
||||
|
||||
The correct battery setting parameters are:
|
||||
|
||||
- BATT_MONITOR 4
|
||||
- BATT_VOLT_PIN 12
|
||||
- BATT_VOLT_MULT around 10.9
|
||||
- BATT_CURR_PIN 13
|
||||
- BATT_CURR_MULT around 28.5
|
||||
|
||||
These are set by default in the firmware and shouldn't need to be adjusted
|
||||
|
||||
## Compass
|
||||
|
||||
The Beast F7 AIO does not have a builtin compass and you cannot attach an external compass due to the lack of an external I2C connector.
|
||||
|
||||
## NeoPixel LED
|
||||
|
||||
The board includes a NeoPixel LED on the underside which is pre-configured to output ArduPilot sequences. This is the fifth PWM output.
|
||||
|
||||
## 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.
|
||||
|
||||
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.
|
BIN
libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/beast_f7v2_pinout.JPG
Normal file
BIN
libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/beast_f7v2_pinout.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
5
libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/defaults.parm
Normal file
5
libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/defaults.parm
Normal file
@ -0,0 +1,5 @@
|
||||
# setup for LEDs on chan5
|
||||
SERVO5_FUNCTION 120
|
||||
NTF_LED_TYPES 257
|
||||
# setup SERIAL2 for RCIN
|
||||
SERIAL2_BAUD 115
|
3
libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/hwdef-bl.dat
Normal file
3
libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/hwdef-bl.dat
Normal file
@ -0,0 +1,3 @@
|
||||
include ../BeastF7/hwdef-bl.dat
|
||||
undef APJ_BOARD_ID
|
||||
APJ_BOARD_ID 1057
|
61
libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/hwdef.dat
Normal file
61
libraries/AP_HAL_ChibiOS/hwdef/BeastF7v2/hwdef.dat
Normal file
@ -0,0 +1,61 @@
|
||||
# hw definition file for processing by chibios_pins.py
|
||||
# for iFlight Beast F7 v2 hardware, based on Beast F7 v1
|
||||
# thanks to betaflight for pin information
|
||||
|
||||
include ../BeastF7/hwdef.dat
|
||||
undef APJ_BOARD_ID
|
||||
undef HAL_SERIAL3_PROTOCOL
|
||||
undef IMU
|
||||
undef BARO
|
||||
undef PD15
|
||||
undef PE9 PE11 PB8 PB9 PB11 PB10 PA10 PA9 PA3 PA2
|
||||
undef HAL_DEFAULT_INS_FAST_SAMPLE DMA_PRIORITY DMA_NOSHARE
|
||||
undef STM32_PWM_USE_ADVANCED
|
||||
undef I2C1
|
||||
|
||||
# board ID for firmware load
|
||||
APJ_BOARD_ID 1057
|
||||
|
||||
# V2 has different motor mapping
|
||||
PB4 TIM3_CH1 TIM3 PWM(2) GPIO(51) BIDIR # 2
|
||||
PB5 TIM3_CH2 TIM3 PWM(3) GPIO(52) # 3
|
||||
|
||||
# only one I2C bus
|
||||
I2C_ORDER I2C2
|
||||
|
||||
# order of UARTs (and USB)
|
||||
SERIAL_ORDER OTG1 USART1 USART2 USART3 UART4 EMPTY EMPTY UART7
|
||||
|
||||
# Buzzer - DMA timer channel use by LEDs
|
||||
PD2 BUZZER OUTPUT GPIO(80) LOW
|
||||
|
||||
# USART1 (DJI)
|
||||
PA10 USART1_RX USART1
|
||||
PA9 USART1_TX USART1 NODMA
|
||||
|
||||
# USART2 (DJI RCIN)
|
||||
PA3 USART2_RX USART2
|
||||
PA2 USART2_TX USART2 NODMA
|
||||
define HAL_SERIAL2_PROTOCOL SerialProtocol_RCIN
|
||||
|
||||
# USART3 (RCIN)
|
||||
PB11 USART3_RX USART3
|
||||
PB10 USART3_TX USART3
|
||||
|
||||
# I2C2 for compass. These pins can also be used as USART3
|
||||
PB10 I2C2_SCL I2C2 ALT(1)
|
||||
PB11 I2C2_SDA I2C2 ALT(1)
|
||||
|
||||
# spi devices
|
||||
SPIDEV bmi270 SPI1 DEVID1 BMI270_CS MODE3 10*MHZ 10*MHZ
|
||||
|
||||
DMA_PRIORITY USART1* TIM3*
|
||||
|
||||
# no built-in compass
|
||||
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
|
||||
|
||||
# one IMU
|
||||
IMU BMI270 SPI:bmi270 ROTATION_ROLL_180_YAW_225
|
||||
|
||||
# v2 has no BARO
|
||||
define HAL_BARO_ALLOW_INIT_NO_BARO 1
|
@ -2487,6 +2487,8 @@ def process_line(line):
|
||||
config.pop(u, '')
|
||||
bytype.pop(u, '')
|
||||
bylabel.pop(u, '')
|
||||
alttype.pop(u, '')
|
||||
altlabel.pop(u, '')
|
||||
# also remove all occurences of defines in previous lines if any
|
||||
for line in alllines[:]:
|
||||
if line.startswith('define') and u == line.split()[1]:
|
||||
|
Loading…
Reference in New Issue
Block a user