diff --git a/boards/holybro/durandal-v1/src/board_config.h b/boards/holybro/durandal-v1/src/board_config.h index 7374874cc2..fc3c4729b5 100644 --- a/boards/holybro/durandal-v1/src/board_config.h +++ b/boards/holybro/durandal-v1/src/board_config.h @@ -339,6 +339,7 @@ /* This board provides the board_on_reset interface */ #define BOARD_HAS_ON_RESET 1 +#define SDMMC_PIN_OFF(def) (((def) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_2MHz)) #define PX4_GPIO_INIT_LIST { \ PX4_ADC_GPIO, \ @@ -359,6 +360,11 @@ GPIO_nVDD_5V_HIPOWER_EN, \ GPIO_nVDD_5V_HIPOWER_OC, \ GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \ + SDMMC_PIN_OFF(GPIO_SDMMC1_D0), \ + SDMMC_PIN_OFF(GPIO_SDMMC1_D1), \ + SDMMC_PIN_OFF(GPIO_SDMMC1_D2), \ + SDMMC_PIN_OFF(GPIO_SDMMC1_D3), \ + SDMMC_PIN_OFF(GPIO_SDMMC1_CMD), \ GPIO_VDD_3V3_SD_CARD_EN, \ GPIO_TONE_ALARM_IDLE, \ GPIO_RSSI_IN, \ diff --git a/boards/holybro/durandal-v1/src/init.c b/boards/holybro/durandal-v1/src/init.c index 356953af15..6968ed2bf4 100644 --- a/boards/holybro/durandal-v1/src/init.c +++ b/boards/holybro/durandal-v1/src/init.c @@ -207,7 +207,6 @@ stm32_boardinitialize(void) __EXPORT int board_app_initialize(uintptr_t arg) { /* Power on Interfaces */ - VDD_3V3_SD_CARD_EN(true); VDD_5V_PERIPH_EN(true); VDD_5V_HIPOWER_EN(true); board_control_spi_sensors_power(true, 0xffff); @@ -266,6 +265,11 @@ __EXPORT int board_app_initialize(uintptr_t arg) led_on(LED_RED); } + // Ensure Power is off for > 10 mS + usleep(15 * 1000); + VDD_3V3_SD_CARD_EN(true); + usleep(500 * 1000); + #ifdef CONFIG_MMCSD int ret = stm32_sdio_initialize();