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.

Starterware/AM3352: AM335x SD Card read/write error.

Part Number: AM3352

Tool/software: Starterware

Hi,

We have SD card read/write issue in our customer's application using AM3352 + StarterWare_02_00_01_01+ SYS/BIOS.
The SD card driver from StarterWare is used as it is. The SD card read/write is not working in some particular SD cards
it seems working normal with other kinds of SD cards but according to the SD card maker's comment,
in both normal and abnormal SD cards the AM335x's SD card Driver's operation seems to be abnormal.

Please let us know if there are any known issues with regards to  StarterWare SD card drivers or  anything else to be taken care of.

Looking at the SD card commands below, the SD Card is intialized everytime it is accessed.
Q1:Could you please let us know in what condition does AM335x SD card driver sends reset command.


And every time CMD55 command is sent continuously after reset command CMD00.
Q2:We would like to know under which condition does the AM335x driver sends continous CMD55 command during reset.




Best Regards
Kummi

  • Kummi,

    Not sure why you are seeing the repeated CMD55. Do any of these older threads on a similar issue offer a clue?

    e2e.ti.com/.../317390
    e2e.ti.com/.../1113097

    Lali
  • Hi Lali,

    Thank you for the information.
    Unfortunately, the links you have sent is not related to our issue.

    Could you please confirm that AM335x StarterWare's SD card driver works
    as per the SD Card Standard Specification?

    Actually the SD card maker has commented that StarterWare driver may not be
    working as per the SD Card Standard.
    Because when using StarterWare driver, the SD card Clock frequency when executing CMD00 command
    seems to be more than 400KHz, but as per the standard it should be <400(100 kHz - 400 kHz range).

    Could you please let us know if there is any way to reduce the clock speed (to less than 400kHz)
    when executing command CMD00?

    And we understand StarterWare is As-Is software, but we would like to know if the SD card driver is as per the SD Card Standard?

    Best Regards
    Kummi

  • Hi Lali,

    Few more updates.

    Just to mention about the SD card Specification,the SD Specifications Part 1 has below statement.

    After power-on or CMD0, all cards' CMD lines are in input mode, waiting for start bit
    of the next command.The cards are initialized with a default relative card address (RCA=0x0000) and
    with a default driver strength with 400KHz clock frequency.

    After the CMD0 and during 「Card Identification Mode」
    i.e 「Ready State」⇒「Identification State」⇒「Stand-by State」
    in this state the SD card clock should be below 400KHz according to the Specifications.

    Whereas when we use the AM335x with starterware SD driver,
    the clock speed is more than 400KHz(49MHz as shown below) even during/after CMD0.


    Meanwhile the StarterWare MMCSD Driver user guide's Features supported
    mentions "Support for SD v2.0 standard ".
    processors.wiki.ti.com/.../StarterWare_MMCSD_Driver
    So it is difficult explain to the customer that StarterWare is just a sample code
    and it is not guaranteed that it will support SD v2.0 standard.

    Please let us know if there is any way to modify the source to solve this issue.

    Best Regards
    Kummi

  • 3223.MMCSD_evmAM335x_armTestProject.outKummi,

    As far as I know, the driver should adhere to the standard. Is there any way we could try and re-produce this?

    To help isolate, please try the latest drivers that are in the Processor SDK. There might have been bug fixes that might have addressed something like this in the 3.5 yrs since it was released.

    Couple of things to try on the AM335x GPEVM:

    1) Grab the Processor SDK package from . There is a Starterware example at C:\ti\pdk_am335x_1_0_5\packages\ti\starterware\examples\mmcsd. Please try this and let us know if the SD card bus shows the same behavior ("Whereas when we use the AM335x with starterware SD driver, the clock speed is more than 400KHz(49MHz as shown below even during/after CMD0").

    2) A better SD test to try is located at C:\ti\pdk_am335x_1_0_5\packages\MyExampleProjects\MMCSD_evmAM335x_armTestProject.

    This project will have to be built using the .bat files as explained in the building the PDK  examples . I have also attached the .out file from this example to try and speed up the exercise for you.

    Do you see any of the problems with any of these examples?

    Lali

  • Hi Lali,

    Thank you for the reply.
    And I am sorry for the delay.

    Currently we are trying to find out if there is any way to find
    re-produce this issue on TI's EVM and a simple StarterWare software.

    Meanwhile, the SD card maker's claim is that the StarterWare driver
    won't execute as per the SD card Standard.

    So if possible could you please let us know if there is any test results
    or any data on the Starterware SD card operation that could be shown to the customer.

    It would be very helpful if you have any SD Card analyzer Log data similar to the above figure
    showing the event and bus frequency information.

    unfortunately we don't have such analyzer in our office.

    Best Regards
    Kummi

  • Hi Lali,

    Update information on this issue.

    The customer was able to solve the issue.
    The conclusion is that StarterWare Driver is not according to SD standard (bug?)
    and they solved the issue by modifying the source.
    And they didn't disclose the modificaton details with us.

    Actually the customer is bit upset that TI's support team couldn't solve
    this issue even though TI has developed this software.

    Thank you and Best Regards
    Kummi

  • Hi Kummi,

    I'm sorry to hear that.

    Is there any information at all we can provide the development team to look into this?

    Would like to know where they feel is "not according to SD standard".

    Lali

  • Hi Lali,

    Actually the customer didn't provide details about the source code
    but as mentioned above in the log file the problems were
    SD card Clock frequency >400KHz at CMD00 and continuous CMD55 command during reset.

    Actually they took some expert's help from a third party to solve this and
    we were told that a developer with expertise in SD card driver would easily
    find out the problem in the StarterWare Driver.

    Best Regards
    Kummi