From 01e1bac365e5ae4c482e3f25e9d849d197015bfa Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 1 Jan 2018 16:44:25 +0100 Subject: [PATCH] FMUv2: Fix Pixhawk Mini boards while hopefully retaining HK Pixhawk units. --- src/drivers/boards/px4fmu-v2/px4fmu_init.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/drivers/boards/px4fmu-v2/px4fmu_init.c b/src/drivers/boards/px4fmu-v2/px4fmu_init.c index 5dab22cbe9..2b77dc029a 100644 --- a/src/drivers/boards/px4fmu-v2/px4fmu_init.c +++ b/src/drivers/boards/px4fmu-v2/px4fmu_init.c @@ -342,10 +342,6 @@ stm32_boardinitialize(void) stm32_configgpio(GPIO_VDD_5V_HIPOWER_OC); stm32_configgpio(GPIO_VDD_5V_PERIPH_OC); - - /* configure SPI interfaces */ - stm32_spiinitialize(); - } /**************************************************************************** @@ -417,6 +413,12 @@ __EXPORT int board_app_initialize(uintptr_t arg) #endif // BOARD_HAS_SIMPLE_HW_VERSIONING + /* Ensure the power is on 1 ms before we drive the GPIO pins */ + usleep(1000); + + /* configure SPI interfaces */ + stm32_spiinitialize(); + /* configure the high-resolution time/callout interface */ hrt_init();