This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Card detect in MMC module if no switch is used

Hi,

If no pin of the AM335x is muxed to the "mmcx_sdcd" signal (Card Detect) of a MMC module (like on a AM335x ICE board)  what level does the bit "CINS" respective the bit "CDPL" in the register "SD_PSTATE" reflect?

I ask this question because the bootloader in StarterWare will check if card is inserted (if (MMCSDCardPresent(&ctrlInfo)==0)).

Thanks.
Best regards,
Patrick

  • Hi,

    To use Card Detect of MMC module the mmc0_sdcd pin has to be pinmuxed as below. Otherwise the behaviour is not consistent and reliable. Please refer to the example hs_mmcsd for pin mux details or below is the pinmux configuration for mmc0_sdcd pin.

         HWREG(SOC_CONTROL_REGS + CONTROL_CONF_SPI0_CS1) =
                       (5 << CONTROL_CONF_SPI0_CS1_CONF_SPI0_CS1_MMODE_SHIFT)    |
                       (0 << CONTROL_CONF_SPI0_CS1_CONF_SPI0_CS1_PUDEN_SHIFT)    |
                       (1 << CONTROL_CONF_SPI0_CS1_CONF_SPI0_CS1_PUTYPESEL_SHIFT)|
                       (1 << CONTROL_CONF_SPI0_CS1_CONF_SPI0_CS1_RXACTIVE_SHIFT);

    Thanks for point out the issue and will be corrected in next release.

    Regards,

    Ramesh D