From 36f6d4b8fad2420750436b459b12773d97791ee9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 24 Aug 2023 17:02:26 +1000 Subject: [PATCH] hwdef: added DMA for USART3 for MatekL431-RC and GPS this allows for faster connections also added 4 PWM output requested by Josh and Sampson --- .../hwdef/MatekL431-GPS/hwdef.dat | 5 +++++ .../hwdef/MatekL431-RC/hwdef.dat | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-GPS/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-GPS/hwdef.dat index e54e19d18790c..b8801bdbffdef 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-GPS/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-GPS/hwdef.dat @@ -54,3 +54,8 @@ define HAL_CAN_POOL_SIZE 12000 define HAL_PERIPH_ENABLE_MSP define HAL_MSP_ENABLED 1 define AP_PERIPH_MSP_PORT_DEFAULT 1 + +undef PB10 +undef PB11 +PB10 USART3_TX USART3 SPEED_HIGH +PB11 USART3_RX USART3 SPEED_HIGH diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-RC/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-RC/hwdef.dat index 418c3394b0bd2..66534adc70561 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-RC/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekL431-RC/hwdef.dat @@ -8,3 +8,22 @@ define HAL_DISABLE_ADC_DRIVER TRUE define HAL_PERIPH_ENABLE_RCIN 1 define AP_PERIPH_RC1_PORT_DEFAULT 2 + +# Added DMA for RC input +undef PB10 +undef PB11 +PB10 USART3_TX USART3 SPEED_HIGH +PB11 USART3_RX USART3 SPEED_HIGH + +# allow for 4 PWM outputs +PA8 TIM1_CH1 TIM1 PWM(1) GPIO(50) +PA9 TIM1_CH2 TIM1 PWM(2) GPIO(51) +PA10 TIM1_CH3 TIM1 PWM(3) GPIO(52) +PA11 TIM1_CH4 TIM1 PWM(4) GPIO(53) + +define HAL_PERIPH_ENABLE_RC_OUT +define HAL_PERIPH_ENABLE_NOTIFY + +# enable ESC control +define HAL_SUPPORT_RCOUT_SERIAL 1 +define HAL_WITH_ESC_TELEM 1