mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
px4fmu-v4:Insure the discharge of the pins PWM pins on rest.
On resets invoked from system (not boot) insure we establish a low output state (discharge the pins) on PWM pins before they become inputs.
This commit is contained in:
parent
38fa6dcad5
commit
65d8b5c9cd
@ -165,14 +165,22 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
************************************************************************************/
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
UNUSED(status);
|
||||
/* configure the GPIO pins to outputs and keep them low */
|
||||
|
||||
stm32_configgpio(GPIO_GPIO0_OUTPUT);
|
||||
stm32_configgpio(GPIO_GPIO1_OUTPUT);
|
||||
stm32_configgpio(GPIO_GPIO2_OUTPUT);
|
||||
stm32_configgpio(GPIO_GPIO3_OUTPUT);
|
||||
stm32_configgpio(GPIO_GPIO4_OUTPUT);
|
||||
stm32_configgpio(GPIO_GPIO5_OUTPUT);
|
||||
|
||||
/* On resets invoked from system (not boot) insure we establish a low
|
||||
* output state (discharge the pins) on PWM pins before they become inputs.
|
||||
*/
|
||||
|
||||
if (status >= 0) {
|
||||
up_mdelay(6);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user