From 4ba064b017cc63088f9cee7a9fa200299130415c Mon Sep 17 00:00:00 2001 From: Jan NIJS Date: Sun, 18 Jun 2017 12:26:00 +0200 Subject: [PATCH] LP-533 incorrect MCU pin used to toggle inverter for rcvr port on Sparky2 Bug introduced by LP-480. The wrong MCU pin is used for toggling the input inversion. This inverted the serial signal when it should not be inverted. ibus reception and possibly other serial receiver protocols where not working. PC4 was controlled, but according to the schematic, PC6 is connected to the xor port. PC4 is actually connected to the gyro interrupt. This bug explains another issue I saw from time to time. After a restart of the Sparky2 board, gyro and accelerometer graphs remained locked at 0. Making the board unusable for flight. --- flight/targets/boards/sparky2/pios_board.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/targets/boards/sparky2/pios_board.h b/flight/targets/boards/sparky2/pios_board.h index b4c17c0fe..9afe47393 100644 --- a/flight/targets/boards/sparky2/pios_board.h +++ b/flight/targets/boards/sparky2/pios_board.h @@ -145,7 +145,7 @@ extern uint32_t pios_i2c_flexiport_adapter_id; // Inverter for SBUS handling #define PIOS_USART_INVERTER_PORT USART6 #define PIOS_USART_INVERTER_GPIO GPIOC -#define PIOS_USART_INVERTER_PIN GPIO_Pin_4 +#define PIOS_USART_INVERTER_PIN GPIO_Pin_6 #define PIOS_USART_INVERTER_ENABLE Bit_SET #define PIOS_USART_INVERTER_DISABLE Bit_RESET