From 192c2a32c8d97f26bf8dfcc37e7607cac52e35f3 Mon Sep 17 00:00:00 2001 From: Mark Whitehorn Date: Sun, 20 Mar 2016 09:28:29 -0600 Subject: [PATCH] unconfigure GPIO_PPM_IN before reconfiguring --- src/drivers/px4fmu/fmu.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/drivers/px4fmu/fmu.cpp b/src/drivers/px4fmu/fmu.cpp index 965e1a629e..7f77a0450d 100644 --- a/src/drivers/px4fmu/fmu.cpp +++ b/src/drivers/px4fmu/fmu.cpp @@ -901,6 +901,7 @@ PX4FMU::cycle() // assume SBUS input sbus_config(_rcs_fd, false); // disable CPPM input by mapping it away from the timer capture input + stm32_unconfiggpio(GPIO_PPM_IN); stm32_configgpio(GPIO_PPM_IN & ~(GPIO_AF_MASK | GPIO_PUPD_MASK)); #endif @@ -1331,6 +1332,7 @@ PX4FMU::cycle() } else { // disable CPPM input by mapping it away from the timer capture input + stm32_unconfiggpio(GPIO_PPM_IN); stm32_configgpio(GPIO_PPM_IN & ~(GPIO_AF_MASK | GPIO_PUPD_MASK)); // Scan the next protocol set_rc_scan_state(RC_SCAN_SBUS);