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.

Interface SD/MMC card to create a .txt file

Other Parts Discussed in Thread: TMS320F28069, CONTROLSUITE

Hi all,

I am using TMS320F28069 for one of my projects. I have a requirement to interface a SD/MMC card with the micro-controller using SPI to log some data parameters to a text file (ex: data.txt). I tried with with below example. 

http://www.ti.com/apps/docs/litabsmultiplefilelist.tsp?literatureNumber=spraao7&docCategoryId=1&appId=270   

Example worked itself but I could not make .txt file with that. If someone has done this kind thing before, please give me instructions to follow. If anyone has an example project, please upload it as well. 

Thank you.

 

  • Hi Lakshan,

    Please search the forum thoroughly, as there might be threads based on your topic. Here is one such thread:
    e2e.ti.com/.../296916

    Regards,
    Gautam
  • Lakshan,

    SD/MMC card interfaces are very popular. The forums (and google) have a wealth of information on how to do exactly what you are looking to do.

    Try out this example located in ControlSUITE. It is a ported example from the FATFS website.
    ..\controlSUITE\device_support\f2806x\v150\MWare\third_party\fatfs\port\mmc-c28x.c

    The FATFS api descriptions can be found here:
    ..\controlSUITE\device_support\f2806x\v150\MWare\third_party\fatfs\doc\00index_e.html


    I hope this helps get you started.
    Mark
  • Hey Mark,

    Thanks for the help. Seems your help will work. But I tried many times to integrate mmc-c28x.c, diskio.h, ff.c, ff.h, integer.h  with my main.c file. Looks like my SPI initialization is correct as well. But it wont work. So can you please upload any working example with you.

    Thank you.

  • Hello,

    Unfortunately, I don't know of any complete examples for the F2806x that show how to work with an SD card. However, there is one in controlSUITE for the F2837xD device that you may be able to use as a guide:

    controlSUITE\device_support\F2837xD\v190\F2837xD_examples_Cpu1\sd_card\

    Whitney