px4fmu-v5:Fix board_peripheral_reset to use correct polarity

GPIO_nVDD_5V_PERIPH_EN is Active low. board_peripheral_reset
   need to tune it OFF then ON
This commit is contained in:
David Sidrane
2017-06-23 13:09:44 -10:00
parent ebc8b47fad
commit 85b6986079
+2 -2
View File
@@ -172,7 +172,7 @@ __EXPORT void board_peripheral_reset(int ms)
{
/* set the peripheral rails off */
stm32_gpiowrite(GPIO_nVDD_5V_PERIPH_EN, 0);
stm32_gpiowrite(GPIO_nVDD_5V_PERIPH_EN, 1);
stm32_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, 0);
bool last = stm32_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN);
@@ -188,7 +188,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
stm32_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, last);
stm32_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, 1);
stm32_gpiowrite(GPIO_nVDD_5V_PERIPH_EN, 1);
stm32_gpiowrite(GPIO_nVDD_5V_PERIPH_EN, 0);
}