2018-01-26 22:37:08 -04:00
|
|
|
# hw definition file for processing by chibios_pins.py
|
|
|
|
# for mini-pix hardware from RadioLink
|
|
|
|
|
|
|
|
# MCU class and specific type
|
|
|
|
MCU STM32F4xx STM32F405xx
|
|
|
|
|
|
|
|
# board ID for firmware load
|
|
|
|
APJ_BOARD_ID 3
|
|
|
|
|
|
|
|
# crystal frequency
|
|
|
|
OSCILLATOR_HZ 24000000
|
|
|
|
|
2018-02-11 04:28:43 -04:00
|
|
|
# ChibiOS system timer
|
|
|
|
STM32_ST_USE_TIMER 5
|
|
|
|
|
2018-01-26 22:37:08 -04:00
|
|
|
FLASH_SIZE_KB 1024
|
|
|
|
|
|
|
|
|
2018-06-23 07:56:05 -03:00
|
|
|
# use USB for stdout, so no STDOUT_SERIAL
|
|
|
|
# STDOUT_SERIAL SD2
|
|
|
|
# STDOUT_BAUDRATE 57600
|
2018-01-26 22:37:08 -04:00
|
|
|
|
|
|
|
# only one I2C bus
|
2018-02-11 04:28:43 -04:00
|
|
|
I2C_ORDER I2C2 I2C1
|
2018-01-26 22:37:08 -04:00
|
|
|
|
|
|
|
# order of UARTs (and USB)
|
2020-05-02 20:45:07 -03:00
|
|
|
SERIAL_ORDER OTG1 USART3 USART2 UART4
|
2018-02-06 06:39:55 -04:00
|
|
|
|
|
|
|
# UART4 serial GPS
|
|
|
|
PA0 UART4_TX UART4
|
|
|
|
PA1 UART4_RX UART4
|
|
|
|
PA2 BATT_VOLTAGE_SENS ADC1 SCALE(1)
|
|
|
|
PA3 BATT_CURRENT_SENS ADC1 SCALE(1)
|
|
|
|
PA4 VDD_5V_SENS ADC1 SCALE(2)
|
|
|
|
#SPI for MPU6500
|
2018-01-26 22:37:08 -04:00
|
|
|
PA5 SPI1_SCK SPI1
|
|
|
|
PA6 SPI1_MISO SPI1
|
|
|
|
PA7 SPI1_MOSI SPI1
|
|
|
|
|
2019-02-09 23:54:27 -04:00
|
|
|
# setup for power brick
|
|
|
|
define HAL_BATT_VOLT_PIN 2
|
|
|
|
define HAL_BATT_CURR_PIN 3
|
|
|
|
define HAL_BATT_VOLT_SCALE 12.1
|
|
|
|
define HAL_BATT_CURR_SCALE 43.0
|
|
|
|
|
2018-02-06 06:39:55 -04:00
|
|
|
PA9 VBUS INPUT OPENDRAIN
|
2018-01-26 22:37:08 -04:00
|
|
|
|
|
|
|
PA11 OTG_FS_DM OTG1
|
|
|
|
PA12 OTG_FS_DP OTG1
|
2018-02-11 04:28:43 -04:00
|
|
|
PA15 TIM2_CH1 TIM2 GPIO(77) ALARM
|
2018-02-06 06:39:55 -04:00
|
|
|
|
|
|
|
PB0 TIM3_CH3 TIM3 PPMIN # RC Input PPM
|
|
|
|
PB2 BOOT1 INPUT
|
|
|
|
|
2020-02-13 04:06:12 -04:00
|
|
|
PB5 VDD_BRICK_VALID INPUT PULLDOWN
|
2018-01-26 22:37:08 -04:00
|
|
|
|
|
|
|
PB8 I2C1_SCL I2C1
|
|
|
|
PB9 I2C1_SDA I2C1
|
|
|
|
|
2018-02-06 06:39:55 -04:00
|
|
|
PB10 I2C2_SCL I2C2
|
|
|
|
PB11 I2C2_SDA I2C2
|
2018-01-26 22:37:08 -04:00
|
|
|
|
2018-02-06 06:39:55 -04:00
|
|
|
PB13 SPI2_SCK SPI2
|
|
|
|
PB14 SPI2_MISO SPI2
|
|
|
|
PB15 SPI2_MOSI SPI2
|
2018-01-26 22:37:08 -04:00
|
|
|
|
2020-02-13 04:06:12 -04:00
|
|
|
PC0 VBUS_VALID INPUT PULLDOWN
|
2018-02-06 06:39:55 -04:00
|
|
|
PC1 RSSI_IN ADC1
|
|
|
|
PC2 LPS22HB_CS CS
|
|
|
|
PC3 LED_SAFETY OUTPUT
|
|
|
|
PC4 SAFETY_IN INPUT
|
2018-01-26 22:37:08 -04:00
|
|
|
|
2020-01-02 19:34:39 -04:00
|
|
|
# default to RCIN using timer capture
|
|
|
|
PC7 TIM8_CH2 TIM8 RCININT PULLDOWN
|
|
|
|
|
|
|
|
|
2018-02-06 06:39:55 -04:00
|
|
|
PC8 SDIO_D0 SDIO
|
|
|
|
PC9 SDIO_D1 SDIO
|
|
|
|
PC10 SDIO_D2 SDIO
|
|
|
|
PC11 SDIO_D3 SDIO
|
|
|
|
PC12 SDIO_CK SDIO
|
2018-01-26 22:37:08 -04:00
|
|
|
|
2018-02-06 06:39:55 -04:00
|
|
|
PC13 SBUS_INV OUTPUT
|
|
|
|
PC14 MPU6500_DRDY INPUT
|
|
|
|
PC15 MPU6500_CS CS
|
2018-01-26 22:37:08 -04:00
|
|
|
|
2018-02-06 06:39:55 -04:00
|
|
|
PD2 SDIO_CMD SDIO
|
2018-01-26 22:37:08 -04:00
|
|
|
|
2018-02-06 06:39:55 -04:00
|
|
|
# USART2 serial2 telem2
|
|
|
|
PD3 USART2_CTS USART2
|
|
|
|
PD4 USART2_RTS USART2
|
|
|
|
PD5 USART2_TX USART2
|
|
|
|
PD6 USART2_RX USART2
|
2018-01-26 22:37:08 -04:00
|
|
|
|
2018-02-06 06:39:55 -04:00
|
|
|
# USART3 serial3 telem1
|
|
|
|
PD8 USART3_TX USART3
|
|
|
|
PD9 USART3_RX USART3
|
|
|
|
PD10 FRAM_CS CS
|
|
|
|
PD11 USART3_CTS USART3
|
|
|
|
PD12 USART3_RTS USART3
|
|
|
|
|
|
|
|
PD13 TIM4_CH2 TIM4 PWM(5) GPIO(54)
|
|
|
|
PD14 TIM4_CH3 TIM4 PWM(6) GPIO(55)
|
2018-01-26 22:37:08 -04:00
|
|
|
|
2018-02-06 06:39:55 -04:00
|
|
|
PD15 LPS22HB_DRDY INPUT
|
2018-01-26 22:37:08 -04:00
|
|
|
|
2018-02-06 06:39:55 -04:00
|
|
|
PE3 VDD_SENSORS_EN OUTPUT HIGH
|
|
|
|
|
|
|
|
PE9 TIM1_CH1 TIM1 PWM(4) GPIO(53)
|
|
|
|
PE11 TIM1_CH2 TIM1 PWM(3) GPIO(52)
|
|
|
|
PE13 TIM1_CH3 TIM1 PWM(2) GPIO(51)
|
|
|
|
PE14 TIM1_CH4 TIM1 PWM(1) GPIO(50)
|
2018-01-26 22:37:08 -04:00
|
|
|
|
|
|
|
# SPI devices
|
2018-02-06 06:39:55 -04:00
|
|
|
SPIDEV mpu6000 SPI1 DEVID1 MPU6500_CS MODE3 1*MHZ 8*MHZ
|
|
|
|
SPIDEV lps22h SPI2 DEVID3 LPS22HB_CS MODE3 1*MHZ 10*MHZ
|
|
|
|
SPIDEV ramtron SPI2 DEVID4 FRAM_CS MODE3 8*MHZ 8*MHZ
|
|
|
|
|
2019-08-27 08:35:36 -03:00
|
|
|
# one baro
|
|
|
|
BARO LPS2XH SPI:lps22h
|
2018-02-06 06:39:55 -04:00
|
|
|
|
2019-05-29 23:43:03 -03:00
|
|
|
# one IMU
|
|
|
|
IMU Invensense SPI:mpu6000 ROTATION_PITCH_180
|
|
|
|
|
2019-09-01 19:15:09 -03:00
|
|
|
# one internal compass, plus external probe
|
|
|
|
COMPASS QMC5883L I2C:0:0x0D false ROTATION_PITCH_180_YAW_270
|
2018-07-30 03:34:27 -03:00
|
|
|
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
|
2019-09-01 19:15:09 -03:00
|
|
|
define HAL_I2C_INTERNAL_MASK 1
|
2018-07-30 03:34:27 -03:00
|
|
|
|
2018-02-06 06:39:55 -04:00
|
|
|
define HAL_STORAGE_SIZE 16384
|
2018-01-26 22:37:08 -04:00
|
|
|
|
2018-02-06 06:39:55 -04:00
|
|
|
# enable RAMTROM parameter storage
|
|
|
|
define HAL_WITH_RAMTRON 1
|
2018-01-26 22:37:08 -04:00
|
|
|
|
2018-02-06 06:39:55 -04:00
|
|
|
# enable FAT filesystem
|
|
|
|
define HAL_OS_FATFS_IO 1
|
2018-02-11 04:28:43 -04:00
|
|
|
|
|
|
|
# LED setup is similar to PixRacer
|
|
|
|
define HAL_HAVE_PIXRACER_LED
|
|
|
|
PB1 LED_RED OUTPUT GPIO(0)
|
|
|
|
PC5 LED_GREEN OUTPUT GPIO(1)
|
|
|
|
PE12 LED_BLUE OUTPUT GPIO(2)
|
|
|
|
|
|
|
|
define HAL_GPIO_A_LED_PIN 0
|
|
|
|
define HAL_GPIO_B_LED_PIN 1
|
|
|
|
define HAL_GPIO_C_LED_PIN 2
|
|
|
|
|
|
|
|
define HAL_GPIO_LED_ON 0
|
|
|
|
define HAL_GPIO_LED_OFF 1
|
|
|
|
|
2023-10-29 19:49:22 -03:00
|
|
|
include ../include/minimize_features.inc
|
2023-10-18 11:17:06 -03:00
|
|
|
|