Showing results for 
Search instead for 
Did you mean: 

Problem with MX_SDMMC1_MMC_Init(); on the STM32F769I-EVAL board



I'm trying to run software on a STM32F769I-EVAL board, generating initialisation code with STM32CubeMX.

I use the default template for the board in CubeMX. The code is generated with no problem. But when debugging, it never goes to the main loop. The problem seem to be in the SDMMC init.

There is no SD card on the board.

In the  MX_SDMMC1_MMC_Init();

  • HAL_MMC_Init() return
  • HAL_MMC_ConfigWideBusOperation never return (it return, but after a very long time)

In this function, there is a loop:

  • /* While card is not ready for data and trial number for sending CMD13 is not exceeded */
  • The counter is set count = SDMMC_DATATIMEOUT; which is 0xFFFFFFFFU

If I change the value to 100, it return. But why is the value set so high?

is there something to do to return when there is no SD?

Thank you



Isn't there a GPIO to detect presence, check that and then stop ploughing forward?

Doesn't HAL_MMC_Init() report an error?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Yes, there is a GPIO to detect presence: MFX GPIO15. I am looking for information about MFX. It is I2C, but no other information on board manual!

I though that the default code was checking for the presence of the card. It seems that it is not the case.

Indeed HAL_MMC_Init() report an error after a loop goes to time out. But the value is 65536, so it end faster. And I was wondering why the value is so high for the wide bus init.

Associate III

I'm having similar issue