mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
AP_HAL_ChibiOS: hwdef for SPRacing H7RF
This commit is contained in:
parent
61e70a5fb1
commit
c4d30879d2
95
libraries/AP_HAL_ChibiOS/hwdef/SPRacingH7RF/README.md
Normal file
95
libraries/AP_HAL_ChibiOS/hwdef/SPRacingH7RF/README.md
Normal file
@ -0,0 +1,95 @@
|
||||
# Serious Pro Racing H6 Extreme Flight Controller
|
||||
|
||||
The SPRacingH7 Extreme is a flight controller produced by [Seriously Pro Racing](http://www.seriouslypro.com/).
|
||||
|
||||
## Features
|
||||
|
||||
- MCU - STM32H750 32-bit processor running at 400 MHz
|
||||
- 16MByte Serial NOR flash via QuadSPI
|
||||
- IMUs - 2x ICM20602
|
||||
- Barometer - BMP388
|
||||
- OSD - AT7456E
|
||||
- Onboard Flash: 128Mbits
|
||||
- 7x UARTs (1,2,3,4,5,6,8)
|
||||
- 11x PWM Outputs (10 Motor Output, 1 LED)
|
||||
- Battery input voltage: 2S-6S
|
||||
- BEC 5V 1A
|
||||
|
||||
## Pinout
|
||||
|
||||
![SPRacingH7 Board](SPRacingH7_Board.JPG "SPRacingH7")
|
||||
|
||||
## 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 (DMA-enabled)
|
||||
- SERIAL2 -> UART2 (RCIN one wire, DMA-enabled)
|
||||
- SERIAL3 -> UART3 (DMA-enabled)
|
||||
- SERIAL4 -> UART4 (DMA-enabled)
|
||||
- SERIAL5 -> UART5 (DMA-enabled)
|
||||
- SERIAL6 -> UART6 (On motor pads 7/8, with alt config 1, DMA-enabled)
|
||||
- SERIAL8 -> UART8 (DMA-enabled)
|
||||
|
||||
## RC Input
|
||||
|
||||
RC input is configured on the T2 (UART2_TX) pin. It supports all serial RC
|
||||
protocols. For protocols requiring half-duplex serial to transmit
|
||||
telemetry (such as FPort) you should setup SERIAL2 as an RC input serial port,
|
||||
with half-duplex, pin-swap and inversion enabled.
|
||||
|
||||
## FrSky Telemetry
|
||||
|
||||
FrSky Telemetry is supported using the T2 pin (UART2 transmit). You need to set the following parameters to enable support for FrSky S.PORT
|
||||
|
||||
- SERIAL2_PROTOCOL 10
|
||||
- SERIAL2_OPTIONS 7
|
||||
|
||||
## OSD Support
|
||||
|
||||
The SPRacingH7 supports OSD using OSD_TYPE 1 (MAX7456 driver).
|
||||
|
||||
## PWM Output
|
||||
|
||||
The SPRacingH7 supports up to 11 PWM outputs. The pads for motor output
|
||||
M1 to M4 on the motor connectors and M5 to M8 on separate pads, plus
|
||||
M11 for LED strip or another PWM output. M9 and M10 are only available on the stacking connector.
|
||||
|
||||
The PWM is in 5 groups:
|
||||
|
||||
- PWM 1-4 in group1
|
||||
- PWM 5, 6 in group2
|
||||
- PWM 7, 8 in group3
|
||||
- PWM 9, 10 in group4
|
||||
- PWM 11 in group5
|
||||
|
||||
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. Channels 1-4 support bi-directional 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 10
|
||||
- BATT_CURR_PIN 11
|
||||
- BATT_VOLT_MULT 11.1
|
||||
- BATT_AMP_PERVLT 59.5
|
||||
|
||||
## Compass
|
||||
|
||||
The SPRacingH7 does not have a builtin compass, but you can attach an external compass using I2C on the SDA and SCL pads.
|
||||
|
||||
## Loading Firmware
|
||||
|
||||
Since this board stores the flight control software on external flash the initial firmware load should be done using the
|
||||
SPRacing SSBL (https://github.com/spracing/ssbl). Please follow the instructions for loading PX4 firmware to load ArduPilot.
|
||||
A convenience script is provided Tools/scripts/ssbl_uploader.sh to perform the required steps.
|
||||
It should also be possible to load the ArduPilot bootloader via DFU, but doing so will invalidate your warranty.
|
BIN
libraries/AP_HAL_ChibiOS/hwdef/SPRacingH7RF/SPRacingH7_Board.JPG
Normal file
BIN
libraries/AP_HAL_ChibiOS/hwdef/SPRacingH7RF/SPRacingH7_Board.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 143 KiB |
10
libraries/AP_HAL_ChibiOS/hwdef/SPRacingH7RF/defaults.parm
Normal file
10
libraries/AP_HAL_ChibiOS/hwdef/SPRacingH7RF/defaults.parm
Normal file
@ -0,0 +1,10 @@
|
||||
# setup for LEDs on chan5
|
||||
SERVO11_FUNCTION 120
|
||||
NTF_LED_TYPES 257
|
||||
|
||||
# setup SERIAL2 for RCIN
|
||||
SERIAL2_BAUD 115
|
||||
SERIAL2_OPTIONS 8
|
||||
|
||||
# pinswap UART5 for ESC telemetry
|
||||
SERIAL5_OPTIONS 8
|
66
libraries/AP_HAL_ChibiOS/hwdef/SPRacingH7RF/hwdef-bl.dat
Normal file
66
libraries/AP_HAL_ChibiOS/hwdef/SPRacingH7RF/hwdef-bl.dat
Normal file
@ -0,0 +1,66 @@
|
||||
# hw definition file for processing by chibios_pins.py
|
||||
# for SP/Racing H7RF hardware.
|
||||
|
||||
# MCU class and specific type
|
||||
MCU STM32H7xx STM32H730xx
|
||||
|
||||
# board ID for firmware load
|
||||
APJ_BOARD_ID 1108
|
||||
|
||||
# crystal frequency, setup to use external oscillator
|
||||
OSCILLATOR_HZ 8000000
|
||||
|
||||
MCU_CLOCKRATE_MHZ 520
|
||||
|
||||
# limited flash that can't be used
|
||||
FLASH_SIZE_KB 128
|
||||
FLASH_RESERVE_START_KB 0
|
||||
FLASH_RESERVE_END_KB 0
|
||||
FLASH_BOOTLOADER_LOAD_KB 128
|
||||
|
||||
# 16mb external flash
|
||||
EXT_FLASH_SIZE_MB 2
|
||||
|
||||
# order of UARTs (and USB). Allow bootloading on USB and telem1
|
||||
SERIAL_ORDER OTG1 USART1
|
||||
|
||||
# USART1
|
||||
PB15 USART1_RX USART1
|
||||
PB14 USART1_TX USART1
|
||||
|
||||
# USB
|
||||
PA11 OTG_HS_DM OTG1
|
||||
PA12 OTG_HS_DP OTG1
|
||||
|
||||
# Debug
|
||||
PA13 JTMS-SWDIO SWD
|
||||
PA14 JTCK-SWCLK SWD
|
||||
|
||||
PE3 LED_BOOTLOADER OUTPUT LOW # Red LED
|
||||
define HAL_LED_ON 0
|
||||
|
||||
# OctoSPI Flash
|
||||
PD11 OCTOSPIM_P1_IO0 OCTOSPI1
|
||||
PD12 OCTOSPIM_P1_IO1 OCTOSPI1
|
||||
PE2 OCTOSPIM_P1_IO2 OCTOSPI1
|
||||
PD13 OCTOSPIM_P1_IO3 OCTOSPI1
|
||||
PE7 OCTOSPIM_P1_IO4 OCTOSPI1
|
||||
PE8 OCTOSPIM_P1_IO5 OCTOSPI1
|
||||
PE9 OCTOSPIM_P1_IO6 OCTOSPI1
|
||||
PE10 OCTOSPIM_P1_IO7 OCTOSPI1
|
||||
PB6 OCTOSPIM_P1_NCS OCTOSPI1
|
||||
PB2 OCTOSPIM_P1_CLK OCTOSPI1
|
||||
|
||||
# IFace Device Name Bus QSPI Mode Clk Freq Size (Pow2) NCS Delay
|
||||
OSPIDEV w25q OCTOSPI1 MODE3 130*MHZ 21 1
|
||||
|
||||
define HAL_USE_EMPTY_STORAGE 1
|
||||
define HAL_STORAGE_SIZE 16384
|
||||
DEFAULTGPIO OUTPUT LOW PULLDOWN
|
||||
|
||||
# Add CS pins to ensure they are high in bootloader
|
||||
PA15 ICM42688_CS CS
|
||||
PE11 PIXELOSD_CS CS
|
||||
|
||||
## pull up VTX power
|
||||
PC15 VTX_PWR OUTPUT HIGH GPIO(81)
|
180
libraries/AP_HAL_ChibiOS/hwdef/SPRacingH7RF/hwdef.dat
Normal file
180
libraries/AP_HAL_ChibiOS/hwdef/SPRacingH7RF/hwdef.dat
Normal file
@ -0,0 +1,180 @@
|
||||
# hw definition file for processing by chibios_pins.py
|
||||
# for SP/Racing Extreme H7 hardware.
|
||||
# thanks to betaflight for pin information
|
||||
|
||||
# MCU class and specific type
|
||||
MCU STM32H7xx STM32H730xx
|
||||
|
||||
# board ID for firmware load
|
||||
APJ_BOARD_ID 1108
|
||||
|
||||
# crystal frequency, setup to use external oscillator
|
||||
OSCILLATOR_HZ 8000000
|
||||
|
||||
MCU_CLOCKRATE_MHZ 520
|
||||
|
||||
env OPTIMIZE -O2
|
||||
|
||||
define HAL_WITH_EKF_DOUBLE 0
|
||||
|
||||
STM32_ST_USE_TIMER 2
|
||||
|
||||
# internal flash is off limits
|
||||
FLASH_SIZE_KB 128
|
||||
FLASH_RESERVE_START_KB 0
|
||||
define HAL_FLASH_PROTECTION 1
|
||||
|
||||
EXT_FLASH_SIZE_MB 2
|
||||
|
||||
I2C_ORDER I2C1 I2C2
|
||||
|
||||
# order of UARTs (and USB)
|
||||
SERIAL_ORDER OTG1 EMPTY USART2 USART3 UART4 UART5 EMPTY EMPTY UART8
|
||||
|
||||
# Buzzer - DMA timer channel use by LEDs
|
||||
PD7 BUZZER OUTPUT GPIO(80) LOW
|
||||
define HAL_BUZZER_PIN 80
|
||||
define HAL_BUZZER_ON 1
|
||||
define HAL_BUZZER_OFF 0
|
||||
|
||||
# USB
|
||||
PA11 OTG_HS_DM OTG1
|
||||
PA12 OTG_HS_DP OTG1
|
||||
|
||||
# Debug
|
||||
PA13 JTMS-SWDIO SWD
|
||||
PA14 JTCK-SWCLK SWD
|
||||
|
||||
# SPI2 SX1280
|
||||
# Requires a driver!
|
||||
PB12 SX1280_CS CS
|
||||
PD3 SPI2_SCK SPI2
|
||||
PB14 SPI2_MISO SPI2
|
||||
PB15 SPI2_MOSI SPI2
|
||||
|
||||
# SPI6 ICM42688
|
||||
PA15 ICM42688_CS CS
|
||||
PB3 SPI6_SCK SPI6
|
||||
PB4 SPI6_MISO SPI6
|
||||
PB5 SPI6_MOSI SPI6
|
||||
|
||||
# SPI4 for OSD
|
||||
PE11 PIXELOSD_CS CS
|
||||
PE12 SPI4_SCK SPI4
|
||||
PE13 SPI4_MISO SPI4
|
||||
PE14 SPI4_MOSI SPI4
|
||||
|
||||
# I2C1 for external MAG connection on J8, no pull-ups, external pull-ups REQUIRED
|
||||
PB8 I2C1_SCL I2C1 PULLUP
|
||||
PB9 I2C1_SDA I2C1 PULLUP
|
||||
|
||||
# I2C2 has BMP388 internally connected, 10k pull-ups
|
||||
PB10 I2C2_SCL I2C2 PULLUP
|
||||
PB11 I2C2_SDA I2C2 PULLUP
|
||||
|
||||
# ESC1 connector BATT/CURRENT
|
||||
PC3 BATT_VOLTAGE_SENS ADC2 SCALE(1)
|
||||
PC1 BATT_CURRENT_SENS ADC2 SCALE(1)
|
||||
# ESC2 connector CURRENT
|
||||
PC0 BATT_CURRENT_SENS2 ADC2 SCALE(1) # analog pin 10
|
||||
|
||||
# VTX Power control - should be high at startup to ensure power
|
||||
PC15 VTX_PWR OUTPUT HIGH GPIO(81)
|
||||
define RELAY2_PIN_DEFAULT 81
|
||||
|
||||
# define default battery setup
|
||||
define HAL_BATT_VOLT_PIN 13
|
||||
define HAL_BATT_CURR_PIN 11
|
||||
define HAL_BATT_VOLT_SCALE 10.9
|
||||
define HAL_BATT_CURR_SCALE 28.5
|
||||
define HAL_BATT_MONITOR_DEFAULT 4
|
||||
|
||||
# USART2
|
||||
PD6 USART2_RX USART2
|
||||
PD5 USART2_TX USART2
|
||||
|
||||
# USART3
|
||||
PD9 USART3_RX USART3
|
||||
PD8 USART3_TX USART3
|
||||
|
||||
# UART4
|
||||
PD0 UART4_RX UART4
|
||||
PD1 UART4_TX UART4
|
||||
|
||||
# UART5 (ESC Telem)
|
||||
PB13 UART5_TX UART5
|
||||
|
||||
# UART8
|
||||
PE0 UART8_RX UART8
|
||||
PE1 UART8_TX UART8
|
||||
|
||||
# SD card
|
||||
PC8 SDMMC1_D0 SDMMC1
|
||||
PC9 SDMMC1_D1 SDMMC1
|
||||
PC10 SDMMC1_D2 SDMMC1
|
||||
PC11 SDMMC1_D3 SDMMC1
|
||||
PC12 SDMMC1_CK SDMMC1
|
||||
PD2 SDMMC1_CMD SDMMC1
|
||||
|
||||
# OctoSPI Flash
|
||||
PD11 OCTOSPIM_P1_IO0 OCTOSPI1
|
||||
PD12 OCTOSPIM_P1_IO1 OCTOSPI1
|
||||
PE2 OCTOSPIM_P1_IO2 OCTOSPI1
|
||||
PD13 OCTOSPIM_P1_IO3 OCTOSPI1
|
||||
PE7 OCTOSPIM_P1_IO4 OCTOSPI1
|
||||
PE8 OCTOSPIM_P1_IO5 OCTOSPI1
|
||||
PE9 OCTOSPIM_P1_IO6 OCTOSPI1
|
||||
PE10 OCTOSPIM_P1_IO7 OCTOSPI1
|
||||
PB6 OCTOSPIM_P1_NCS OCTOSPI1
|
||||
PB2 OCTOSPIM_P1_CLK OCTOSPI1
|
||||
|
||||
# Motors
|
||||
// On 4in1ESC_1 (Top)
|
||||
PB0 TIM3_CH3 TIM3 PWM(1) GPIO(50) BIDIR # M1
|
||||
PB1 TIM3_CH4 TIM3 PWM(2) GPIO(51) # M1
|
||||
PA6 TIM3_CH1 TIM3 PWM(3) GPIO(52) BIDIR # M3
|
||||
PA7 TIM3_CH2 TIM3 PWM(4) GPIO(53) # M4
|
||||
|
||||
// On 4in1ESC_2 (Bottom)
|
||||
PA0 TIM5_CH1 TIM5 PWM(5) GPIO(54) BIDIR # M5
|
||||
PA1 TIM5_CH2 TIM5 PWM(6) GPIO(55) # M6
|
||||
PA2 TIM5_CH3 TIM5 PWM(7) GPIO(56) BIDIR # M7
|
||||
PA3 TIM5_CH4 TIM5 PWM(8) GPIO(57) # M8
|
||||
|
||||
// On
|
||||
PB7 TIM17_CH1N TIM17 PWM(9) GPIO(58) # LED
|
||||
|
||||
# Red LED
|
||||
PE5 LED0 OUTPUT LOW GPIO(90)
|
||||
PE6 LED1 OUTPUT LOW GPIO(91)
|
||||
|
||||
# spi devices
|
||||
SPIDEV icm42688 SPI6 DEVID1 ICM42688_CS MODE3 2*MHZ 16*MHZ
|
||||
#SPIDEV osd SPI4 DEVID4 PIXELOSD_CS MODE0 10*MHZ 10*MHZ
|
||||
#SPIDEV radio SPI2 DEVID1 SX1280_CS MODE0 10*MHZ 10*MHZ
|
||||
|
||||
DMA_PRIORITY SPI6* SPI2* TIM3*
|
||||
|
||||
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
|
||||
define ALLOW_ARM_NO_COMPASS
|
||||
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
|
||||
define HAL_I2C_INTERNAL_MASK 2
|
||||
|
||||
IMU Invensense SPI:icm42688 ROTATION_YAW_90
|
||||
define HAL_DEFAULT_INS_FAST_SAMPLE 1
|
||||
|
||||
# one BARO
|
||||
BARO BMP388 I2C:1:0x76
|
||||
|
||||
# setup for OSD
|
||||
#define OSD_ENABLED 1
|
||||
#define HAL_OSD_TYPE_DEFAULT 1
|
||||
#ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin
|
||||
|
||||
define HAL_OS_FATFS_IO 1
|
||||
define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS"
|
||||
define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN"
|
||||
|
||||
define BOARD_PWM_COUNT_DEFAULT 9
|
||||
|
||||
define HAL_STORAGE_SIZE 16384
|
Loading…
Reference in New Issue
Block a user