2018-01-05 02:19:51 -04:00
|
|
|
# hw definition file for processing by chibios_pins.py
|
2019-09-11 23:56:13 -03:00
|
|
|
# new SkyViper 2018 Journey
|
2018-01-05 02:19:51 -04:00
|
|
|
|
2021-09-02 06:01:33 -03:00
|
|
|
MCU STM32F4xx STM32F412Rx
|
2018-01-05 02:19:51 -04:00
|
|
|
|
|
|
|
# board ID for firmware load
|
|
|
|
APJ_BOARD_ID 9
|
|
|
|
|
2022-09-18 14:18:37 -03:00
|
|
|
# short board name override (13 chars) to match original max length; can't change because name is used for transmitter bind CRC
|
|
|
|
define CHIBIOS_SHORT_BOARD_NAME "skyviper-jour"
|
|
|
|
|
2018-01-05 02:19:51 -04:00
|
|
|
# crystal frequency
|
|
|
|
OSCILLATOR_HZ 24000000
|
|
|
|
|
2018-01-12 00:43:06 -04:00
|
|
|
STM32_PWM_USE_TIM3 TRUE
|
|
|
|
|
2018-01-05 02:19:51 -04:00
|
|
|
|
2018-01-12 17:33:58 -04:00
|
|
|
# flash size
|
|
|
|
FLASH_SIZE_KB 1024
|
|
|
|
|
2018-01-05 02:19:51 -04:00
|
|
|
# serial port for stdout
|
|
|
|
STDOUT_SERIAL SD1
|
|
|
|
STDOUT_BAUDRATE 115200
|
|
|
|
|
2018-01-11 21:01:06 -04:00
|
|
|
# order of I2C buses
|
|
|
|
I2C_ORDER I2C2 I2C1
|
|
|
|
|
2018-01-19 18:09:02 -04:00
|
|
|
# we need I2C clock at 400kHz for IMU
|
|
|
|
define HAL_I2C_MAX_CLOCK 400000
|
|
|
|
|
2018-01-31 04:27:45 -04:00
|
|
|
# run I2C bus thread at high priority for IMU
|
|
|
|
define APM_I2C_PRIORITY 181
|
|
|
|
|
2018-01-11 21:01:06 -04:00
|
|
|
# order of UARTs
|
2020-04-24 08:10:08 -03:00
|
|
|
SERIAL_ORDER USART1 USART2 EMPTY USART6
|
2018-01-11 21:01:06 -04:00
|
|
|
|
2018-01-13 06:23:58 -04:00
|
|
|
PC0 MGND ADC1
|
2018-01-05 02:19:51 -04:00
|
|
|
PC1 PWM4_SENSE ADC1
|
|
|
|
PC2 PWM2_SENSE ADC1
|
|
|
|
PC3 PWM1_SENSE ADC1
|
|
|
|
PA0 PWM3_SENSE ADC1
|
|
|
|
|
|
|
|
# USART2 is for sonix
|
|
|
|
PA2 USART2_TX USART2
|
|
|
|
PA3 USART2_RX USART2
|
|
|
|
|
|
|
|
# SPI1 is radio
|
2018-01-11 22:27:25 -04:00
|
|
|
PA4 RADIO_CS CS
|
2018-01-05 02:19:51 -04:00
|
|
|
PA5 SPI1_SCK SPI1
|
|
|
|
PA6 SPI1_MISO SPI1
|
|
|
|
PA7 SPI1_MOSI SPI1
|
|
|
|
PC4 RADIO_CE OUTPUT
|
|
|
|
PC5 RADIO_PA_CTL OUTPUT
|
2018-03-16 18:49:40 -03:00
|
|
|
PB0 RADIO_IRQ INPUT GPIO(100)
|
2018-01-13 06:23:58 -04:00
|
|
|
PB1 BATT_MON ADC1 SCALE(11)
|
2018-01-05 02:19:51 -04:00
|
|
|
PB2 BOOT1 INPUT
|
|
|
|
PB10 I2C2_SCL I2C2
|
|
|
|
PA13 JTMS-SWDIO SWD
|
|
|
|
PA14 JTCK-SWCLK SWD
|
|
|
|
PB9 I2C1_SDA I2C1
|
|
|
|
PB8 I2C1_SCL I2C1
|
2018-01-13 06:23:58 -04:00
|
|
|
PB7 LEDF OUTPUT HIGH GPIO(0)
|
|
|
|
PB6 LEDR OUTPUT HIGH GPIO(1)
|
2018-01-16 00:08:06 -04:00
|
|
|
PB5 TIM3_CH2 TIM3 PWM(2) # marked CN15 front-right
|
2018-01-05 02:19:51 -04:00
|
|
|
PB3 I2C2_SDA I2C2
|
|
|
|
PD2 OF_MOTION INPUT
|
2018-02-01 05:34:32 -04:00
|
|
|
PB4 OF_RESET OUTPUT HIGH
|
2018-01-05 02:19:51 -04:00
|
|
|
|
|
|
|
# USART6 is for GPS
|
|
|
|
PA11 USART6_TX USART6
|
|
|
|
PC7 USART6_RX USART6
|
|
|
|
|
|
|
|
# USART1 is for debug console
|
|
|
|
PA10 USART1_RX USART1
|
|
|
|
PA9 USART1_TX USART1
|
|
|
|
|
2018-01-16 00:08:06 -04:00
|
|
|
PC9 TIM3_CH4 TIM3 PWM(4) # marked CN17, rear-right
|
|
|
|
PC8 TIM3_CH3 TIM3 PWM(3) # marked CN13, rear-left
|
|
|
|
PC6 TIM3_CH1 TIM3 PWM(1) # marked CN3, front-left
|
2018-01-05 02:19:51 -04:00
|
|
|
|
|
|
|
# SPI2 is optical flow
|
|
|
|
PB15 SPI2_MOSI SPI2
|
|
|
|
PB14 SPI2_MISO SPI2
|
|
|
|
PB13 SPI2_SCK SPI2
|
2018-01-11 22:27:25 -04:00
|
|
|
PB12 FLOW_CS CS
|
2018-01-11 21:01:06 -04:00
|
|
|
|
|
|
|
# SPI Device table
|
|
|
|
SPIDEV cypress SPI1 DEVID1 RADIO_CS MODE0 2*MHZ 2*MHZ
|
2018-01-13 06:23:58 -04:00
|
|
|
SPIDEV cc2500 SPI1 DEVID1 RADIO_CS MODE0 4*MHZ 4*MHZ
|
2018-01-11 21:01:06 -04:00
|
|
|
SPIDEV pixartflow SPI2 DEVID2 FLOW_CS MODE3 2*MHZ 2*MHZ
|
|
|
|
|
2018-01-15 18:17:34 -04:00
|
|
|
# reserve 16k for bootloader and 32k for storage
|
|
|
|
FLASH_RESERVE_START_KB 48
|
2018-01-14 04:00:47 -04:00
|
|
|
|
|
|
|
define HAL_CHIBIOS_ARCH_F412 1
|
|
|
|
|
2019-08-27 06:27:53 -03:00
|
|
|
IMU Invensense I2C:1:0x68 ROTATION_NONE
|
2018-01-14 04:00:47 -04:00
|
|
|
|
2018-03-16 18:49:40 -03:00
|
|
|
# radio IRQ is on GPIO(100)
|
|
|
|
define HAL_GPIO_RADIO_IRQ 100
|
2018-01-14 04:00:47 -04:00
|
|
|
|
2024-05-01 00:23:46 -03:00
|
|
|
define AP_RADIO_ENABLED 1
|
2024-02-01 01:45:16 -04:00
|
|
|
define AP_RADIO_BACKEND_DEFAULT_ENABLED 0
|
|
|
|
define AP_RADIO_CC2500_ENABLED 1
|
|
|
|
define AP_RADIO_CYRF6936_ENABLED 1
|
|
|
|
define AP_RADIO_BK2425_ENABLED 1
|
|
|
|
|
2024-05-01 00:23:46 -03:00
|
|
|
define AP_RCPROTOCOL_ENABLED 1
|
|
|
|
define AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED 0
|
|
|
|
define AP_RCPROTOCOL_RADIO_ENABLED 1
|
|
|
|
|
2021-10-27 02:32:43 -03:00
|
|
|
STORAGE_FLASH_PAGE 1
|
2018-06-23 06:27:28 -03:00
|
|
|
define HAL_STORAGE_SIZE 15360
|
2018-01-15 18:17:34 -04:00
|
|
|
|
2018-01-18 20:25:34 -04:00
|
|
|
# setup defines for ArduCopter config
|
|
|
|
define TOY_MODE_ENABLED ENABLED
|
|
|
|
define ARMING_DELAY_SEC 0
|
|
|
|
define LAND_START_ALT 700
|
|
|
|
define LAND_DETECTOR_ACCEL_MAX 2.0f
|
2018-02-12 17:11:57 -04:00
|
|
|
define ALLOW_ARM_NO_COMPASS
|
2018-01-18 21:27:26 -04:00
|
|
|
|
2021-03-29 20:35:51 -03:00
|
|
|
COMPASS BMM150 I2C:0:0x10 false ROTATION_NONE
|
2018-01-19 01:07:01 -04:00
|
|
|
|
|
|
|
define HAL_BARO_DEFAULT HAL_BARO_20789_I2C_I2C
|
|
|
|
define HAL_BARO_20789_I2C_BUS 1
|
|
|
|
define HAL_BARO_20789_I2C_ADDR_PRESS 0x63
|
|
|
|
define HAL_BARO_20789_I2C_ADDR_ICM 0x68
|
2018-02-06 19:48:36 -04:00
|
|
|
|
|
|
|
# unstick 20789 on I2C on boot
|
|
|
|
define HAL_I2C_CLEAR_BUS
|
2018-03-01 01:51:52 -04:00
|
|
|
|
2020-04-24 00:21:17 -03:00
|
|
|
define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_CHIBIOS_SKYVIPER_F412
|
2018-04-10 19:06:27 -03:00
|
|
|
|
|
|
|
# the web UI uses an abin file for firmware uploads
|
|
|
|
env BUILD_ABIN True
|
2020-04-03 17:56:48 -03:00
|
|
|
|
|
|
|
# need more space for default parameters
|
|
|
|
define AP_PARAM_MAX_EMBEDDED_PARAM 8192
|
2021-04-19 14:09:02 -03:00
|
|
|
|
|
|
|
# Disable un-needed hardware drivers
|
2024-03-22 11:00:48 -03:00
|
|
|
include ../include/skyviper.inc
|
2021-04-19 14:09:02 -03:00
|
|
|
define HAL_WITH_ESC_TELEM 0
|
2021-11-23 00:52:22 -04:00
|
|
|
define AP_FETTEC_ONEWIRE_ENABLED 0
|
2022-02-24 01:34:07 -04:00
|
|
|
|
2023-08-10 05:56:59 -03:00
|
|
|
# bootloader embedding / bootloader flashing not available
|
|
|
|
define AP_BOOTLOADER_FLASHING_ENABLED 0
|
|
|
|
|
2022-02-24 01:34:07 -04:00
|
|
|
AUTOBUILD_TARGETS Copter
|