forked from ArduPilot/ardupilot
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AP_HAL_ChibiOS: add ATOMRCF405NAVI-Deluxe board
- Loading branch information
Showing
2 changed files
with
200 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
libraries/AP_HAL_ChibiOS/hwdef/ATOMRCF405NAVI-Deluxe/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,35 @@ | ||
# hw definition file for processing by chibios_pins.py | ||
# for minimal F405 bootloader | ||
|
||
# MCU class and specific type | ||
MCU STM32F4xx STM32F405xx | ||
|
||
# board ID for firmware load | ||
APJ_BOARD_ID 1142 | ||
|
||
# crystal frequency | ||
OSCILLATOR_HZ 8000000 | ||
|
||
FLASH_SIZE_KB 1024 | ||
|
||
# bootloader is installed at zero offset | ||
FLASH_RESERVE_START_KB 0 | ||
|
||
# LEDs | ||
PA14 LED_BOOTLOADER OUTPUT LOW # blue led | ||
PA13 LED_ACTIVITY OUTPUT LOW # green led | ||
define HAL_LED_ON 0 | ||
|
||
# the location where the bootloader will put the firmware | ||
FLASH_BOOTLOADER_LOAD_KB 64 | ||
|
||
# order of UARTs | ||
SERIAL_ORDER OTG1 | ||
|
||
PA11 OTG_FS_DM OTG1 | ||
PA12 OTG_FS_DP OTG1 | ||
|
||
# Add CS pins to ensure they are high in bootloader | ||
PA4 IMU_CS CS | ||
PB6 SDCARD_CS CS | ||
PB12 AT7456E_CS CS |
165 changes: 165 additions & 0 deletions
165
libraries/AP_HAL_ChibiOS/hwdef/ATOMRCF405NAVI-Deluxe/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,165 @@ | ||
# hw definition file for AtomRC F405 hardware | ||
|
||
# MCU class and specific type | ||
MCU STM32F4xx STM32F405xx | ||
|
||
# board ID for firmware load | ||
#APJ_BOARD_ID AP_HW_ATOMRCF405NAVI_DLX | ||
APJ_BOARD_ID 1142 | ||
|
||
# crystal frequency | ||
OSCILLATOR_HZ 8000000 | ||
|
||
define STM32_ST_USE_TIMER 5 | ||
|
||
FLASH_SIZE_KB 1024 | ||
|
||
# only one I2C bus | ||
I2C_ORDER I2C1 | ||
|
||
# order of UARTs (and USB) | ||
SERIAL_ORDER OTG1 USART1 USART2 USART3 UART4 UART5 USART6 | ||
|
||
# LEDs | ||
PA14 LED_BLUE OUTPUT LOW GPIO(0) | ||
PA13 LED_GREEN OUTPUT LOW GPIO(1) | ||
|
||
define HAL_GPIO_A_LED_PIN 0 | ||
define HAL_GPIO_B_LED_PIN 1 | ||
|
||
# buzzer | ||
PB2 BUZZER OUTPUT GPIO(80) LOW | ||
define HAL_BUZZER_PIN 80 | ||
|
||
# spi1 bus for IMU | ||
PA5 SPI1_SCK SPI1 | ||
PA6 SPI1_MISO SPI1 | ||
PA7 SPI1_MOSI SPI1 | ||
PA4 IMU_CS CS | ||
|
||
# spi2 for OSD | ||
PB13 SPI2_SCK SPI2 | ||
PC2 SPI2_MISO SPI2 | ||
PC3 SPI2_MOSI SPI2 | ||
PB12 AT7456E_CS CS | ||
|
||
# spi3 for sdcard | ||
PB3 SPI3_SCK SPI3 | ||
PB4 SPI3_MISO SPI3 | ||
PB5 SPI3_MOSI SPI3 | ||
PC14 SDCARD_CS CS | ||
|
||
# one I2C bus | ||
PB8 I2C1_SCL I2C1 | ||
PB9 I2C1_SDA I2C1 | ||
|
||
# analog pins | ||
PC0 BATT_VOLTAGE_SENS ADC1 SCALE(1) | ||
PC1 BATT_CURRENT_SENS ADC1 SCALE(1) | ||
PC4 RSSI_ADC_PIN ADC1 SCALE(1) | ||
PC5 AIRSPEED_ADC ADC1 SCALE(1) | ||
|
||
define HAL_DEFAULT_AIRSPEED_PIN 13 | ||
|
||
# define default battery setup | ||
define HAL_BATT_VOLT_PIN 12 | ||
define HAL_BATT_CURR_PIN 11 | ||
define HAL_BATT_VOLT_SCALE 11.08836 | ||
define HAL_BATT_CURR_SCALE 30.0 | ||
define HAL_BATT_MONITOR_DEFAULT 4 | ||
|
||
# analog rssi pin | ||
define BOARD_RSSI_ANA_PIN 10 | ||
|
||
# USART1 | ||
PA9 USART1_TX USART1 NODMA | ||
PA10 USART1_RX USART1 NODMA | ||
|
||
# USART2 - RCIN with inverter | ||
PA2 USART2_TX USART2 | ||
PA3 TIM9_CH2 TIM9 RCININT PULLDOWN ALT(1) | ||
|
||
# alternative with PA3 as USART2_RX | ||
PA3 USART2_RX USART2 NODMA | ||
|
||
# USART3 | ||
PC10 USART3_TX USART3 NODMA | ||
PC11 USART3_RX USART3 NODMA | ||
|
||
# UART4 GPS | ||
PA0 UART4_TX UART4 NODMA | ||
PA1 UART4_RX UART4 NODMA | ||
define DEFAULT_SERIAL4_PROTOCOL 5 | ||
|
||
# UART5 for DJI OSD | ||
PD2 UART5_RX UART5 NODMA | ||
PC12 UART5_TX UART5 NODMA | ||
|
||
# USART6 | ||
PC6 USART6_TX USART6 | ||
PC7 USART6_RX USART6 | ||
|
||
# USB | ||
PA11 OTG_FS_DM OTG1 | ||
PA12 OTG_FS_DP OTG1 | ||
|
||
#RF module power control | ||
PC15 PINIO1 OUTPUT GPIO(81) HIGH | ||
|
||
# PWM out pins. Note that channel order follows the ArduPilot motor | ||
# order conventions | ||
PB0 TIM3_CH3 TIM3 PWM(1) GPIO(50) | ||
PB1 TIM3_CH4 TIM3 PWM(2) GPIO(51) | ||
PB6 TIM4_CH1 TIM4 PWM(3) GPIO(52) | ||
PB7 TIM4_CH2 TIM4 PWM(4) GPIO(53) | ||
PA15 TIM2_CH1 TIM2 PWM(5) GPIO(54) | ||
PB10 TIM2_CH3 TIM2 PWM(6) GPIO(55) | ||
PB11 TIM2_CH4 TIM2 PWM(7) GPIO(56) | ||
PC8 TIM8_CH3 TIM8 PWM(8) GPIO(57) | ||
PC9 TIM8_CH4 TIM8 PWM(9) GPIO(58) | ||
PB14 TIM8_CH2N TIM8 PWM(10) GPIO(59) | ||
PB15 TIM1_CH3N TIM1 PWM(11) GPIUO(60) | ||
PA8 TIM1_CH1 TIM1 PWM(12) GPIO(61) # LED strip | ||
|
||
|
||
define HAL_STORAGE_SIZE 15360 | ||
STORAGE_FLASH_PAGE 2 | ||
|
||
# reserve 32k for bootloader and 32k for flash storage | ||
FLASH_RESERVE_START_KB 64 | ||
|
||
# one IMU | ||
IMU Invensensev3 SPI:icm42688 ROTATION_PITCH_180 | ||
|
||
# I2C SPL06 | ||
BARO SPL06 I2C:0:0x76 | ||
|
||
# no built-in compass, but probe the i2c bus for all possible | ||
# external compass types | ||
define ALLOW_ARM_NO_COMPASS | ||
define HAL_PROBE_EXTERNAL_I2C_COMPASSES | ||
define HAL_I2C_INTERNAL_MASK 0 | ||
|
||
# SPI devices | ||
SPIDEV icm42688 SPI1 DEVID1 IMU_CS MODE3 1*MHZ 10*MHZ | ||
SPIDEV sdcard SPI3 DEVID1 SDCARD_CS MODE0 400*KHZ 25*MHZ | ||
SPIDEV osd SPI2 DEVID1 AT7456E_CS MODE0 10*MHZ 10*MHZ | ||
|
||
# filesystem setup on sdcard | ||
define HAL_OS_FATFS_IO 1 | ||
|
||
# setup for OSD | ||
define OSD_ENABLED 1 | ||
define HAL_OSD_TYPE_DEFAULT 1 | ||
ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin | ||
|
||
# reduce max size of embedded params for apj_tool.py | ||
define AP_PARAM_MAX_EMBEDDED_PARAM 256 | ||
|
||
# save some flash | ||
include ../include/minimize_fpv_osd.inc | ||
include ../include/save_some_flash.inc | ||
|
||
define HAL_PARACHUTE_ENABLED 0 | ||
define HAL_SPRAYER_ENABLED 0 | ||
|