From 71b9e80c04a54795a964613fc383cc2639db7eea Mon Sep 17 00:00:00 2001 From: mateksys Date: Sun, 12 Jun 2022 23:37:13 +0800 Subject: [PATCH] hwdef: added more PWM options in MatekL431-Dshot --- .../hwdef/MatekL431-DShot/defaults.parm | 10 +++++++--- .../hwdef/MatekL431-DShot/hwdef.dat | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-DShot/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-DShot/defaults.parm index 8fbe72dcd0..693494c06d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-DShot/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-DShot/defaults.parm @@ -1,16 +1,20 @@ -# up to 5 motors +# up to 9 motors/servos OUT1_FUNCTION 33 OUT2_FUNCTION 34 OUT3_FUNCTION 35 OUT4_FUNCTION 36 -OUT5_FUNCTION 37 +OUT5_FUNCTION 51 +OUT6_FUNCTION 52 +OUT7_FUNCTION 53 +OUT8_FUNCTION 54 +OUT9_FUNCTION 55 # DShot 600 ESC_PWM_TYPE 7 OUT_BLH_OTYPE 6 -OUT_BLH_MASK 31 +OUT_BLH_MASK 15 # DShot telem on RX1 ESC_TELEM_PORT 0 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-DShot/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-DShot/hwdef.dat index 2d55695ae5..3d809de636 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-DShot/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-DShot/hwdef.dat @@ -4,6 +4,12 @@ define CAN_APP_NODE_NAME "org.ardupilot.MatekL431-DShot" define HAL_USE_ADC FALSE +undef SERIAL_ORDER +undef USART2 USART2_TX USART2_RX +undef PA2 PA3 + +SERIAL_ORDER USART1 EMPTY USART3 + # --------------------- PWM ----------------------- PA8 TIM1_CH1 TIM1 PWM(1) GPIO(50) PA9 TIM1_CH2 TIM1 PWM(2) GPIO(51) @@ -11,6 +17,16 @@ PA10 TIM1_CH3 TIM1 PWM(3) GPIO(52) PA11 TIM1_CH4 TIM1 PWM(4) GPIO(53) PA15 TIM2_CH1 TIM2 PWM(5) GPIO(54) +# TX2/RX2 -- PWM6/7 +PA2 TIM2_CH3 TIM2 PWM(6) GPIO(55) +PA3 TIM2_CH4 TIM2 PWM(7) GPIO(56) + +# "curr" pin -- PWM8 +PA1 TIM2_CH2 TIM2 PWM(8) GPIO(57) + +# "beeper" pin -- PWM9 +PA6 TIM16_CH1 TIM16 PWM(9) GPIO(58) NODMA + define HAL_PERIPH_ENABLE_RC_OUT define HAL_PERIPH_ENABLE_NOTIFY