mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-06 06:43:21 +08:00
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:
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user