This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit a9ff808dd1acd55f7c76644d391d3da21973badd Author: David Sidrane <david.sidr...@nscdg.com> AuthorDate: Tue Sep 21 11:11:23 2021 -0700 stm32xx:sdmmc/sdio remove redundant GPIO config The stm32_gpiosetevent calls stm32_configgpio. So the pin is infact restored to the SDMMC/SDIO D0. The seconday init, dropped interrupts in a debug build with HW stack checking on after the GPIO glich fixes and that was how it was detected. --- arch/arm/src/stm32/stm32_sdio.c | 5 ++--- arch/arm/src/stm32f7/stm32_sdmmc.c | 5 ++--- arch/arm/src/stm32h7/stm32_sdmmc.c | 5 ++--- arch/arm/src/stm32l4/stm32l4_sdmmc.c | 5 ++--- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/arch/arm/src/stm32/stm32_sdio.c b/arch/arm/src/stm32/stm32_sdio.c index 3b38f7d..cce6936 100644 --- a/arch/arm/src/stm32/stm32_sdio.c +++ b/arch/arm/src/stm32/stm32_sdio.c @@ -667,19 +667,18 @@ static void stm32_configwaitints(struct stm32_dev_s *priv, uint32_t waitmask, pinset = GPIO_SDIO_D0 & (GPIO_PORT_MASK | GPIO_PIN_MASK); pinset |= (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI); - /* Arm the SDIO_D Ready and install Isr */ + /* Arm the SDIO_D0 Ready and install Isr */ stm32_gpiosetevent(pinset, true, false, false, stm32_rdyinterrupt, priv); } - /* Disarm SDIO_D ready */ + /* Disarm SDIO_D0 ready and return it to SDIO D0 */ if ((wkupevent & SDIOWAIT_WRCOMPLETE) != 0) { stm32_gpiosetevent(GPIO_SDIO_D0, false, false, false, NULL, NULL); - stm32_configgpio(GPIO_SDIO_D0); } #endif diff --git a/arch/arm/src/stm32f7/stm32_sdmmc.c b/arch/arm/src/stm32f7/stm32_sdmmc.c index 920a02a..0126f87 100644 --- a/arch/arm/src/stm32f7/stm32_sdmmc.c +++ b/arch/arm/src/stm32f7/stm32_sdmmc.c @@ -862,19 +862,18 @@ static void stm32_configwaitints(struct stm32_dev_s *priv, uint32_t waitmask, GPIO_PUPD_MASK); pinset |= (GPIO_INPUT | GPIO_EXTI); - /* Arm the SDMMC_D Ready and install Isr */ + /* Arm the SDMMC_D0 Ready and install Isr */ stm32_gpiosetevent(pinset, true, false, false, stm32_sdmmc_rdyinterrupt, priv); } - /* Disarm SDMMC_D ready */ + /* Disarm SDMMC_D0 ready and return it to SDMMC D0 */ if ((wkupevent & SDIOWAIT_WRCOMPLETE) != 0) { stm32_gpiosetevent(priv->d0_gpio, false, false, false, NULL, NULL); - stm32_configgpio(priv->d0_gpio); } #endif diff --git a/arch/arm/src/stm32h7/stm32_sdmmc.c b/arch/arm/src/stm32h7/stm32_sdmmc.c index 795c4d7..09c65cf 100644 --- a/arch/arm/src/stm32h7/stm32_sdmmc.c +++ b/arch/arm/src/stm32h7/stm32_sdmmc.c @@ -801,19 +801,18 @@ static void stm32_configwaitints(struct stm32_dev_s *priv, uint32_t waitmask, GPIO_PUPD_MASK); pinset |= (GPIO_INPUT | GPIO_EXTI); - /* Arm the SDMMC_D Ready and install Isr */ + /* Arm the SDMMC_D0 Ready and install Isr */ stm32_gpiosetevent(pinset, true, false, false, stm32_sdmmc_rdyinterrupt, priv); } - /* Disarm SDMMC_D ready */ + /* Disarm SDMMC_D0 ready and return it to SDMMC D0 */ if ((wkupevent & SDIOWAIT_WRCOMPLETE) != 0) { stm32_gpiosetevent(priv->d0_gpio, false, false, false, NULL, NULL); - stm32_configgpio(priv->d0_gpio); } #endif diff --git a/arch/arm/src/stm32l4/stm32l4_sdmmc.c b/arch/arm/src/stm32l4/stm32l4_sdmmc.c index 77f6d70..be92f71 100644 --- a/arch/arm/src/stm32l4/stm32l4_sdmmc.c +++ b/arch/arm/src/stm32l4/stm32l4_sdmmc.c @@ -782,19 +782,18 @@ static void stm32_configwaitints(struct stm32_dev_s *priv, uint32_t waitmask, pinset = priv->d0_gpio & (GPIO_PORT_MASK | GPIO_PIN_MASK); pinset |= (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI); - /* Arm the SDMMC_D Ready and install ISR */ + /* Arm the SDMMC_D0 Ready and install ISR */ stm32_gpiosetevent(pinset, true, false, false, stm32_sdmmc_rdyinterrupt, priv); } - /* Disarm SDMMC_D ready */ + /* Disarm SDMMC_D0 ready and return it to SDMMC D0 */ if ((wkupevent & SDIOWAIT_WRCOMPLETE) != 0) { stm32_gpiosetevent(priv->d0_gpio, false, false, false, NULL, NULL); - stm32_configgpio(priv->d0_gpio); } #endif