From 4e1905c1d84f48885380594d94c2cd4d990112fe Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sat, 28 Feb 2015 14:32:11 +0100 Subject: [PATCH] FMU: Fix peripheral reset --- src/drivers/px4fmu/fmu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drivers/px4fmu/fmu.cpp b/src/drivers/px4fmu/fmu.cpp index b5907c1cce..7b09a4676a 100644 --- a/src/drivers/px4fmu/fmu.cpp +++ b/src/drivers/px4fmu/fmu.cpp @@ -1383,12 +1383,12 @@ PX4FMU::peripheral_reset(int ms) #if defined(CONFIG_ARCH_BOARD_PX4FMU_V2) if (ms < 1) { - ms = 1; + ms = 10; } /* set the peripheral rails off */ stm32_configgpio(GPIO_VDD_5V_PERIPH_EN); - stm32_gpiowrite(GPIO_VDD_5V_PERIPH_EN, 0); + stm32_gpiowrite(GPIO_VDD_5V_PERIPH_EN, 1); /* wait for the peripheral rail to reach GND */ usleep(ms * 1000); @@ -1397,7 +1397,7 @@ PX4FMU::peripheral_reset(int ms) /* re-enable power */ /* switch the peripheral rail back on */ - stm32_gpiowrite(GPIO_VDD_5V_PERIPH_EN, 1); + stm32_gpiowrite(GPIO_VDD_5V_PERIPH_EN, 0); #endif }