HAL_ChibiOS: added f303-PWM

for a PWM output node based on mRo f303 CAN node
This commit is contained in:
Andrew Tridgell 2021-08-26 11:50:25 +10:00
parent dabba69b5e
commit d29057a158
3 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,8 @@
OUT1_MIN 1000
OUT1_MAX 2000
OUT2_MIN 1000
OUT2_MAX 2000
OUT3_MIN 1000
OUT3_MAX 2000
OUT4_MIN 1000
OUT4_MAX 2000

View File

@ -0,0 +1,6 @@
include ../f303-periph/hwdef-bl.inc
# use DNA
define HAL_CAN_DEFAULT_NODE_ID 0
define CAN_APP_NODE_NAME "org.ardupilot.ap_periph_PWM"

View File

@ -0,0 +1,34 @@
include ../f303-periph/hwdef.inc
# use DNA
define HAL_CAN_DEFAULT_NODE_ID 0
define CAN_APP_NODE_NAME "org.ardupilot.ap_periph_PWM"
undef PA2
undef PA3
undef PB14
undef PB15
undef USART2
undef PB6
undef PB7
undef I2C1
undef PA5
undef PA6
undef PA7
undef SPI1
SERIAL_ORDER USART1
I2C_ORDER
# setup for 4 PWM
PA2 TIM2_CH3 TIM2 PWM(1) GPIO(50)
PA3 TIM2_CH4 TIM2 PWM(2) GPIO(51)
PB14 TIM15_CH1 TIM15 PWM(3) GPIO(52)
PB15 TIM15_CH2 TIM15 PWM(4) GPIO(53)
# enable PWM
define HAL_PERIPH_ENABLE_RC_OUT