Investigation on MMCXFR vs SDXFR in STM32_SDMMC_CLKCR_* setting


While reading the ‘board.h’ of the Matek H743 Mini board, I stumbled upon this:

After noticing that the two different seemingly similar macro gets sent independently, I wondered what the difference between these two macros are:



NuttX Macros

The CLKDIV macros above are used in the NuttX in the following part:

This then gets used in the stm32_clock() function for following cases below.

Enabling MMC normal clocking:

SD card normal operation clocking:

And these cases seem to be defined in this enum for SDIO clock:


So it seems that SD card and MMC cards have a different specification, and hence they are called that way.

So for now it just seems like we need to define both cases in the board.h file. However, I am still wondering what the XFR stands for, and why we truly need to set MMC and SD cases separately like it is currently done :person_shrugging: