From f83ba7195d17be627a7bf17b992b2049c5df0a0a Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Tue, 12 Nov 2024 16:53:30 -0900 Subject: [PATCH 1/6] AP_HAL_ChibiOS: hwdef: ARK_FPV board support --- .../AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat | 75 ++++++ .../AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat | 253 ++++++++++++++++++ 2 files changed, 328 insertions(+) create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat new file mode 100644 index 0000000000000..e7f8ce5f0d530 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat @@ -0,0 +1,75 @@ +# hw definition file for processing by chibios_hwdef.py +# for the ARKV6X hardware + +# MCU class and specific type +MCU STM32H7xx STM32H743xx + +# crystal frequency +OSCILLATOR_HZ 16000000 + +# board ID for firmware load +APJ_BOARD_ID 59 + +# bootloader is installed at zero offset +FLASH_RESERVE_START_KB 0 + +# the location where the bootloader will put the firmware +FLASH_BOOTLOADER_LOAD_KB 128 + +# flash size +FLASH_SIZE_KB 2048 + +env OPTIMIZE -Os + +# order of UARTs (and USB) +SERIAL_ORDER OTG1 UART7 UART5 USART3 + +# USB +PA11 OTG_FS_DM OTG1 +PA12 OTG_FS_DP OTG1 +PA9 VBUS INPUT OPENDRAIN + +# pins for SWD debugging +PA13 JTMS-SWDIO SWD +PA14 JTCK-SWCLK SWD + +# CS pins + +# ICM20602 +PI9 IMU1_CS CS +# BMMI088 Accel +PI4 BMI088_A_CS CS +# BMMI088 Gyro +PI8 BMI088_G_CS CS +# Unused +# PG7 FRAM_CS CS +PI10 EXT1_CS CS + +# telem1 +PE8 UART7_TX UART7 +PF6 UART7_RX UART7 + +# telem2 +PC12 UART5_TX UART5 +PD2 UART5_RX UART5 + +# debug uart +PD8 USART3_TX USART3 +PD9 USART3_RX USART3 + +# armed indication +PE6 nARMED OUTPUT HIGH + +# 12V peripheral enable +PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH + +# LEDs +PE3 LED_ACTIVITY OUTPUT OPENDRAIN HIGH # red +PE5 LED_BOOTLOADER OUTPUT OPENDRAIN HIGH # blue +define HAL_LED_ON 0 + +define HAL_USE_EMPTY_STORAGE 1 +define HAL_STORAGE_SIZE 16384 + +# enable DFU by default +ENABLE_DFU_BOOT 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat new file mode 100644 index 0000000000000..936bb5a773362 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat @@ -0,0 +1,253 @@ +# hw definition file for processing by chibios_hwdef.py +# for the ARK FPV hardware + +# MCU class and specific type +MCU STM32H7xx STM32H743xx + +# crystal frequency +OSCILLATOR_HZ 16000000 + +# TODO: changing clockrate causes the build to fail +# MCU_CLOCKRATE_MHZ 320 + +# ChibiOS system timer +STM32_ST_USE_TIMER 2 + +# board ID for firmware load +APJ_BOARD_ID 59 + +# flash size +FLASH_SIZE_KB 2048 + +# bootloader takes first sector +FLASH_RESERVE_START_KB 128 + +# use last 2 pages for flash storage +# H743 has 16 pages of 128k each +define HAL_STORAGE_SIZE 32768 +STORAGE_FLASH_PAGE 14 + +# to be compatible with the px4 bootloader we need +# to use a different RAM_MAP +env USE_ALT_RAM_MAP 1 + +env OPTIMIZE -O2 + +SERIAL_ORDER OTG1 UART7 UART5 USART1 USART2 UART4 USART6 OTG2 + +# debug console +STDOUT_SERIAL SD3 +STDOUT_BAUDRATE 57600 + +# default to all pins low to avoid ESD issues +DEFAULTGPIO OUTPUT LOW PULLDOWN + +# USB +PA11 OTG_FS_DM OTG1 +PA12 OTG_FS_DP OTG1 +PA9 VBUS INPUT OPENDRAIN + +# pins for SWD debugging +PA13 JTMS-SWDIO SWD +PA14 JTCK-SWCLK SWD + +# telem1 +PE8 UART7_TX UART7 +PF6 UART7_RX UART7 +PF8 UART7_RTS UART7 +PE10 UART7_CTS UART7 + +# telem2 +PC8 UART5_RTS UART5 +PC9 UART5_CTS UART5 +PC12 UART5_TX UART5 +PD2 UART5_RX UART5 + +# telem3 +PA3 USART2_RX USART2 +PD5 USART2_TX USART2 +PD3 USART2_CTS USART2 +PD4 USART2_RTS USART2 + +# GPS1 +PB6 USART1_TX USART1 +PB7 USART1_RX USART1 + +# uart4 +PH13 UART4_TX UART4 +PH14 UART4_RX UART4 + +# debug uart +PD8 USART3_TX USART3 +PD9 USART3_RX USART3 + +# used for RC SBUS +PC6 USART6_TX USART6 +PC7 USART6_RX USART6 + +# ADCs +PA0 SCALED1_V3V3 ADC1 SCALE(2) +PB1 VDD_5V_SENS ADC1 SCALE(2) + +# TODO: 12V +# PA4 SCALED2_V3V3 ADC1 SCALE(2) + +PB0 BATT_VOLTAGE_SENS ADC1 SCALE(1) +PC2 BATT_CURRENT_SENS ADC1 SCALE(1) + +# Now setup the default battery pins driver analog pins and default +# scaling for the power brick. +# See STM32H743xx.py +define HAL_BATT_VOLT_PIN 9 +define HAL_BATT_CURR_PIN 12 +define HAL_BATT_VOLT_SCALE 21 +define HAL_BATT_CURR_SCALE 120 + +# ESC Telem on UART4 +define HAL_SERIAL_ESC_COMM_ENABLED 1 +define HAL_WITH_ESC_TELEM 1 +define DEFAULT_SERIAL4_PROTOCOL SerialProtocol_ESCTelemetry + +# SPI1 - IIM42653 +PA5 SPI1_SCK SPI1 +PB5 SPI1_MOSI SPI1 +PG9 SPI1_MISO SPI1 +PI9 IMU1_CS CS +PF2 IMU1_DRDY INPUT + +# SPI6 - external1 +PB3 SPI6_SCK SPI6 +PA6 SPI6_MISO SPI6 +PG14 SPI6_MOSI SPI6 +PI10 EXT1_CS CS +PD11 DRDY_ADIS16507 INPUT GPIO(93) + +# use GPIO(93) for data ready on ADIS16507 +#define ADIS_DRDY_PIN 93 + +# PWM output pins +PI0 TIM5_CH4 TIM5 PWM(1) GPIO(50) +PH12 TIM5_CH3 TIM5 PWM(2) GPIO(51) +PH11 TIM5_CH2 TIM5 PWM(3) GPIO(52) +PH10 TIM5_CH1 TIM5 PWM(4) GPIO(53) +PI5 TIM8_CH1 TIM8 PWM(5) GPIO(54) +PI6 TIM8_CH2 TIM8 PWM(6) GPIO(55) +PI7 TIM8_CH3 TIM8 PWM(7) GPIO(56) +PI2 TIM8_CH4 TIM8 PWM(8) GPIO(57) +PD12 TIM4_CH1 TIM4 PWM(9) GPIO(58) + +# CAN bus +PD0 CAN1_RX CAN1 +PD1 CAN1_TX CAN1 + +# I2C1 (GPS1 compass, external) +PB9 I2C1_SDA I2C1 +PB8 I2C1_SCL I2C1 + +# I2C2 (BMP390 baro, internal) +PF1 I2C2_SCL I2C2 +PF0 I2C2_SDA I2C2 + +# I2C4 (IIS2MDC compass, internal) +PF14 I2C4_SCL I2C4 +PF15 I2C4_SDA I2C4 + +# order of I2C buses +I2C_ORDER I2C1 I2C2 I2C4 +define HAL_I2C_INTERNAL_MASK 6 + +# IMU heater +PB10 HEATER_EN OUTPUT LOW GPIO(80) +define HAL_HEATER_GPIO_PIN 80 +define HAL_HAVE_IMU_HEATER 1 +define HAL_IMU_TEMP_DEFAULT 45 +define HAL_IMUHEAT_P_DEFAULT 50 +define HAL_IMUHEAT_I_DEFAULT 0.07 +# TODO: should we use this? +# define HAL_IMU_TEMP_MARGIN_LOW_DEFAULT 5 + +# armed indication +PE6 nARMED OUTPUT HIGH + +# power enable pins +PC13 VDD_3V3_SD_CARD_EN OUTPUT HIGH +PI11 VDD_3V3_SENSORS1_EN OUTPUT HIGH + +# start peripheral power off, then enable after init +# this prevents a problem with radios that use RTS for +# bootloader hold +# 12V EN +PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH + +# power sensing +PE15 VDD_5V_PERIPH_nOC INPUT PULLUP +PF13 VDD_5V_HIPOWER_nOC INPUT PULLUP +PG1 VDD_BRICK_nVALID INPUT PULLUP + +# microSD support +PD6 SDMMC2_CK SDMMC2 +PD7 SDMMC2_CMD SDMMC2 +PB14 SDMMC2_D0 SDMMC2 +PB15 SDMMC2_D1 SDMMC2 +PG11 SDMMC2_D2 SDMMC2 +PB4 SDMMC2_D3 SDMMC2 +define FATFS_HAL_DEVICE SDCD2 + +# LEDs +PE3 LED_RED OUTPUT OPENDRAIN GPIO(90) HIGH +PE4 LED_GREEN OUTPUT OPENDRAIN GPIO(91) HIGH +PE5 LED_BLUE OUTPUT OPENDRAIN GPIO(92) HIGH +define AP_NOTIFY_GPIO_LED_RGB_RED_PIN 90 +define AP_NOTIFY_GPIO_LED_RGB_GREEN_PIN 91 +define AP_NOTIFY_GPIO_LED_RGB_BLUE_PIN 92 +define AP_NOTIFY_GPIO_LED_RGB_ENABLED 1 + +# ID pins +PG0 HW_VER_REV_DRIVE OUTPUT LOW +# PH3 HW_VER_SENS ADC3 SCALE(1) +# PH4 HW_REV_SENS ADC3 SCALE(1) + +# PWM output for buzzer +PF9 TIM14_CH1 TIM14 GPIO(77) ALARM + +# barometer on i2c_2 +BARO BMP388 I2C:1:0x76 + +# compass +define HAL_PROBE_EXTERNAL_I2C_COMPASSES + +# builtin compass +COMPASS IIS2MDC I2C:2:0x1E false ROTATION_NONE + +# IIM42653 on SPI1 +SPIDEV iim42653 SPI1 DEVID1 IMU1_CS MODE3 2*MHZ 8*MHZ +#SPIDEV adis16507 SPI6 DEVID1 EXT1_CS MODE3 1*MHZ 2*MHZ + +# IIM42653 IMU +IMU Invensensev3 SPI:iim42653 ROTATION_YAW_270 +# IMU Invensensev3 SPI:iim42652 ROTATION_YAW_270 +#IMU ADIS1647x SPI:adis16507 ROTATION_NONE ADIS_DRDY_PIN + +define HAL_DEFAULT_INS_FAST_SAMPLE 1 + +# analog voltage and current +define HAL_BATT_MONITOR_DEFAULT 4 + +DMA_PRIORITY SDMMC* USART6* ADC* UART* USART* SPI* TIM* + +# enable FAT filesystem support (needs a microSD defined via SDMMC) +define HAL_OS_FATFS_IO 1 + +# ROMFS io_firmware.bin Tools/IO_Firmware/iofirmware_lowpolh.bin + +# enable DFU reboot for installing bootloader +# note that if firmware is build with --secure-bl then DFU is +# disabled +ENABLE_DFU_BOOT 1 + +# bootloader embedding / bootloader flashing not available +define AP_BOOTLOADER_FLASHING_ENABLED 0 + +# setup for OSD +define OSD_ENABLED 1 +define HAL_OSD_TYPE_DEFAULT 5 # MSP Displayport From 6eb60814f903661fb9a816c14162ceab6bf177b1 Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Wed, 11 Dec 2024 15:44:22 -0900 Subject: [PATCH 2/6] added common.inc, added README --- .../AP_HAL_ChibiOS/hwdef/ARK_FPV/README.md | 87 +++++++++++ .../AP_HAL_ChibiOS/hwdef/ARK_FPV/common.inc | 32 +++++ .../AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat | 49 ++----- .../AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat | 135 ++++++------------ 4 files changed, 175 insertions(+), 128 deletions(-) create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/README.md create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/common.inc diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/README.md b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/README.md new file mode 100644 index 0000000000000..46a30e8d77700 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/README.md @@ -0,0 +1,87 @@ +# ARK FPV Flight Controller + +https://arkelectron.com/product/ark-fpv-flight-controller/ + + +## Features +#### Processor +- STM32H743 32-bit processor +- 480MHz +- 2MB Flash +- 1MB RAM +#### Sensors +- Invensense IIM-42653 Industrial IMU with heater resistor +- Bosch BMP390 Barometer +- ST IIS2MDC Magnetometer +#### Power +- 5.5V - 54V (2S - 12S) input +- 12V, 2A output +- 5V, 2A output. 300ma for main system, 200ma for heater +#### Interfaces +- **Micro SD** +- **USB-C** + - VBUS In, USB +- **PWM** + - VBAT In, Analog Current Input, Telem RX, 4x PWM and Bidirectional-DSHOT capable + - JST-GH 8 Pin +- **PWM EXTRA** + - 5x PWM and Bidirectional-DSHOT capable + - JST-SH 6 Pin +- **RC Input** + - 5V Out, UART + - JST-GH 4 Pin +- **POWER AUX** + - 12V Out, VBAT In/Out + - JST-GH 3 Pin +- **TELEM** + - 5V Out, UART with flow control + - JST-GH 6 Pin +- **GPS** + - 5V Out, UART, I2C + - JST-GH 6 Pin +- **CAN** + - 5V Out, CAN + - JST-GH 4 Pin +- **VTX** + - 12V Out, UART TX/RX, UART RX + - JST-GH 6 Pin +- **SPI** (OSD or External IMU) + - 5V Out, SPI + - JST-SH 8 Pin +- **DEBUG** + - 3.3V Out, UART, SWD + - JST-SH 6 Pin + +##### Dimensions +- Size: 3.6 × 3.6 × 0.8 cm +- Weight: 7.5g with MicroSD card + +## Pinout +TODO + +## UART Mapping + +|Name|Function| +|:-|:-| +|SERIAL0|USB| +|SERIAL1|UART7 (Telem)| +|SERIAL2|UART5 (VTX - DJI Air Unit, RX/TXT)| +|SERIAL3|USART1 (GPS1)| +|SERIAL4|USART2 (VTX - DJI Air Unit, RX only)| +|SERIAL5|UART4 (ESC Telem, RX only)| +|SERIAL6|USART6 (RC Input)| +|SERIAL7|OTG2 (SLCAN)| + +All UARTS support DMA. + +## OSD Support + +This flight controller has an MSP-DisplayPort output on a 6-pin DJI-compatible JST SH. + +## Motor Output + +Motors 1-8 are capable of Bidirectional-DSHOT and PWM. + +All outputs in the motor groups below must be either PWM or DShot: +Motors 1-4 Group1 (TIM5) +Motors 5-8 Group2 (TIM8) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/common.inc b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/common.inc new file mode 100644 index 0000000000000..700a76bf47f3a --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/common.inc @@ -0,0 +1,32 @@ +# MCU class and specific type +MCU STM32H7xx STM32H743xx + +# board ID for firmware load +APJ_BOARD_ID 59 + +# crystal frequency +OSCILLATOR_HZ 16000000 + +# 480Hz is only value support on H7 +# MCU_CLOCKRATE_MHZ 320 + +# flash size +FLASH_SIZE_KB 2048 + +# enable DFU reboot for installing bootloader +# note that if firmware is build with --secure-bl then DFU is +# disabled +ENABLE_DFU_BOOT 1 + +# USB +PA11 OTG_FS_DM OTG1 +PA12 OTG_FS_DP OTG1 +PA9 VBUS INPUT OPENDRAIN + +# SWD +PA13 JTMS-SWDIO SWD +PA14 JTCK-SWCLK SWD + +# debug uart +PD8 USART3_TX USART3 +PD9 USART3_RX USART3 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat index e7f8ce5f0d530..bdde76cb59ad3 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat @@ -1,14 +1,6 @@ -# hw definition file for processing by chibios_hwdef.py -# for the ARKV6X hardware +# processed by chibios_hwdef.py -# MCU class and specific type -MCU STM32H7xx STM32H743xx - -# crystal frequency -OSCILLATOR_HZ 16000000 - -# board ID for firmware load -APJ_BOARD_ID 59 +include common.inc # bootloader is installed at zero offset FLASH_RESERVE_START_KB 0 @@ -16,46 +8,26 @@ FLASH_RESERVE_START_KB 0 # the location where the bootloader will put the firmware FLASH_BOOTLOADER_LOAD_KB 128 -# flash size -FLASH_SIZE_KB 2048 - env OPTIMIZE -Os # order of UARTs (and USB) SERIAL_ORDER OTG1 UART7 UART5 USART3 -# USB -PA11 OTG_FS_DM OTG1 -PA12 OTG_FS_DP OTG1 -PA9 VBUS INPUT OPENDRAIN - -# pins for SWD debugging -PA13 JTMS-SWDIO SWD -PA14 JTCK-SWCLK SWD - # CS pins - -# ICM20602 +# SPI1 - IIM42653 PI9 IMU1_CS CS -# BMMI088 Accel -PI4 BMI088_A_CS CS -# BMMI088 Gyro -PI8 BMI088_G_CS CS -# Unused -# PG7 FRAM_CS CS +# SPI6 - external PI10 EXT1_CS CS # telem1 -PE8 UART7_TX UART7 -PF6 UART7_RX UART7 +PE8 UART7_TX UART7 +PF6 UART7_RX UART7 +PF8 UART7_RTS UART7 +PE10 UART7_CTS UART7 # telem2 PC12 UART5_TX UART5 -PD2 UART5_RX UART5 - -# debug uart -PD8 USART3_TX USART3 -PD9 USART3_RX USART3 +PD2 UART5_RX UART5 # armed indication PE6 nARMED OUTPUT HIGH @@ -70,6 +42,3 @@ define HAL_LED_ON 0 define HAL_USE_EMPTY_STORAGE 1 define HAL_STORAGE_SIZE 16384 - -# enable DFU by default -ENABLE_DFU_BOOT 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat index 936bb5a773362..e6b743945a884 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat @@ -1,23 +1,10 @@ -# hw definition file for processing by chibios_hwdef.py -# for the ARK FPV hardware +# processed by chibios_hwdef.py -# MCU class and specific type -MCU STM32H7xx STM32H743xx - -# crystal frequency -OSCILLATOR_HZ 16000000 - -# TODO: changing clockrate causes the build to fail -# MCU_CLOCKRATE_MHZ 320 +include common.inc # ChibiOS system timer STM32_ST_USE_TIMER 2 -# board ID for firmware load -APJ_BOARD_ID 59 - -# flash size -FLASH_SIZE_KB 2048 # bootloader takes first sector FLASH_RESERVE_START_KB 128 @@ -42,46 +29,29 @@ STDOUT_BAUDRATE 57600 # default to all pins low to avoid ESD issues DEFAULTGPIO OUTPUT LOW PULLDOWN -# USB -PA11 OTG_FS_DM OTG1 -PA12 OTG_FS_DP OTG1 -PA9 VBUS INPUT OPENDRAIN - -# pins for SWD debugging -PA13 JTMS-SWDIO SWD -PA14 JTCK-SWCLK SWD - -# telem1 -PE8 UART7_TX UART7 -PF6 UART7_RX UART7 -PF8 UART7_RTS UART7 +# Telem1 - Telem +PE8 UART7_TX UART7 +PF6 UART7_RX UART7 +PF8 UART7_RTS UART7 PE10 UART7_CTS UART7 -# telem2 -PC8 UART5_RTS UART5 -PC9 UART5_CTS UART5 +# Telem2 - VTX (DJI Air Unit) PC12 UART5_TX UART5 -PD2 UART5_RX UART5 - -# telem3 -PA3 USART2_RX USART2 -PD5 USART2_TX USART2 -PD3 USART2_CTS USART2 -PD4 USART2_RTS USART2 +PD2 UART5_RX UART5 # GPS1 PB6 USART1_TX USART1 PB7 USART1_RX USART1 -# uart4 +# Telem3 - VTX (DJI Air Unit, RX only) +PA3 USART2_RX USART2 +PD5 USART2_TX USART2 + +# ESC telem RX only PH13 UART4_TX UART4 PH14 UART4_RX UART4 -# debug uart -PD8 USART3_TX USART3 -PD9 USART3_RX USART3 - -# used for RC SBUS +# RC Input PC6 USART6_TX USART6 PC7 USART6_RX USART6 @@ -95,27 +65,27 @@ PB1 VDD_5V_SENS ADC1 SCALE(2) PB0 BATT_VOLTAGE_SENS ADC1 SCALE(1) PC2 BATT_CURRENT_SENS ADC1 SCALE(1) -# Now setup the default battery pins driver analog pins and default -# scaling for the power brick. +# Analog battery input scaling # See STM32H743xx.py define HAL_BATT_VOLT_PIN 9 define HAL_BATT_CURR_PIN 12 define HAL_BATT_VOLT_SCALE 21 define HAL_BATT_CURR_SCALE 120 +define HAL_BATT_MONITOR_DEFAULT 4 # ESC Telem on UART4 define HAL_SERIAL_ESC_COMM_ENABLED 1 define HAL_WITH_ESC_TELEM 1 define DEFAULT_SERIAL4_PROTOCOL SerialProtocol_ESCTelemetry -# SPI1 - IIM42653 +# SPI1 - IIM42653 IMU PA5 SPI1_SCK SPI1 PB5 SPI1_MOSI SPI1 PG9 SPI1_MISO SPI1 PI9 IMU1_CS CS PF2 IMU1_DRDY INPUT -# SPI6 - external1 +# SPI6 - external PB3 SPI6_SCK SPI6 PA6 SPI6_MISO SPI6 PG14 SPI6_MOSI SPI6 @@ -123,22 +93,25 @@ PI10 EXT1_CS CS PD11 DRDY_ADIS16507 INPUT GPIO(93) # use GPIO(93) for data ready on ADIS16507 -#define ADIS_DRDY_PIN 93 - -# PWM output pins -PI0 TIM5_CH4 TIM5 PWM(1) GPIO(50) -PH12 TIM5_CH3 TIM5 PWM(2) GPIO(51) -PH11 TIM5_CH2 TIM5 PWM(3) GPIO(52) -PH10 TIM5_CH1 TIM5 PWM(4) GPIO(53) -PI5 TIM8_CH1 TIM8 PWM(5) GPIO(54) -PI6 TIM8_CH2 TIM8 PWM(6) GPIO(55) -PI7 TIM8_CH3 TIM8 PWM(7) GPIO(56) -PI2 TIM8_CH4 TIM8 PWM(8) GPIO(57) +# define ADIS_DRDY_PIN 93 + +# Motors +PI0 TIM5_CH4 TIM5 PWM(1) GPIO(50) BIDIR +PH12 TIM5_CH3 TIM5 PWM(2) GPIO(51) BIDIR +PH11 TIM5_CH2 TIM5 PWM(3) GPIO(52) BIDIR +PH10 TIM5_CH1 TIM5 PWM(4) GPIO(53) BIDIR +PI5 TIM8_CH1 TIM8 PWM(5) GPIO(54) BIDIR +PI6 TIM8_CH2 TIM8 PWM(6) GPIO(55) BIDIR +PI7 TIM8_CH3 TIM8 PWM(7) GPIO(56) BIDIR +PI2 TIM8_CH4 TIM8 PWM(8) GPIO(57) BIDIR PD12 TIM4_CH1 TIM4 PWM(9) GPIO(58) +# PWM output for buzzer +PF9 TIM14_CH1 TIM14 GPIO(77) ALARM + # CAN bus -PD0 CAN1_RX CAN1 -PD1 CAN1_TX CAN1 +PD0 CAN1_RX CAN1 +PD1 CAN1_TX CAN1 # I2C1 (GPS1 compass, external) PB9 I2C1_SDA I2C1 @@ -173,18 +146,17 @@ PE6 nARMED OUTPUT HIGH PC13 VDD_3V3_SD_CARD_EN OUTPUT HIGH PI11 VDD_3V3_SENSORS1_EN OUTPUT HIGH -# start peripheral power off, then enable after init +# (12V EN) start peripheral power off, then enable after init # this prevents a problem with radios that use RTS for # bootloader hold -# 12V EN -PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH +PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH # power sensing PE15 VDD_5V_PERIPH_nOC INPUT PULLUP PF13 VDD_5V_HIPOWER_nOC INPUT PULLUP PG1 VDD_BRICK_nVALID INPUT PULLUP -# microSD support +# MicroSD PD6 SDMMC2_CK SDMMC2 PD7 SDMMC2_CMD SDMMC2 PB14 SDMMC2_D0 SDMMC2 @@ -207,43 +179,30 @@ PG0 HW_VER_REV_DRIVE OUTPUT LOW # PH3 HW_VER_SENS ADC3 SCALE(1) # PH4 HW_REV_SENS ADC3 SCALE(1) -# PWM output for buzzer -PF9 TIM14_CH1 TIM14 GPIO(77) ALARM - -# barometer on i2c_2 +# Barometer on i2c_2 BARO BMP388 I2C:1:0x76 -# compass -define HAL_PROBE_EXTERNAL_I2C_COMPASSES - -# builtin compass +# Compass COMPASS IIS2MDC I2C:2:0x1E false ROTATION_NONE +define HAL_PROBE_EXTERNAL_I2C_COMPASSES -# IIM42653 on SPI1 +# IIM42653 IMU on SPI1 SPIDEV iim42653 SPI1 DEVID1 IMU1_CS MODE3 2*MHZ 8*MHZ -#SPIDEV adis16507 SPI6 DEVID1 EXT1_CS MODE3 1*MHZ 2*MHZ - -# IIM42653 IMU IMU Invensensev3 SPI:iim42653 ROTATION_YAW_270 -# IMU Invensensev3 SPI:iim42652 ROTATION_YAW_270 -#IMU ADIS1647x SPI:adis16507 ROTATION_NONE ADIS_DRDY_PIN + +# SPI6 external bus +# SPIDEV adis16507 SPI6 DEVID1 EXT1_CS MODE3 1*MHZ 2*MHZ +# IMU ADIS1647x SPI:adis16507 ROTATION_NONE ADIS_DRDY_PIN define HAL_DEFAULT_INS_FAST_SAMPLE 1 -# analog voltage and current -define HAL_BATT_MONITOR_DEFAULT 4 +DMA_PRIORITY SDMMC* SPI* -DMA_PRIORITY SDMMC* USART6* ADC* UART* USART* SPI* TIM* +DMA_NOSHARE SPI* TIM5* TIM8* # enable FAT filesystem support (needs a microSD defined via SDMMC) define HAL_OS_FATFS_IO 1 -# ROMFS io_firmware.bin Tools/IO_Firmware/iofirmware_lowpolh.bin - -# enable DFU reboot for installing bootloader -# note that if firmware is build with --secure-bl then DFU is -# disabled -ENABLE_DFU_BOOT 1 # bootloader embedding / bootloader flashing not available define AP_BOOTLOADER_FLASHING_ENABLED 0 From 5df3d64c0c69e6bbb642db7cc470062886bc6d36 Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Wed, 11 Dec 2024 16:12:48 -0900 Subject: [PATCH 3/6] added defaults.parm --- .../hwdef/ARK_FPV/defaults.parm | 17 +++++++++ .../AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat | 16 ++++----- .../AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat | 35 +++++++++---------- 3 files changed, 40 insertions(+), 28 deletions(-) create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/defaults.parm diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/defaults.parm new file mode 100644 index 0000000000000..834a26c016aac --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/defaults.parm @@ -0,0 +1,17 @@ +# CAN +CAN_P1_DRIVER 1 # Enables the use of CAN + +# Onboard OSD +OSD_TYPE 5 # MSP +OSD_CELL_COUNT 0 # auto based on voltage at start + +# Serial ports +SERIAL1_PROTOCOL 2 # Mavlink +SERIAL2_PROTOCOL 42 # DisplayPort +SERIAL3_PROTOCOL 5 # GPS +SERIAL4_PROTOCOL 0 # TODO: DJI HDL? +SERIAL5_PROTOCOL 16 # ESC telemetry +SERIAL6_PROTOCOL 23 # RCIN +SERIAL7_PROTOCOL 22 # SLCAN + + diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat index bdde76cb59ad3..5e96b7c25a9ee 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat @@ -1,16 +1,15 @@ -# processed by chibios_hwdef.py +# Processed by chibios_hwdef.py include common.inc -# bootloader is installed at zero offset +# Bootloader is installed at zero offset FLASH_RESERVE_START_KB 0 -# the location where the bootloader will put the firmware +# Location where the bootloader will put the firmware FLASH_BOOTLOADER_LOAD_KB 128 env OPTIMIZE -Os -# order of UARTs (and USB) SERIAL_ORDER OTG1 UART7 UART5 USART3 # CS pins @@ -19,17 +18,13 @@ PI9 IMU1_CS CS # SPI6 - external PI10 EXT1_CS CS -# telem1 +# Telem1 - Telem PE8 UART7_TX UART7 PF6 UART7_RX UART7 PF8 UART7_RTS UART7 PE10 UART7_CTS UART7 -# telem2 -PC12 UART5_TX UART5 -PD2 UART5_RX UART5 - -# armed indication +# Armed indication PE6 nARMED OUTPUT HIGH # 12V peripheral enable @@ -40,5 +35,6 @@ PE3 LED_ACTIVITY OUTPUT OPENDRAIN HIGH # red PE5 LED_BOOTLOADER OUTPUT OPENDRAIN HIGH # blue define HAL_LED_ON 0 +# No param flash storage for bootloader define HAL_USE_EMPTY_STORAGE 1 define HAL_STORAGE_SIZE 16384 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat index e6b743945a884..17eadb388d260 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat @@ -1,20 +1,19 @@ -# processed by chibios_hwdef.py +# Processed by chibios_hwdef.py include common.inc # ChibiOS system timer STM32_ST_USE_TIMER 2 - -# bootloader takes first sector +# Bootloader takes first sector FLASH_RESERVE_START_KB 128 -# use last 2 pages for flash storage +# Use last 2 pages for flash storage # H743 has 16 pages of 128k each define HAL_STORAGE_SIZE 32768 STORAGE_FLASH_PAGE 14 -# to be compatible with the px4 bootloader we need +# To be compatible with the px4 bootloader we need # to use a different RAM_MAP env USE_ALT_RAM_MAP 1 @@ -22,11 +21,11 @@ env OPTIMIZE -O2 SERIAL_ORDER OTG1 UART7 UART5 USART1 USART2 UART4 USART6 OTG2 -# debug console +# Debug console STDOUT_SERIAL SD3 STDOUT_BAUDRATE 57600 -# default to all pins low to avoid ESD issues +# Default to all pins low to avoid ESD issues DEFAULTGPIO OUTPUT LOW PULLDOWN # Telem1 - Telem @@ -58,8 +57,7 @@ PC7 USART6_RX USART6 # ADCs PA0 SCALED1_V3V3 ADC1 SCALE(2) PB1 VDD_5V_SENS ADC1 SCALE(2) - -# TODO: 12V +# TODO: 12V monitor # PA4 SCALED2_V3V3 ADC1 SCALE(2) PB0 BATT_VOLTAGE_SENS ADC1 SCALE(1) @@ -85,14 +83,14 @@ PG9 SPI1_MISO SPI1 PI9 IMU1_CS CS PF2 IMU1_DRDY INPUT -# SPI6 - external +# SPI6 - external (SPI OSD or IMU) PB3 SPI6_SCK SPI6 PA6 SPI6_MISO SPI6 PG14 SPI6_MOSI SPI6 PI10 EXT1_CS CS PD11 DRDY_ADIS16507 INPUT GPIO(93) -# use GPIO(93) for data ready on ADIS16507 +# GPIO(93) for data ready on ADIS16507 # define ADIS_DRDY_PIN 93 # Motors @@ -139,10 +137,10 @@ define HAL_IMUHEAT_I_DEFAULT 0.07 # TODO: should we use this? # define HAL_IMU_TEMP_MARGIN_LOW_DEFAULT 5 -# armed indication +# Armed indication PE6 nARMED OUTPUT HIGH -# power enable pins +# Power enable pins PC13 VDD_3V3_SD_CARD_EN OUTPUT HIGH PI11 VDD_3V3_SENSORS1_EN OUTPUT HIGH @@ -151,7 +149,7 @@ PI11 VDD_3V3_SENSORS1_EN OUTPUT HIGH # bootloader hold PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH -# power sensing +# Power sensing PE15 VDD_5V_PERIPH_nOC INPUT PULLUP PF13 VDD_5V_HIPOWER_nOC INPUT PULLUP PG1 VDD_BRICK_nVALID INPUT PULLUP @@ -196,17 +194,18 @@ IMU Invensensev3 SPI:iim42653 ROTATION_YAW_270 define HAL_DEFAULT_INS_FAST_SAMPLE 1 +# Prioritze SD logging and IMU DMA_PRIORITY SDMMC* SPI* +# Bidir DShot timers cannot share DMA DMA_NOSHARE SPI* TIM5* TIM8* -# enable FAT filesystem support (needs a microSD defined via SDMMC) +# Enable FAT filesystem support (needs a microSD defined via SDMMC) define HAL_OS_FATFS_IO 1 - -# bootloader embedding / bootloader flashing not available +# Bootloader embedding / bootloader flashing not available define AP_BOOTLOADER_FLASHING_ENABLED 0 -# setup for OSD +# Setup for OSD define OSD_ENABLED 1 define HAL_OSD_TYPE_DEFAULT 5 # MSP Displayport From f6e004d467554115162f75bab991893d79d4ee03 Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Wed, 11 Dec 2024 17:02:21 -0900 Subject: [PATCH 4/6] cleanup --- libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat | 13 +++++++------ libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat | 11 ++++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat index 5e96b7c25a9ee..0c115c02c0aae 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat @@ -10,13 +10,10 @@ FLASH_BOOTLOADER_LOAD_KB 128 env OPTIMIZE -Os -SERIAL_ORDER OTG1 UART7 UART5 USART3 +SERIAL_ORDER OTG1 UART7 USART1 USART3 -# CS pins -# SPI1 - IIM42653 -PI9 IMU1_CS CS -# SPI6 - external -PI10 EXT1_CS CS +PI9 IMU1_CS CS # SPI1 CS - IIM42653 +PI10 EXT1_CS CS # SPI6 CS - external # Telem1 - Telem PE8 UART7_TX UART7 @@ -24,6 +21,10 @@ PF6 UART7_RX UART7 PF8 UART7_RTS UART7 PE10 UART7_CTS UART7 +# GPS +PB6 USART1_TX USART1 +PB7 USART1_RX USART1 + # Armed indication PE6 nARMED OUTPUT HIGH diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat index 17eadb388d260..77b1e0f528fa0 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat @@ -58,7 +58,7 @@ PC7 USART6_RX USART6 PA0 SCALED1_V3V3 ADC1 SCALE(2) PB1 VDD_5V_SENS ADC1 SCALE(2) # TODO: 12V monitor -# PA4 SCALED2_V3V3 ADC1 SCALE(2) +# PA4 SCALED2_V3V3 ADC1 SCALE(7.66) PB0 BATT_VOLTAGE_SENS ADC1 SCALE(1) PC2 BATT_CURRENT_SENS ADC1 SCALE(1) @@ -93,7 +93,7 @@ PD11 DRDY_ADIS16507 INPUT GPIO(93) # GPIO(93) for data ready on ADIS16507 # define ADIS_DRDY_PIN 93 -# Motors +# Motors, see STM32H743xx.py PI0 TIM5_CH4 TIM5 PWM(1) GPIO(50) BIDIR PH12 TIM5_CH3 TIM5 PWM(2) GPIO(51) BIDIR PH11 TIM5_CH2 TIM5 PWM(3) GPIO(52) BIDIR @@ -144,9 +144,7 @@ PE6 nARMED OUTPUT HIGH PC13 VDD_3V3_SD_CARD_EN OUTPUT HIGH PI11 VDD_3V3_SENSORS1_EN OUTPUT HIGH -# (12V EN) start peripheral power off, then enable after init -# this prevents a problem with radios that use RTS for -# bootloader hold +# 12V enable, start with it off PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH # Power sensing @@ -174,8 +172,7 @@ define AP_NOTIFY_GPIO_LED_RGB_ENABLED 1 # ID pins PG0 HW_VER_REV_DRIVE OUTPUT LOW -# PH3 HW_VER_SENS ADC3 SCALE(1) -# PH4 HW_REV_SENS ADC3 SCALE(1) +PH4 HW_REV_SENS ADC3 SCALE(1) # Barometer on i2c_2 BARO BMP388 I2C:1:0x76 From 8e0ffd4e132a93871df6de5fa15be30713bbaa31 Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Wed, 11 Dec 2024 17:36:50 -0900 Subject: [PATCH 5/6] optimize size, reserve board_id, add bootloader --- Tools/AP_Bootloader/board_types.txt | 2 ++ Tools/bootloaders/ARK_FPV_bl.bin | Bin 0 -> 20724 bytes .../AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100755 Tools/bootloaders/ARK_FPV_bl.bin diff --git a/Tools/AP_Bootloader/board_types.txt b/Tools/AP_Bootloader/board_types.txt index 9f988ab311a96..eca08d5a6eb7d 100644 --- a/Tools/AP_Bootloader/board_types.txt +++ b/Tools/AP_Bootloader/board_types.txt @@ -12,6 +12,7 @@ TARGET_HW_PX4_FMU_V5X 51 TARGET_HW_PX4_FMU_V6 52 TARGET_HW_PX4_FMU_V6X 53 TARGET_HW_ARK_FMU_V6X 57 +TARGET_HW_ARK_FPV 59 TARGET_HW_MINDPX_V2 88 TARGET_HW_PX4_FLOW_V1 6 TARGET_HW_PX4_DISCOVERY_V1 99 @@ -57,6 +58,7 @@ Reserved "PX4 [BL] FMU v6X.x" 53 Reserved "PX4 [BL] FMU v6C.x" 56 Reserved "ARK [BL] FMU v6X.x" 57 +Reserved "ARK [BL] FPV" 59 Reserved "GUMSTIX [BL] FMU v6" 54 Reserved "ARK CAN FLOW" 80 diff --git a/Tools/bootloaders/ARK_FPV_bl.bin b/Tools/bootloaders/ARK_FPV_bl.bin new file mode 100755 index 0000000000000000000000000000000000000000..4368a45f81573fd80d4e32660873949154de01ac GIT binary patch literal 20724 zcmdsfdwf(ymVec~x4Um1Kqnm}FQ6X*0zv2`AQ4cS?r=%cU?R~OL}$H8oaHvCMARMJ zahK-d7{y(qFm43gWsEwgBM>mNM9d@t&dYJ88^}xm9ixmkAv)ebpl=>@|Gss*JId(p zZ+`#&@}at_PMtbcb*gv=#n+c#Kw7IT4p2Jb>^5!fz06Pb1>L zAiRpug+SAZI33}3gl}vAGU|LA{Qm}fzam!eW5jpF)8AHS)7RQf@_u_;ZvdwYfm(=o zJ;EIb-$p9|+l2Br5KjLucrV}dO&XW~mwqN_|Gn`u-$MWIt^5BQ9@j%uqD4aMe?G6w ze@Se(0l!K3y`fx`T^9-Y9l|YF<~;EGi-d}D$EC`rJ1(tznw4~3R8i7!>$N47Dj^^L z)tr3Gm4)#-Myvl)MgyzGsn10Pb+=Zj-tL@So>TFRdtt|7O-LCEO)Ss+S}q%9Io_S_ zn>%hrsT)BH5o_i(IGnlekYhrC$R>yB!4cnAi~r z5ydY^4`M5WHB=Fi!S6+=NBI0!V(r2F{Cc>)SFODM3-gojXsLk!Li^|DC)>}fPZP(M zOKA=H(w?Qn%BlZ87zuG|)*$&P5+bCem8eTbh-!&&>LU?@#Hl}v2vTR;Snmt&2?1LC zf_w4BhPmk-f<&g!JXXIxlG;Mlhc%);e>Gns>ZC!U-mhUqQ@#utq%T6GgA&sL5p+Kt z-qUa8SGrd&7TZm&i!Y}0oQ>{%Llc}ty*$hx_?{*Vm$W+d-c2aum6R4vO&KDN@fDQ= z|NMZZj8lgOV|`Cw=1?px4uvjo$aP57Ayp@jSzfTAxUEk4VH;;9>YF1)jykzu17BbY z)+q%#?6nb4dazC|X=glZ6NuR8056diy_xlVeroqe=ZPvBIF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liK3iVo&0d#2;MynzDhK>U*{gxMn&}FKu9QG~s!StYtai39T`l2;gVdG`aQmmj5P>gdH#+Vgd* z?#ZvnMmST;+S?2KT-4{({1pfL^Y0!EmO-y72O4V6)VS=~wUaB(+%vf%`}>nCRw3;C zevxBRg+;c&;($9)!BB8ag~jK=&CgO}@$qU2p9vW50affR2K{wK!$HKv6+1P*hqoBm zRBqLEANG3ENmLFldW1wNX=oJfRu`$`lIYU02Jyp`4vLKs|EM|1+=Gakky}xz9&n4T zC*WlUzeIdf39qvj0pHi8v{c2v<%@(Lew%dMi#7i1xa|AO818o921ar3{uW$e6xRYT z`KtK0eDIb07F=-@cRO$cqqxQ2f@>bdwcs1Qs`&SOk?_Q?a6RT$XueAr*Z{j^gSFWx zbfs5p2X+A1GIC=pEcgzu3g7J6kV~o9j$8n_PYgnrsltNq>8kMUT{Ch*#dhQZ`j>cS ztU4Et#CbB>#-o_Y4c1!VURPnk7jsqky3TOd zO#_)Zcyn@I#5d1?6tM5S$&5j~idWyZytt@r-l9c|NIY4*VfMVD4T;>G;@R`&vfyMh zVin=dcMxh_NqFmbu;gELYR&)7r}-w24OG Date: Wed, 11 Dec 2024 17:55:19 -0900 Subject: [PATCH 6/6] added pinout to readme, moved serial port defaults to hwdef --- .../AP_HAL_ChibiOS/hwdef/ARK_FPV/README.md | 106 +++++++++++++++++- .../hwdef/ARK_FPV/defaults.parm | 11 -- .../AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat | 11 ++ 3 files changed, 111 insertions(+), 17 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/README.md b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/README.md index 46a30e8d77700..939d87b26918d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/README.md +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/README.md @@ -57,7 +57,103 @@ https://arkelectron.com/product/ark-fpv-flight-controller/ - Weight: 7.5g with MicroSD card ## Pinout -TODO +#### PWM UART4 - 8 Pin JST-GH +| Pin | Signal Name | Voltage | +|-----|-----------------|--------------| +| 1 | VBAT IN | 5.5V-54V | +| 2 | CURR_IN_EXT | 3.3V | +| 3 | UART4_RX_EXT | 3.3V | +| 4 | FMU_CH1_EXT | 3.3V | +| 5 | FMU_CH2_EXT | 3.3V | +| 6 | FMU_CH3_EXT | 3.3V | +| 7 | FMU_CH4_EXT | 3.3V | +| 8 | GND | GND | + +#### RC - 4 Pin JST-GH +| Pin | Signal Name | Voltage | +|-----|---------------------|---------| +| 1 | 5.0V | 5.0V | +| 2 | USART6_RX_IN_EXT | 3.3V | +| 3 | USART6_TX_OUTPUT_EXT| 3.3V | +| 4 | GND | GND | + +#### PWM EXTRA - 6 Pin JST-SH +| Pin | Signal Name | Voltage | +|-----|-----------------|---------| +| 1 | FMU_CH5_EXT | 3.3V | +| 2 | FMU_CH6_EXT | 3.3V | +| 3 | FMU_CH7_EXT | 3.3V | +| 4 | FMU_CH8_EXT | 3.3V | +| 5 | FMU_CH9_EXT | 3.3V | +| 6 | GND | GND | + +#### POWER AUX - 3 Pin JST-GH +| Pin | Signal Name | Voltage | +|-----|-------------|--------------| +| 1 | 12.0V | 12.0V | +| 2 | VBAT IN/OUT | 5.5V-54V | +| 3 | GND | GND | + +#### CAN - 4 Pin JST-GH +| Pin | Signal Name | Voltage | +|-----|-------------|---------| +| 1 | 5.0V | 5.0V | +| 2 | CAN1_P | 5.0V | +| 3 | CAN1_N | 5.0V | +| 4 | GND | GND | + +#### GPS - 6 Pin JST-GH +| Pin | Signal Name | Voltage | +|-----|---------------------|---------| +| 1 | 5.0V | 5.0V | +| 2 | USART1_TX_GPS1_EXT | 3.3V | +| 3 | USART1_RX_GPS1_EXT | 3.3V | +| 4 | I2C1_SCL_GPS1_EXT | 3.3V | +| 5 | I2C1_SDA_GPS1_EXT | 3.3V | +| 6 | GND | GND | + +#### TELEM - 6 Pin JST-GH +| Pin | Signal Name | Voltage | +|-----|-----------------------|---------| +| 1 | 5.0V | 5.0V | +| 2 | UART7_TX_TELEM1_EXT | 3.3V | +| 3 | UART7_RX_TELEM1_EXT | 3.3V | +| 4 | UART7_CTS_TELEM1_EXT | 3.3V | +| 5 | UART7_RTS_TELEM1_EXT | 3.3V | +| 6 | GND | GND | + +#### VTX - 6 Pin JST-GH +| Pin | Signal Name | Voltage | +|-----|-----------------------|---------| +| 1 | 12.0V | 12.0V | +| 2 | GND | GND | +| 3 | UART5_TX_TELEM2_EXT | 3.3V | +| 4 | UART5_RX_TELEM2_EXT | 3.3V | +| 5 | USART2_RX_TELEM3_EXT | 3.3V | +| 6 | GND | GND | + +#### SPI (OSD or IMU) - 8 Pin JST-SH +| Pin | Signal Name | Voltage | +|-----|---------------------|---------| +| 1 | 5.0V | 5.0V | +| 2 | SPI6_SCK_EXT | 3.3V | +| 3 | SPI6_MISO_EXT | 3.3V | +| 4 | SPI6_MOSI_EXT | 3.3V | +| 5 | SPI6_nCS1_EXT | 3.3V | +| 6 | SPI6_DRDY1_EXT | 3.3V | +| 7 | SPI6_nRESET_EXT | 3.3V | +| 8 | GND | GND | + +#### Flight Controller Debug - 6 Pin JST-SH +| Pin | Signal Name | Voltage | +|-----|-----------------|---------| +| 1 | 3V3_FMU | 3.3V | +| 2 | USART4_TX_DEBUG | 3.3V | +| 3 | USART4_RX_DEBUG | 3.3V | +| 4 | FMU_SWDIO | 3.3V | +| 5 | FMU_SWCLK | 3.3V | +| 6 | GND | GND | + ## UART Mapping @@ -80,8 +176,6 @@ This flight controller has an MSP-DisplayPort output on a 6-pin DJI-compatible J ## Motor Output -Motors 1-8 are capable of Bidirectional-DSHOT and PWM. - -All outputs in the motor groups below must be either PWM or DShot: -Motors 1-4 Group1 (TIM5) -Motors 5-8 Group2 (TIM8) +Motors 1-8 are capable of Bidirectional-DSHOT and PWM. All outputs in the motor groups below must be either PWM or DShot: +- Motors 1-4 Group1 (TIM5) +- Motors 5-8 Group2 (TIM8) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/defaults.parm index 834a26c016aac..0d7fb878241ff 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/defaults.parm @@ -4,14 +4,3 @@ CAN_P1_DRIVER 1 # Enables the use of CAN # Onboard OSD OSD_TYPE 5 # MSP OSD_CELL_COUNT 0 # auto based on voltage at start - -# Serial ports -SERIAL1_PROTOCOL 2 # Mavlink -SERIAL2_PROTOCOL 42 # DisplayPort -SERIAL3_PROTOCOL 5 # GPS -SERIAL4_PROTOCOL 0 # TODO: DJI HDL? -SERIAL5_PROTOCOL 16 # ESC telemetry -SERIAL6_PROTOCOL 23 # RCIN -SERIAL7_PROTOCOL 22 # SLCAN - - diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat index ea449ee1c7fec..5d7a0fd5d193d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat @@ -21,6 +21,9 @@ env OPTIMIZE -Os SERIAL_ORDER OTG1 UART7 UART5 USART1 USART2 UART4 USART6 OTG2 +define DEFAULT_SERIAL6_PROTOCOL SerialProtocol_RCIN +define DEFAULT_SERIAL7_PROTOCOL SerialProtocol_SLCAN + # Debug console STDOUT_SERIAL SD3 STDOUT_BAUDRATE 57600 @@ -33,22 +36,30 @@ PE8 UART7_TX UART7 PF6 UART7_RX UART7 PF8 UART7_RTS UART7 PE10 UART7_CTS UART7 +define DEFAULT_SERIAL1_PROTOCOL SerialProtocol_MAVLink2 +define DEFAULT_SERIAL1_BAUD 115 # Telem2 - VTX (DJI Air Unit) PC12 UART5_TX UART5 PD2 UART5_RX UART5 +define DEFAULT_SERIAL2_PROTOCOL SerialProtocol_MSP_DisplayPort +define DEFAULT_SERIAL2_BAUD 115 # GPS1 PB6 USART1_TX USART1 PB7 USART1_RX USART1 +define DEFAULT_SERIAL3_PROTOCOL SerialProtocol_GPS # Telem3 - VTX (DJI Air Unit, RX only) PA3 USART2_RX USART2 PD5 USART2_TX USART2 +define DEFAULT_SERIAL4_PROTOCOL SerialProtocol_None # TODO: DJI HDL? # ESC telem RX only PH13 UART4_TX UART4 PH14 UART4_RX UART4 +define DEFAULT_SERIAL5_PROTOCOL SerialProtocol_ESCTelemetry +define DEFAULT_SERIAL5_BAUD 115 # RC Input PC6 USART6_TX USART6