forked from ArduPilot/ardupilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hwdef: Add Aocoda-RC-F405V3-Flash target
- Loading branch information
Showing
3 changed files
with
255 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
libraries/AP_HAL_ChibiOS/hwdef/Aocoda-RC-F405V3-Flash/defaults.parm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# setup for LEDs on chan9 | ||
SERVO9_FUNCTION 120 |
33 changes: 33 additions & 0 deletions
33
libraries/AP_HAL_ChibiOS/hwdef/Aocoda-RC-F405V3-Flash/hwdef-bl.dat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# hw definition file for processing by chibios_pins.py | ||
# Boot loader | ||
|
||
# MCU class and specific type | ||
MCU STM32F4xx STM32F405xx | ||
|
||
# board id | ||
APJ_BOARD_ID AP_HW_AOCODA-RC-F405V3 | ||
|
||
# crystal frequency | ||
OSCILLATOR_HZ 8000000 | ||
|
||
# installed at zero offset | ||
FLASH_RESERVE_START_KB 0 | ||
|
||
FLASH_SIZE_KB 1024 | ||
|
||
# the location where the will put the firmware | ||
FLASH_BOOTLOADER_LOAD_KB 64 | ||
|
||
PC13 LED_BOOTLOADER OUTPUT LOW GPIO(0) | ||
define HAL_LED_ON 0 | ||
|
||
#PB8 BUZZER OUTPUT LOW PULLDOWN | ||
|
||
STM32_VDD 330U | ||
|
||
SERIAL_ORDER OTG1 | ||
|
||
PA11 OTG_FS_DM OTG1 | ||
PA12 OTG_FS_DP OTG1 | ||
|
||
PB8 BUZZER OUTPUT LOW PULLDOWN |
220 changes: 220 additions & 0 deletions
220
libraries/AP_HAL_ChibiOS/hwdef/Aocoda-RC-F405V3-Flash/hwdef.dat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,220 @@ | ||
# hw definition file for processing by chibios_pins.py | ||
# Aocoda-RC-F405V3 ICM42688P/MPU6000 | ||
|
||
# MCU class and specific type | ||
MCU STM32F4xx STM32F405xx | ||
|
||
# board ID for firmware load | ||
APJ_BOARD_ID AP_HW_AOCODA-RC-F405V3 | ||
|
||
# crystal frequency, setup to use external oscillator | ||
OSCILLATOR_HZ 8000000 | ||
|
||
# flash size | ||
FLASH_SIZE_KB 1024 | ||
|
||
# reserve 16k for bootloader, 16k for OSD and 32k for flash storage | ||
FLASH_RESERVE_START_KB 64 | ||
|
||
define HAL_STORAGE_SIZE 15360 | ||
define STORAGE_FLASH_PAGE 1 | ||
|
||
# ChibiOS system timer | ||
define STM32_ST_USE_TIMER 5 | ||
define CH_CFG_ST_RESOLUTION 32 | ||
|
||
# USB setup | ||
USB_STRING_MANUFACTURER "Aocoda-RC-F405V3-Flash" | ||
|
||
# Now we define the pins that USB is connected on. | ||
PA11 OTG_FS_DM OTG1 | ||
PA12 OTG_FS_DP OTG1 | ||
|
||
# OTG USB VBUS | ||
PB12 VBUS INPUT OPENDRAIN | ||
|
||
# IMU SPI | ||
PA4 MPU_CS CS | ||
PA5 SPI1_SCK SPI1 | ||
PA6 SPI1_MISO SPI1 | ||
PA7 SPI1_MOSI SPI1 | ||
|
||
# OSD SPI | ||
PA13 OSD_CS CS | ||
PB13 SPI2_SCK SPI2 | ||
PB14 SPI2_MISO SPI2 | ||
PB15 SPI2_MOSI SPI2 | ||
|
||
# FLASH SPI | ||
PB3 SPI3_SCK SPI3 | ||
PB4 SPI3_MISO SPI3 | ||
PB5 SPI3_MOSI SPI3 | ||
PC0 FLASH_CS CS | ||
#PC0 SDCARD_CS CS | ||
|
||
# I2C Buses | ||
I2C_ORDER I2C1 | ||
|
||
# I2C1 | ||
PB6 I2C1_SCL I2C1 | ||
PB7 I2C1_SDA I2C1 | ||
|
||
# ADC for Power | ||
PC2 BATT_VOLTAGE_SENS ADC1 SCALE(1) | ||
PC1 BATT_CURRENT_SENS ADC1 SCALE(1) | ||
|
||
# PC1 = IN11 PC2 = IN12 | ||
define HAL_BATT_MONITOR_DEFAULT 4 | ||
define HAL_BATT_VOLT_PIN 12 | ||
define HAL_BATT_CURR_PIN 11 | ||
define HAL_BATT_VOLT_SCALE 11 | ||
define HAL_BATT_CURR_SCALE 55 | ||
|
||
# ADC for RSSI | ||
# PC3 - ADC123_IN13 | ||
define BOARD_RSSI_ANA_PIN 13 | ||
PC3 RSSI_ADC_PIN ADC1 SCALE(1) | ||
|
||
# Define a LED, mapping it to GPIO. LOW will illuminate the LED | ||
# blue LED0 marked as ACT | ||
# green LED1 marked as B/E | ||
PC13 LED_BLUE OUTPUT LOW GPIO(1) | ||
define HAL_GPIO_A_LED_PIN 1 | ||
#define HAL_GPIO_B_LED_PIN 2 | ||
|
||
# The normal usage of this ordering is: | ||
# 1) SERIAL0: console (primary mavlink, usually USB) | ||
# 2) SERIAL1: GPS | ||
# 3) SERIAL2: RC input | ||
# 4) SERIAL3: ESC Telemetry | ||
# 5) SERIAL4: VTX | ||
# 6) SERIAL5: ESP32-C3 | ||
|
||
# order of UARTs (and USB) | ||
SERIAL_ORDER OTG1 USART1 USART2 USART3 UART4 UART5 | ||
|
||
# USART1 (GPS), SERIAL1 | ||
PA9 USART1_TX USART1 | ||
PA10 USART1_RX USART1 | ||
define DEFAULT_SERIAL1_PROTOCOL SerialProtocol_GPS | ||
|
||
# USART2 (RC input), SERIAL2 | ||
PA2 USART2_TX USART2 | ||
PA3 USART2_RX USART2 | ||
define DEFAULT_SERIAL2_PROTOCOL SerialProtocol_RCIN | ||
|
||
# used for SBUS/PPM etc. | ||
PA3 TIM9_CH2 TIM9 RCININT PULLDOWN LOW ALT(1) | ||
|
||
# USART3 (ESC Telemetry), SERIAL3 | ||
PC10 USART3_TX USART3 | ||
PC11 USART3_RX USART3 | ||
define DEFAULT_SERIAL3_PROTOCOL SerialProtocol_ESCTelemetry | ||
|
||
# UART4 (VTX), SERIAL4 | ||
PA0 UART4_TX UART4 | ||
PA1 UART4_RX UART4 | ||
define DEFAULT_SERIAL4_PROTOCOL SerialProtocol_DJI_FPV | ||
|
||
# UART5 (spare), SERIAL5 | ||
PC12 UART5_TX UART5 | ||
PD2 UART5_RX UART5 | ||
#define DEFAULT_SERIAL5_PROTOCOL SerialProtocol_MSP | ||
|
||
# Motors | ||
#pwm output | ||
PC6 TIM8_CH1 TIM8 PWM(1) GPIO(50) | ||
PC7 TIM8_CH2 TIM8 PWM(2) GPIO(51) BIDIR | ||
PC8 TIM8_CH3 TIM8 PWM(3) GPIO(52) | ||
PC9 TIM8_CH4 TIM8 PWM(4) GPIO(53) BIDIR | ||
PA15 TIM2_CH1 TIM2 PWM(5) GPIO(54) | ||
PA8 TIM1_CH1 TIM1 PWM(6) GPIO(55) | ||
PB10 TIM2_CH3 TIM2 PWM(7) GPIO(56) | ||
PB11 TIM2_CH4 TIM2 PWM(8) GPIO(57) | ||
|
||
# LED stripe | ||
PB1 TIM3_CH4 TIM3 PWM(9) GPIO(58) | ||
|
||
# PWM output for buzzer/Beeper | ||
#PB8 TIM4_CH3 TIM4 GPIO(80) ALARM PULLDOWN LOW | ||
PB8 BUZZER OUTPUT GPIO(80) LOW | ||
define HAL_BUZZER_PIN 80 | ||
define HAL_BUZZER_ON 1 | ||
define HAL_BUZZER_OFF 0 | ||
|
||
# GPIOs for 9V DCDC control (HIGH:on; LOW:off) | ||
PC5 PINIO1 OUTPUT GPIO(81) HIGH | ||
|
||
# GPIOs for Bluetooth control (HIGH:on; LOW:off) | ||
PA14 PINIO2 OUTPUT GPIO(82) HIGH | ||
|
||
# GPIOs for CAM1/CAM2 control (HIGH:CAM2; LOW:CAM1) | ||
PC15 PINIO3 OUTPUT GPIO(83) LOW | ||
|
||
# IMU ICM42688P/MPU6000 on SPI | ||
SPIDEV icm42688 SPI1 DEVID1 MPU_CS MODE3 2*MHZ 16*MHZ | ||
SPIDEV mpu6000 SPI1 DEVID1 MPU_CS MODE3 1*MHZ 8*MHZ | ||
|
||
# OSD on SPI | ||
SPIDEV osd SPI2 DEVID1 OSD_CS MODE0 10*MHZ 10*MHZ | ||
|
||
# FLASH on SPI | ||
SPIDEV dataflash SPI3 DEVID1 FLASH_CS MODE3 32*MHZ 32*MHZ | ||
|
||
# SDCard | ||
#SPIDEV sdcard SPI3 DEVID1 SDCARD_CS MODE0 400*KHZ 25*MHZ | ||
|
||
# IMU Direction | ||
IMU Invensensev3 SPI:icm42688 ROTATION_ROLL_180_YAW_90 | ||
IMU Invensense SPI:mpu6000 ROTATION_NONE | ||
|
||
# DPS310/BMP280 integrated on I2C2 bus, multiple possible choices for external barometer | ||
BARO DPS310 I2C:0:0x76 | ||
BARO BMP280 I2C:0:0x76 | ||
|
||
#no built in compass but enable for user | ||
#allow arm without compass | ||
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 | ||
|
||
# setup for OSD | ||
define OSD_ENABLED 1 | ||
define HAL_OSD_TYPE_DEFAULT 1 | ||
ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin | ||
|
||
|
||
# filesystem setup on sdcard | ||
#define HAL_OS_FATFS_IO 1 | ||
#define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS" | ||
#define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN" | ||
|
||
# enable logging to dataflash | ||
define HAL_LOGGING_DATAFLASH_ENABLED 1 | ||
|
||
# support VTX IRC tramp protocol | ||
#define AP_TRAMP_ENABLED 1 | ||
|
||
# disable SMBUS and fuel battery monitors to save flash | ||
define HAL_BATTMON_SMBUS_ENABLE 0 | ||
define HAL_BATTMON_FUEL_ENABLE 0 | ||
|
||
# disable parachute and sprayer to save flash | ||
define HAL_PARACHUTE_ENABLED 0 | ||
define HAL_SPRAYER_ENABLED 0 | ||
|
||
# reduce max size of embedded params for apj_tool.py | ||
define AP_PARAM_MAX_EMBEDDED_PARAM 1024 | ||
define HAL_WITH_DSP FALSE | ||
|
||
# save some flash | ||
define HAL_GENERATOR_ENABLED 0 | ||
define AC_OAPATHPLANNER_ENABLED 0 | ||
define PRECISION_LANDING 0 | ||
define HAL_BARO_WIND_COMP_ENABLED 0 | ||
define GRIPPER_ENABLED 0 | ||
|
||
# minimal drivers to reduce flash usage | ||
include ../include/minimize_common.inc |