Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stm32h7:sdmmc It is not an error if no wait was needed #9228

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions arch/arm/src/stm32h7/stm32_sdmmc.c
Expand Up @@ -2797,7 +2797,7 @@ static void stm32_waitenable(struct sdio_dev_s *dev,
#if defined(CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE)
if ((eventset & SDIOWAIT_WRCOMPLETE) != 0)
{
/* Read pin to see if ready (true) skip timeout */
/* Read pin to see if ready (true) skip timeout and the pin IRQ */

if (stm32_gpioread(priv->d0_gpio))
{
Expand Down Expand Up @@ -2894,13 +2894,15 @@ static sdio_eventset_t stm32_eventwait(struct sdio_dev_s *dev)
flags = enter_critical_section();

#if defined(CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE)
/* A card ejected while in SDIOWAIT_WRCOMPLETE can lead to a
/* A call to stm32_waitenable that finds the card ready or
* a card ejected while in SDIOWAIT_WRCOMPLETE can lead to a
* condition where there is no waitevents set and no wkupevent
* This simply means we should not wait.
*/

if (priv->waitevents == 0 && priv->wkupevent == 0)
{
wkupevent = SDIOWAIT_ERROR;
wkupevent = 0;
goto errout_with_waitints;
}

Expand Down