mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-30 13:00:57 +08:00
build(bitbang_uart): let esc_4way and serialpassthrough each select the pin UART
The ESC pin UART was only built with SERIALPASSTHROUGH_BITBANG, so a board had to enable the MAVLink serial passthrough module to get esc_4way, which does not use it. The ARK STM32H7 boards enabled that module only for the backend and drop it. Assisted-by: Claude:claude-fable-5-2
This commit is contained in:
1 parent
0e8ff0d538
commit
721aac1c3b
13 files changed
+24
-29
No files matched your search
@@ -41,8 +41,6 @@ CONFIG_DRIVERS_PWM_OUT=y
|
||||
CONFIG_DRIVERS_PX4IO=y
|
||||
CONFIG_COMMON_RC=y
|
||||
CONFIG_DRIVERS_SAFETY_BUTTON=y
|
||||
CONFIG_DRIVERS_SERIALPASSTHROUGH=y
|
||||
CONFIG_SERIALPASSTHROUGH_BITBANG=y
|
||||
CONFIG_DRIVERS_ESC_4WAY=y
|
||||
CONFIG_DRIVERS_TONE_ALARM=y
|
||||
CONFIG_DRIVERS_UAVCAN=y
|
||||
|
||||
@@ -41,8 +41,6 @@ CONFIG_DRIVERS_PWM_OUT=y
|
||||
CONFIG_DRIVERS_PX4IO=y
|
||||
CONFIG_COMMON_RC=y
|
||||
CONFIG_DRIVERS_SAFETY_BUTTON=y
|
||||
CONFIG_DRIVERS_SERIALPASSTHROUGH=y
|
||||
CONFIG_SERIALPASSTHROUGH_BITBANG=y
|
||||
CONFIG_DRIVERS_ESC_4WAY=y
|
||||
CONFIG_DRIVERS_TONE_ALARM=y
|
||||
CONFIG_DRIVERS_UAVCAN=y
|
||||
|
||||
@@ -32,8 +32,6 @@ CONFIG_DRIVERS_OSD_MSP_OSD=y
|
||||
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
CONFIG_DRIVERS_PWM_OUT=y
|
||||
CONFIG_COMMON_RC=y
|
||||
CONFIG_DRIVERS_SERIALPASSTHROUGH=y
|
||||
CONFIG_SERIALPASSTHROUGH_BITBANG=y
|
||||
CONFIG_DRIVERS_ESC_4WAY=y
|
||||
CONFIG_DRIVERS_UAVCAN=y
|
||||
CONFIG_MODULES_BATTERY_STATUS=y
|
||||
|
||||
@@ -24,8 +24,6 @@ CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
CONFIG_DRIVERS_PWM_OUT=y
|
||||
CONFIG_COMMON_RC=y
|
||||
CONFIG_DRIVERS_SERIALPASSTHROUGH=y
|
||||
CONFIG_SERIALPASSTHROUGH_BITBANG=y
|
||||
CONFIG_DRIVERS_ESC_4WAY=y
|
||||
CONFIG_DRIVERS_TONE_ALARM=y
|
||||
CONFIG_DRIVERS_UAVCAN=y
|
||||
|
||||
@@ -95,11 +95,9 @@ esc-configurator.com has an override for this and shows the port regardless of i
|
||||
|
||||
The ESC configuration server drives the ESC signal pins as a half-duplex UART.
|
||||
That backend exists for STM32F7/H7 boards and for the NXP i.MX RT1064/RT1176 and i.MX95 boards.
|
||||
To enable the server, add these keys to the board's `default.px4board`:
|
||||
To enable the server, add this key to the board's `default.px4board`:
|
||||
|
||||
```text
|
||||
CONFIG_DRIVERS_SERIALPASSTHROUGH=y
|
||||
CONFIG_SERIALPASSTHROUGH_BITBANG=y
|
||||
CONFIG_DRIVERS_ESC_4WAY=y
|
||||
```
|
||||
|
||||
|
||||
@@ -24,3 +24,18 @@ config BOARD_PWM_FREQ
|
||||
default 1000000 if !ARCH_CHIP_S32K3XX
|
||||
---help---
|
||||
Board default PWM frequency
|
||||
|
||||
config UART_BITBANG
|
||||
bool
|
||||
---help---
|
||||
Half-duplex UART on the ESC signal pins (drv_bitbang_uart.h).
|
||||
Selected by the drivers that use it.
|
||||
|
||||
config UART_BITBANG_TIMER
|
||||
int "Timer instance for bit-bang UART"
|
||||
depends on UART_BITBANG
|
||||
default 13
|
||||
range 1 17
|
||||
---help---
|
||||
Timer instance to use for bit-bang UART timing mode.
|
||||
Default TIM13.
|
||||
@@ -42,6 +42,6 @@ add_subdirectory(../imx9/spi spi)
|
||||
add_subdirectory(../imx9/tone_alarm tone_alarm)
|
||||
add_subdirectory(../nxp_common/dshot dshot)
|
||||
|
||||
if(CONFIG_SERIALPASSTHROUGH_BITBANG)
|
||||
if(CONFIG_UART_BITBANG)
|
||||
add_subdirectory(../nxp_common/flexio_uart flexio_uart)
|
||||
endif()
|
||||
@@ -39,7 +39,7 @@ add_subdirectory(../imxrt/board_reset board_reset)
|
||||
add_subdirectory(../imxrt/romapi romapi)
|
||||
add_subdirectory(../nxp_common/dshot dshot)
|
||||
|
||||
if(CONFIG_SERIALPASSTHROUGH_BITBANG)
|
||||
if(CONFIG_UART_BITBANG)
|
||||
add_subdirectory(../nxp_common/flexio_uart flexio_uart)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ add_subdirectory(../imxrt/version version)
|
||||
add_subdirectory(../imxrt/spi spi)
|
||||
add_subdirectory(../nxp_common/dshot dshot)
|
||||
|
||||
if(CONFIG_SERIALPASSTHROUGH_BITBANG)
|
||||
if(CONFIG_UART_BITBANG)
|
||||
add_subdirectory(../nxp_common/flexio_uart flexio_uart)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ add_subdirectory(../stm32_common/spi spi)
|
||||
add_subdirectory(../stm32_common/tone_alarm tone_alarm)
|
||||
add_subdirectory(../stm32_common/version version)
|
||||
|
||||
if(CONFIG_SERIALPASSTHROUGH_BITBANG)
|
||||
if(CONFIG_UART_BITBANG)
|
||||
add_subdirectory(../stm32_common/bitbang_uart bitbang_uart)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ add_subdirectory(../stm32_common/spi spi)
|
||||
add_subdirectory(../stm32_common/tone_alarm tone_alarm)
|
||||
add_subdirectory(../stm32_common/version version)
|
||||
|
||||
if(CONFIG_SERIALPASSTHROUGH_BITBANG)
|
||||
if(CONFIG_UART_BITBANG)
|
||||
add_subdirectory(../stm32_common/bitbang_uart bitbang_uart)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
menuconfig DRIVERS_ESC_4WAY
|
||||
bool "esc_4way (MSP and 4way ESC configuration server over USB or a serial port)"
|
||||
default n
|
||||
depends on SERIALPASSTHROUGH_BITBANG
|
||||
depends on PLATFORM_NUTTX
|
||||
select UART_BITBANG
|
||||
---help---
|
||||
Serves the BLHeli/AM32 4way interface protocol to ESC configurators
|
||||
(am32.ca, esc-configurator.com) through the flight controller: MSP on
|
||||
|
||||
@@ -12,19 +12,8 @@ config SERIALPASSTHROUGH_BITBANG
|
||||
bool "Enable bit-bang UART support (ESC channel mode)"
|
||||
default n
|
||||
depends on PLATFORM_NUTTX
|
||||
select UART_BITBANG
|
||||
---help---
|
||||
Enable bit-bang UART.
|
||||
|
||||
if SERIALPASSTHROUGH_BITBANG
|
||||
|
||||
config UART_BITBANG_TIMER
|
||||
int "Timer instance for bit-bang UART"
|
||||
default 13
|
||||
range 1 17
|
||||
---help---
|
||||
Timer instance to use for bit-bang UART timing mode.
|
||||
Default TIM13.
|
||||
|
||||
endif # SERIALPASSTHROUGH_BITBANG
|
||||
|
||||
endif # DRIVERS_SERIALPASSTHROUGH
|
||||
Reference in new issue
Block a user