About
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:
STM32_SDMMC_MMCXFR_CLKDIV
STM32_SDMMC_SDXFR_CLKDIV
Findings
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:
SDIO, SDMMC
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
Resources
- STM RM0433 Reference manual
- https://www.st.com/content/ccc/resource/training/technical/product_training/group0/06/8b/84/d3/16/f6/4b/95/STM32H7-Peripheral-SDMMC_interface_SDMMC/files/STM32H7-Peripheral-SDMMC_interface_SDMMC.pdf/_jcr_content/translations/en.STM32H7-Peripheral-SDMMC_interface_SDMMC.pdf