2019-02-28 23:37:28 -04:00
|
|
|
# hw definition file for processing by chibios_hwdef.py
|
|
|
|
# for CUAVv5Nano F7 hardware.
|
2020-12-23 22:02:11 -04:00
|
|
|
# This is a variant of fmuv5 without the IOMCU
|
2019-02-28 23:37:28 -04:00
|
|
|
|
|
|
|
include ../fmuv5/hwdef.dat
|
|
|
|
|
|
|
|
# we shift the system timer to TIM5 to allow
|
|
|
|
# us to use TIM2 for extra PWM outputs
|
|
|
|
STM32_ST_USE_TIMER 5
|
|
|
|
|
|
|
|
# start with PE3 low
|
|
|
|
undef PE3
|
|
|
|
PE3 VDD_3V3_SENSORS_EN OUTPUT LOW
|
|
|
|
|
2019-03-05 03:51:58 -04:00
|
|
|
# order of UARTs (and USB).
|
2020-04-24 08:10:08 -03:00
|
|
|
SERIAL_ORDER OTG1 USART2 USART3 USART1 UART4 USART6 UART7 OTG2
|
2019-02-28 23:37:28 -04:00
|
|
|
|
|
|
|
# enable TX on USART6 (disabled for fmuv5 with iomcu)
|
|
|
|
PG14 USART6_TX USART6 NODMA
|
|
|
|
|
|
|
|
# disable the IOMCU UART
|
|
|
|
undef IOMCU_UART
|
|
|
|
undef UART8_TX
|
|
|
|
undef UART8_RX
|
|
|
|
undef AP_FEATURE_SBUS_OUT
|
|
|
|
|
|
|
|
# allow the first 3 capture ports to be used as PWM outputs or GPIOs
|
|
|
|
undef PA5
|
|
|
|
undef PB3
|
|
|
|
undef PB11
|
|
|
|
undef FMU_CAP1
|
|
|
|
undef FMU_CAP2
|
|
|
|
undef FMU_CAP3
|
|
|
|
|
|
|
|
PA5 TIM2_CH1 TIM2 PWM(9) GPIO(58)
|
|
|
|
PB3 TIM2_CH2 TIM2 PWM(10) GPIO(59)
|
|
|
|
PB11 TIM2_CH4 TIM2 PWM(11) GPIO(60)
|
|
|
|
|
|
|
|
# RCInput on the PPM pin, for all protocols
|
|
|
|
undef PG9
|
|
|
|
undef USART6_RX
|
2021-10-10 18:31:01 -03:00
|
|
|
PI5 TIM8_CH1 TIM8 RCININT PULLDOWN LOW
|
2019-02-28 23:37:28 -04:00
|
|
|
|
|
|
|
# setup for supplied power brick
|
|
|
|
undef HAL_BATT_VOLT_SCALE
|
2019-12-17 21:16:05 -04:00
|
|
|
define HAL_BATT_VOLT_SCALE 18.000
|
2019-02-28 23:37:28 -04:00
|
|
|
undef HAL_BATT_CURR_SCALE
|
2019-12-17 21:16:05 -04:00
|
|
|
define HAL_BATT_CURR_SCALE 24.000
|
2019-02-28 23:37:28 -04:00
|
|
|
|
|
|
|
# setup safety switch
|
|
|
|
PE12 LED_SAFETY OUTPUT
|
|
|
|
PE10 SAFETY_IN INPUT PULLDOWN
|
|
|
|
|
|
|
|
# extra LEDs, active low, used using the pixracer LED scheme
|
2019-05-03 00:57:57 -03:00
|
|
|
# must be opendrain as supply for LEDs is 5V
|
|
|
|
PH10 LED_R1 OUTPUT OPENDRAIN HIGH GPIO(0)
|
|
|
|
PH11 LED_G1 OUTPUT OPENDRAIN HIGH GPIO(1)
|
|
|
|
PH12 LED_B1 OUTPUT OPENDRAIN HIGH GPIO(2)
|
2019-02-28 23:37:28 -04:00
|
|
|
|
|
|
|
undef HAL_GPIO_A_LED_PIN
|
|
|
|
undef HAL_GPIO_B_LED_PIN
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
define HAL_HAVE_PIXRACER_LED
|