mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
holybro_durandal-v1:Ensure SDMMC power seqensing is clean
This commit is contained in:
committed by
Daniel Agar
parent
9a0c50325b
commit
025799248c
@@ -339,6 +339,7 @@
|
|||||||
/* This board provides the board_on_reset interface */
|
/* This board provides the board_on_reset interface */
|
||||||
|
|
||||||
#define BOARD_HAS_ON_RESET 1
|
#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 { \
|
#define PX4_GPIO_INIT_LIST { \
|
||||||
PX4_ADC_GPIO, \
|
PX4_ADC_GPIO, \
|
||||||
@@ -359,6 +360,11 @@
|
|||||||
GPIO_nVDD_5V_HIPOWER_EN, \
|
GPIO_nVDD_5V_HIPOWER_EN, \
|
||||||
GPIO_nVDD_5V_HIPOWER_OC, \
|
GPIO_nVDD_5V_HIPOWER_OC, \
|
||||||
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
|
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_VDD_3V3_SD_CARD_EN, \
|
||||||
GPIO_TONE_ALARM_IDLE, \
|
GPIO_TONE_ALARM_IDLE, \
|
||||||
GPIO_RSSI_IN, \
|
GPIO_RSSI_IN, \
|
||||||
|
|||||||
@@ -207,7 +207,6 @@ stm32_boardinitialize(void)
|
|||||||
__EXPORT int board_app_initialize(uintptr_t arg)
|
__EXPORT int board_app_initialize(uintptr_t arg)
|
||||||
{
|
{
|
||||||
/* Power on Interfaces */
|
/* Power on Interfaces */
|
||||||
VDD_3V3_SD_CARD_EN(true);
|
|
||||||
VDD_5V_PERIPH_EN(true);
|
VDD_5V_PERIPH_EN(true);
|
||||||
VDD_5V_HIPOWER_EN(true);
|
VDD_5V_HIPOWER_EN(true);
|
||||||
board_control_spi_sensors_power(true, 0xffff);
|
board_control_spi_sensors_power(true, 0xffff);
|
||||||
@@ -266,6 +265,11 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
|||||||
led_on(LED_RED);
|
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
|
#ifdef CONFIG_MMCSD
|
||||||
int ret = stm32_sdio_initialize();
|
int ret = stm32_sdio_initialize();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user