forked from Archive/PX4-Autopilot
holybro_durandal-v1:Ensure SDMMC power seqensing is clean
This commit is contained in:
parent
9a0c50325b
commit
025799248c
|
@ -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, \
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue