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.

AM3354: How to ignore MMC0_SDCD

Part Number: AM3354

Using AM3354BZCZ. booting out of sd card. we can't get starterware, or I guess maybe processor, to ignore looking at MMC0_SDCD for boot up. we are using UART functionality for that pin. Ball C15. we need to hold that line low to boot otherwise it won't boot. the card is always there so no need for that functionality.

  • Hello Garry,

    Let me first make sure I understand your question. You are using SD card to boot, and apparently the boot code checks pin C15 which has to be low in order to boot from SD card. But you want to use this pin for UART, so you want the boot code to ignore checking C15.

    Is my understanding correct?

    Thanks,

    Jianzhong

  • yes. someone needs C15 low to boot out of the SD card. we can't find out who. in starterware or in processor. everything else works fine. if held low, code is read from sd card and system boots correctly. we have tried various pin mux setups with no luck.

  • Thanks for confirmation. What did you mean by starterware? Did you mean the ROM boot code? Is your system Linux based or RTOS based?

  • Not Linux. our OS. Starterware was just name of TI Sitara libs and examples. we never get to the OS until code from sd card read into ram.  I am getting more code details from software team now. will advise

  • Okay. I would like to know what software from TI is used.

  • (I work with Gary above) This appears to be a peripheral/hardware problem. (And possibly a documentation "bug" -- see below)

    We do not have a card insert signal wired on our design (SD card is permanently embedded inside device and always present).  In a prior design ZCZ pin C15 was wired in a way that made it usually LOW.  The pinmux for this pin is (in both designs) the GPIO mode (selecting GPIO0_6).  In the old design SD card initialization and access works perfectly.  In the new design (with C15 not connected) SD card transactions fail (hang) due to the card looking like it changes between inserted and removed (noticed in SD_PSTATE[16-18]) during the initialization sequence.  With no other changes to SW/HW, holding C15 low stabilizes the card detect and causes it to work.

    We have solved our problem by working around the card detect by disabling it (putting in test mode):

    HWREG(ctrlInfo.memBase + MMCHS_HCTL) |= MMCHS_HCTL_CDSS
    | MMCHS_HCTL_CDTL;

    Note that the documentation for SD_CON[7] CDP is messed up... it appears to be a cut-paste from SD_CON[8] (at least in SPRUH73P).

    We are still confused by the behavior of the hardware -- particularly how C15 can affect this behavior at all if it is not PINMUX'd to MMC0_SDCD.  Also why C15 being held LOW works while SD_CON[7] == 0 (which would indicate card detect is active high. - however this could be a document bug).  So posting here in case it helps someone else.  Our use case seems to be covered by disabling card detect.

  • Hello Jeff,

    Glad that your problem was solved. Thanks for sharing the details. I just checked the latest AM335x TRM (SPRUH73Q) and the documentation for SDK_CON[7] looks correct.

    Let me loop in our HW team for further comments.

    Regards,

    Jianzhong

  • I need to ask someone that is more familiar with the MMC/SD implementation on AM335x.

    Regards,
    Paul

  • I'm going to assign this thread to someone that is more familiar with the AM335x MMC/SD implementation.

    Regards,
    Paul

  • Jeff, i'm trying to understand if the card detection issue you are seeing is when the ROM is executing or somewhere in the starterware code.  Based on your description, I believe the problem you are seeing is happening in the starterware bootloader.  If that is the case, i'm fairly certain that starterware is using a generic GPIO for card detection (ie, it does not use the card detection feature of the SD controller).  I think that is why when the IO is setup in GPIO mux mode, the level of pin C15 matters.  There should be somewhere in the code where you can disable or ignore this check.  I'm working off of my memory of starterware code, but this is what i recall.   

    The workaround you implemented is probably ok since you are not utilizing the card detect feature, but just wanted to give a possible reason for the behavior you are seeing.

    Regards,

    james