From 6eff7deb7edc5419bdeef3ddf2ce26fdc02a6960 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Thu, 29 Jun 2017 02:58:22 -1000 Subject: [PATCH] Extend the delay ensure post reset pulse delayed. Given the original poster's comment that "It happens very consistently for us." I suspect the motor spin observed in https://github.com/PX4/Firmware/issues/7457 is not caused by the original issue of slow decay on the PWM pins at reset, but the post reset pulse of 3.1 Ms arriving in a window that the ESC considers it valid. The results from testing, indicated that the if the PWM pins were clamped low for > 300 Ms, prior to reset the motors did not spin. This would delay the the post reset pulse of 3.1 Ms out by > 300 Ms. This change delays the reset and therefore the pulse by at least 400 Ms. --- src/drivers/boards/px4fmu-v4/px4fmu_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/boards/px4fmu-v4/px4fmu_init.c b/src/drivers/boards/px4fmu-v4/px4fmu_init.c index f408ab74cc..0cd1007bd5 100644 --- a/src/drivers/boards/px4fmu-v4/px4fmu_init.c +++ b/src/drivers/boards/px4fmu-v4/px4fmu_init.c @@ -179,7 +179,7 @@ __EXPORT void board_on_reset(int status) */ if (status >= 0) { - up_mdelay(6); + up_mdelay(400); } }