From 35239c48a27a7cade0a0b8a330af18294dfe88cf Mon Sep 17 00:00:00 2001 From: Daniele Pettenuzzo Date: Wed, 25 Sep 2024 15:57:46 +0200 Subject: [PATCH] Board: Fix fmu rc_input on v5x and v6x (#23175) Co-authored-by: Niklas Hauser --- boards/px4/fmu-v5x/src/board_config.h | 5 ++++- boards/px4/fmu-v6x/src/board_config.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/boards/px4/fmu-v5x/src/board_config.h b/boards/px4/fmu-v5x/src/board_config.h index 2fe1654b65..aaa7c21df8 100644 --- a/boards/px4/fmu-v5x/src/board_config.h +++ b/boards/px4/fmu-v5x/src/board_config.h @@ -287,9 +287,12 @@ #define GPIO_PPM_IN /* PI5 T8C1 */ GPIO_TIM8_CH1IN_2 /* RC Serial port */ - #define RC_SERIAL_PORT "/dev/ttyS5" +/* Some RC protocols are bi-directional, therefore we need a half-duplex UART */ #define RC_SERIAL_SINGLEWIRE +/* The STM32 UART by default wires half-duplex mode to the TX pin, but our + * signal in routed to the RX pin, so we need to swap the pins */ +#define RC_SERIAL_SWAP_RXTX /* Input Capture Channels. */ #define INPUT_CAP1_TIMER 5 diff --git a/boards/px4/fmu-v6x/src/board_config.h b/boards/px4/fmu-v6x/src/board_config.h index 7c98f94902..6590699a39 100644 --- a/boards/px4/fmu-v6x/src/board_config.h +++ b/boards/px4/fmu-v6x/src/board_config.h @@ -324,9 +324,12 @@ #define GPIO_PPM_IN /* PI5 T8C1 */ GPIO_TIM8_CH1IN_2 /* RC Serial port */ - #define RC_SERIAL_PORT "/dev/ttyS5" +/* Some RC protocols are bi-directional, therefore we need a half-duplex UART */ #define RC_SERIAL_SINGLEWIRE +/* The STM32 UART by default wires half-duplex mode to the TX pin, but our + * signal in routed to the RX pin, so we need to swap the pins */ +#define RC_SERIAL_SWAP_RXTX /* Input Capture Channels. */ #define INPUT_CAP1_TIMER 1