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.

PROCESSOR-SDK-AM335X: Cannot read SD card Status and SCR register

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: AM3359

I am looking for an example to for the AM335x /MMC module to interface with the SD card.

My problem is the ACMD13 (SD Status) and the ACMD51 (SCR Register).  These commands are supposed to have 512 bits (64 bytes) Block data sent to the host via the DATA register.

The commands are sent correctly without any error and the R1 response indicates that no error and the commands was successful.

However, when I read the SD_DATA (Offset 220h) register for the 512 bits block, it return all "0".

What did I do wrong, can you help?

Thanks

TRieu Pham

  • What software are you using? MMC is fully supported in the TI released Processor SDK: www.ti.com/.../PROCESSOR-SDK-AM335X
  • I am using Starterware.  I looked into the example (mmcsd ) folder  and do not see anywhere it tries to read the SD Status (ACMD13) and SCR (ACMD51)  registers.

    The example showed how to set the bus and initialize the card but it has never check the for if the setting getting to SD card.

    I have doubt that the MMC works for that part.  I hope you can shred some light into it.

    Thank you in advance!

  • Trieu,

    Which version of Starterware are you using? I  assume you are trying the example from C:\ti\pdk_am335x_1_0_6\packages\ti\starterware\examples\mmcsd ?

    Do you see the commands you mentioned being set in SD_CMD register offset 0x20C when running the example and stepping through the code?

    Lali

  • Hi Lali,
    Yes I saw that command was set in the SD_CMD register. Note that this the Application Specific (ACMD) so the command 55 sent first then command 13 or command 51 sent.
  • Hi Lali and Biser,

    Do you have any more suggestions?

    I did some more tests and I think it might be the TI did not update the DATA registers for these commands.

    The command was accepted nicely by the SD card and it is mandatory that with these commands require response in the SD_DATA ,

    TI did not transfer the data . Can you look into it?

    Check first with the CMD6, this is per specification, 32 bits responses (R1) in the SD_RSP accompanied with 512 bits DATA in the DAT line.

    In my test, the R1 response in SD_RSP10 (210h) is okay.

    But the 512bits response in the SD_DATA (220h) is not okay.

    Can you take a look into this possible error?

    -Trieu

  • Trieu,
    Is it possible for you to try the PDK based example located at:
    C:\ti\pdk_am335x_1_0_6\packages\MyExampleProjects\MMCSD_evmAM335x_armTestProject

    Which AM335x EVM are you using? is it the General Purpose EVM?

    You will need to build this example by running the pdkProjectcreate.bat file. Please let me know if you need assistance generating this example and I can help out. The reason I'm suggesting the use of this example is that this PDK based driver is more up-to-date compared to the Starterware version.

    Lali
  • Hello Lali,

    Yes, I can give it a try if it helps to better characterize to issue.

    However, I don't see the project folder that you indicated above

    If possible, Can you send it to me or show me where to get it.

    Thanks

    Trieu Pham

  • Hi Trieu,

    You will need to run a script to generate the Projects. The steps on how to do this is documented here processors.wiki.ti.com/.../Rebuilding_The_PDK

    Please see the section on "PDK Example and Test Project Creation"

    Once you run the pdkProject Create.bat, a directory called MyExampleProjects
    C:\ti\pdk_am335x_1_0_6\packages\MyExampleProjects

    This will contain the MMCSD example that I mentioned above.
    Hope this helps.

    Lali
  • Lali,
    BTW, I do not have the EVM. My plan is to extract your code and use it on my target board. Do you see any problem that might have?
  • I ran the PDKprojectCreate.bat and gave option as showed in the "PDK Example and Test project Creation" instructions.
    The "MyExampleProject" folder was not created. It displayed the error could not find the path specified. Then I manually created them . It still had error as follows) What did I miss?

    *****************************************************************************
    C:\ti\pdk_am335x_1_0_6\packages>pdkProjectCreate.bat AM335x all little mmcsd arm C:\ti\pdk_arm335x_1_0_6\packages
    =========================================================================
    Configuration:
    SOC : AM335x
    BOARD : all
    ENDIAN : little
    MODULE : mmcsd
    PROCESSOR : arm
    PDK_SHORT_NAME : C:\ti\pdk_arm335x_1_0_6\packages
    =========================================================================
    Checking Configuration...
    Complete
    =========================================================================
    PDK_PARTNO : AM335
    PDK_ECLIPSE_ID : com.ti.pdk.am335x
    RTSC_PLATFORM_NAME : ti.platforms.evmAM3359
    RTSC_TARGET : gnu.targets.arm.A8F
    CCS_DEVICE : "Cortex A.AM3359.ICE_AM3359"
    The system cannot find the path specified.
    *****************************************************************************
    Detecting all projects in PDK and importing them in the workspace C:\ti\pdk_arm335x_1_0_6\packages\MyExampleProjec
    Detected Test Project: MMCSD_FatfsConsole_bbbAM335x_armExampleProject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_FatfsConsole_bbbAM335x_DMA_armExampleProject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_FatfsConsole_evmAM335x_armExampleProject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_FatfsConsole_evmAM335x_DMA_armExampleProject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_FatfsConsole_icev2AM335x_armExampleProject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_FatfsConsole_icev2AM335x_DMA_armExampleProject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_FatfsConsole_skAM335x_armExampleProject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_FatfsConsole_skAM335x_DMA_armExampleProject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_bbbAM335x_armTestproject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_bbbAM335x_DMA_armTestproject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_bbbAM335x_EMMC_armTestproject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_bbbAM335x_EMMC_DMA_armTestproject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_evmAM335x_armTestProject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_evmAM335x_DMA_armTestProject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_icev2AM335x_armTestproject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_icev2AM335x_DMA_armTestproject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_skAM335x_armTestproject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    Detected Test Project: MMCSD_skAM335x_DMA_armTestproject
    The system cannot find the path specified.
    Copying macro.ini
    The system cannot find the path specified.
    No projects detected
    Project generation complete
    *****************************************************************************
  • Trieu,

    Were all the Processor SDK components registered with CCS? This is the prompt you should see when you launch CCS and it asks if you want to registered newly found components.

    Ensure all dependent/prerequisite products are installed and registered with CCS before proceeding with the examples and/or unit test. Starting CCS after installing the Processor SDK products will cause CCS to find and register any new products. Errors will occur during PDK project creation if any dependent products have not been registered with CCS.

    Do you have everything installed at C:\ti or at another customer path? By default the script assumes this position of the installation.

    Which version of CCS are you using? The scripts assume CCSv7.

    Lali