Skip to content

Commit

Permalink
Disarm PWM ESCs before reboot on v5x/v6x
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcekay committed Feb 4, 2025
1 parent 48c0992 commit 83bce44
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion boards/px4/fmu-v5x/src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,13 @@ __EXPORT void board_on_reset(int status)
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
}

/*
* On resets invoked from system (not boot) insure we establish a low
* output state on PWM pins to disarm the ESC and prevent the reset from potentially
* spinning up the motors.
*/
if (status >= 0) {
up_mdelay(6);
up_mdelay(400);
}
}

Expand Down
7 changes: 6 additions & 1 deletion boards/px4/fmu-v6x/src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,13 @@ __EXPORT void board_on_reset(int status)
px4_arch_configgpio(io_timer_channel_get_gpio_output(i));
}

/*
* On resets invoked from system (not boot) insure we establish a low
* output state on PWM pins to disarm the ESC and prevent the reset from potentially
* spinning up the motors.
*/
if (status >= 0) {
up_mdelay(6);
up_mdelay(400);
}
}

Expand Down

0 comments on commit 83bce44

Please sign in to comment.