From 3424051d5bde8f6434b26626691a6037f30e859c Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Wed, 31 Aug 2022 21:24:41 +0100 Subject: [PATCH] AP_HAL_ChibiOS: hwdef for bdshot version of CUAV Nora/Nora+ --- .../hwdef/CUAV-Nora-bdshot/defaults.parm | 19 +++++++++++++++++++ .../hwdef/CUAV-Nora-bdshot/hwdef-bl.dat | 1 + .../hwdef/CUAV-Nora-bdshot/hwdef.dat | 14 ++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora-bdshot/defaults.parm create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora-bdshot/hwdef-bl.dat create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora-bdshot/hwdef.dat diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora-bdshot/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora-bdshot/defaults.parm new file mode 100644 index 0000000000..53367d845c --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora-bdshot/defaults.parm @@ -0,0 +1,19 @@ +# setup the temperature compensation +BRD_HEAT_TARG 45 +BRD_HEAT_P 50 +BRD_HEAT_I 0.07 + +# turn on the CAN power monitoring(default) +CAN_P1_DRIVER 1 +BATT_MONITOR 8 + +# setup the parameter for the ADC power module +BATT_VOLT_PIN 16 +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 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora-bdshot/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora-bdshot/hwdef-bl.dat new file mode 100644 index 0000000000..a05edff629 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora-bdshot/hwdef-bl.dat @@ -0,0 +1 @@ +include ../CUAV-Nora/hwdef-bl.dat diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora-bdshot/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora-bdshot/hwdef.dat new file mode 100644 index 0000000000..a708da7715 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CUAV-Nora-bdshot/hwdef.dat @@ -0,0 +1,14 @@ +# Bi-directional dshot version of CUAV-Nora + +include ../CUAV-Nora/hwdef.dat + +undef PH10 PH12 PD12 PD14 + +# This gives bi-dir dshot on the first eight channels +PH10 TIM5_CH1 TIM5 PWM(1) GPIO(50) BIDIR +PH12 TIM5_CH3 TIM5 PWM(3) GPIO(52) BIDIR +PD12 TIM4_CH1 TIM4 PWM(5) GPIO(54) BIDIR +PD14 TIM4_CH3 TIM4 PWM(7) GPIO(56) BIDIR + +NODMA I2C* +define STM32_I2C_USE_DMA FALSE