Skip to main content
HTD
Senior II
June 10, 2022
Solved

Error on MMC_PowerON() on STM32H7. Why?

  • June 10, 2022
  • 1 reply
  • 1309 views

I have SDMMC1 configured for my H7 as follows:

0693W00000NrcaKQAR.png 

0693W00000NrcZCQAZ.png0693W00000NrcZRQAZ.pngThe card is inserted. I call generated init, and set debug to the HAL_MMC_InitCard of stm32h7xx_hal_mmc.c file, line:

/* Identify card operating voltage */
 errorstate = MMC_PowerON(hmmc);
 if (errorstate != HAL_MMC_ERROR_NONE)
 {
 hmmc->State = HAL_MMC_STATE_READY;
 hmmc->ErrorCode |= errorstate;
 return HAL_ERROR;
 }

The errorstate is -1. What now?

The specific hardware is STM32H747I-DISCO board. I also tested it with hardware flow control disabled. Same result.

 I switched the configuration to SDMMC_BUS_WIDE_1B and it works. At least it passes the initialization. I don't know how to interpret this behavior.

With the previous configuration you can see the QUADSPI module has a warning. The details say that some features are unavailable, but well, since they are not used (at least by me) - that should be fine, or that may be the cause of the problem?

This topic has been closed for replies.
Best answer by HTD

OK, I figured out that it's for MMC cards that are completely different beasts. I have a SD card here ;)

1 reply

HTD
HTDAuthorAnswer
Senior II
June 10, 2022

OK, I figured out that it's for MMC cards that are completely different beasts. I have a SD card here ;)