HAL_ChibiOS:Adapt to CUAV Nora V1.2 hardware

This commit is contained in:
CUAVcaijie 2020-05-20 16:22:08 +08:00 committed by Andrew Tridgell
parent 1ebfc79eb0
commit 220e6999c7
3 changed files with 18 additions and 15 deletions

View File

@ -1,5 +1,7 @@
# setup the temperature compensation
BRD_IMU_TARGTEMP 45
BRD_IMUHEAT_P 50
BRD_IMUHEAT_I 0.07
# turn on the CAN power monitoring(default)
CAN_P1_DRIVER 1
@ -11,3 +13,7 @@ BATT_CURR_PIN 17
BATT_VOLT_MULT 18.000
BATT_AMP_PERVLT 24.000
# turn on CAN RGB LED
NTF_LED_TYPES 231
EK2_IMU_MASK 7

View File

@ -22,9 +22,9 @@ FLASH_BOOTLOADER_LOAD_KB 128
# ChibiOS system timer
STM32_ST_USE_TIMER 2
PD8 LED_RED OUTPUT OPENDRAIN HIGH # red
PC7 LED_ACTIVITY OUTPUT OPENDRAIN HIGH # blue
PC6 LED_BOOTLOADER OUTPUT OPENDRAIN HIGH # green
PI5 LED_RED OUTPUT OPENDRAIN HIGH # red
PI6 LED_BOOTLOADER OUTPUT OPENDRAIN HIGH # green
PI7 LED_ACTIVITY OUTPUT OPENDRAIN HIGH # blue
define HAL_LED_ON 0
@ -59,4 +59,4 @@ PG10 MS5611_IMU_CS CS
PI8 MS5611_BOARD_CS CS
PI4 EXT1_CS1 CS
PI10 EXT1_CS2 CS
PI6 EXT1_CS3 CS
PI13 EXT1_CS3 CS

View File

@ -78,7 +78,7 @@ PI8 MS5611_BOARD_CS CS
# external CS pins, SPI5 connector
PI4 EXT1_CS1 CS
PI10 EXT1_CS2 CS
PI6 EXT1_CS3 CS
PI13 EXT1_CS3 CS
# I2C buses
@ -172,11 +172,8 @@ PE14 TIM1_CH4 TIM1 PWM(12) GPIO(61)
PH6 TIM12_CH1 TIM12 PWM(13) GPIO(62) NODMA
PH9 TIM12_CH2 TIM12 PWM(14) GPIO(63) NODMA
# WS2812 LED
PI5 TIM8_CH1 TIM8 PWM(15) GPIO(64)
# allow for 15 PWMs by default
define BOARD_PWM_COUNT_DEFAULT 15
# allow for 14 PWMs by default
define BOARD_PWM_COUNT_DEFAULT 14
# PWM output for buzzer
PE5 TIM15_CH1 TIM15 GPIO(77) ALARM
@ -223,14 +220,14 @@ PJ4 VDD_5V_PERIPH_OC INPUT PULLUP
PB10 nSPI5_RESET_EXTERNAL1 OUTPUT HIGH
# SPI devices
SPIDEV rm3100 SPI1 DEVID1 RM3100_CS MODE3 2*MHZ 8*MHZ
SPIDEV icm20689 SPI1 DEVID2 ICM20689_CS MODE3 2*MHZ 8*MHZ
SPIDEV icm20689 SPI1 DEVID1 ICM20689_CS MODE3 2*MHZ 8*MHZ
SPIDEV bmi088_a SPI4 DEVID2 BMI088_A_CS MODE3 10*MHZ 10*MHZ
SPIDEV bmi088_g SPI4 DEVID3 BMI088_G_CS MODE3 10*MHZ 10*MHZ
SPIDEV ms5611_imu SPI4 DEVID1 MS5611_IMU_CS MODE3 20*MHZ 20*MHZ
SPIDEV ms5611_board SPI6 DEVID1 MS5611_BOARD_CS MODE3 20*MHZ 20*MHZ
SPIDEV icm20649 SPI6 DEVID2 ICM20649_CS MODE3 2*MHZ 8*MHZ
SPIDEV ramtron SPI2 DEVID1 FRAM_CS MODE3 8*MHZ 8*MHZ
SPIDEV rm3100 SPI2 DEVID2 RM3100_CS MODE3 2*MHZ 8*MHZ
# two baro
BARO MS56XX SPI:ms5611_imu
@ -262,9 +259,9 @@ PD2 SDMMC1_CMD SDMMC1
# red LED marked as B/E
PD8 LED_R1 OUTPUT OPENDRAIN HIGH GPIO(0)
PC6 LED_G1 OUTPUT OPENDRAIN LOW GPIO(1)
PC7 LED_B1 OUTPUT OPENDRAIN HIGH GPIO(2)
PI5 LED_R1 OUTPUT OPENDRAIN HIGH GPIO(0)
PI6 LED_G1 OUTPUT OPENDRAIN LOW GPIO(1)
PI7 LED_B1 OUTPUT OPENDRAIN HIGH GPIO(2)
define HAL_GPIO_A_LED_PIN 0
define HAL_GPIO_B_LED_PIN 1