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.

C5515 EzDSP Micro SD

Other Parts Discussed in Thread: TMS320C5515

Hi!

I am using the TMS320C5515 eZ-DSP and working on storing some data read from ADC. Basically, I am trying to accomplish these

  1. Create File and write text/number on it to save to SD Card.
  2. Write directly from ADC to SD-CARD

For this, I am referring to TMS320C5515/14/05/04/VC05/VC04 DSP Multimedia Card (MMC)/Secure Digital (SD) Card Controller Reference guide (sprufo6a). But, i am wondering if I can find some easy to use API for doing these tasks, as they are very standard.

Just direct me to the right resource, as I am new to the environment and it is taking me some time to figure things out.

Thanks

 

  • Hi,

    You can refer CSL code CSLv2.5\c55xx_csl\ccs_v4.0_examples\mmc_sd\CSL_MMCSD_SdCardFSExtExample from http://processors.wiki.ti.com/index.php/C5000_Chip_Support_Library

    Regards,

    Hyun

  • Hi!

    @ Hyum: That really helped me get started with it.

  • Hi!

    Working on the suggestion given above, I tried running the example code given here

    CSL code CSLv2.5\c55xx_csl\ccs_v4.0_examples\mmc_sd\CSL_MMCSD_SdCardFSExtExample 

    First, I made the requisite changes to make it work for C5515 EZDSP i.e.

    //#ifdef C5515_EZDSP
        mmcsdHandle = MMC_open(&pMmcsdContObj, CSL_MMCSD1_INST, opMode, &status);
    //#else
    //    mmcsdHandle = MMC_open(&pMmcsdContObj, CSL_MMCSD0_INST, opMode, &status);
    //#endif

    But, now my program is giving these outputs only

    MMCSD-ATAFS TESTS!

    MMCSD-ATAFS POLL MODE TEST!

    SD Card detected
    SD card is Standard Capacity Card
    Memory Access will use Byte Addressing
    SD card initialization Successful

    Though, ideally it should also give output about the ATA-FS file system functions, and i think the program is hanging once it enters

    AtaError mmcConfigFs(char    *fileName)

    I have formatted the Micro-SD card using Card reader on a windows 7 PC with simple FAT filesystem (default)

    Please let me know if I am missing something??

    Thanks and regards

     

     

     

  • hi,

    I'm using XP and formatted SD card fat format (2GB card).

    You should do:

    Commented out below line from csl_general.h

    //#define C5515_EVM

    Recompile it and run:

    MMCSD-ATAFS TESTS!

     

    MMCSD-ATAFS POLL MODE TEST!

     

    SD Card detected

    SD card is Standard Capacity Card

    Memory Access will use Byte Addressing

    SD card initialization Successful

     

    ATA File System Initialization successful

     

    File Creation/Open on SD card is Successful

     

    Writing Data to the file on SD card successful

     

    Reading Data from the file on SD card successful

     

    MMCSD Read and Write Buffers Match

     

    MMCSD-ATAFS POLL MODE TEST PASSED!!

     

     

     

    MMCSD-ATAFS DMA MODE TEST!

     

    SD Card detected

    SD card is Standard Capacity Card

    Memory Access will use Byte Addressing

    SD card initialization Successful

     

    ATA File System Initialization successful

     

    File Creation/Open on SD card is Successful

     

    Writing Data to the file on SD card successful

     

    Reading Data from the file on SD card successful

     

    MMCSD Read and Write Buffers Match

     

    MMCSD-ATAFS DMA MODE TEST PASSED!!

     

     

    MMCSD-ATAFS TESTS PASSED!!

  • Hi

    I have tried running the same thing, with similar configuration. But still getting the same problem where the code is only giving these outputs.

    MMCSD-ATAFS TESTS!

    MMCSD-ATAFS POLL MODE TEST!

    SD Card detected
    SD card is Standard Capacity Card
    Memory Access will use Byte Addressing
    SD card initialization Successful

    I think there might be something missing, so here I am stating all the environment variables that i think might affect the result.

    Operating System: Windows 7 64 bit.

    CCS Version: 4

    C55x low power Chip support library v2.50

    I have defined these variables in the csl_general.h

    #define CHIP_C5505_C5515
    #define CHIP_5515

    #if (!(defined(C5515_EVM)))
    #define C5515_EZDSP
    #endif

    If anybody things that there is something wrong, please let me know. The example code is able to detect SD card, but the file system (ATAFS) specific calls are not getting executed. As an information, i have formatted sdcard using FAT32 which is default. 

     

     

     

     

     

     

     

     

  • As an extra test, I again run the basic CSL_MMCSD_SDCardExample_out where no File system is involved.

    I now realize that this code also hangs at one point. I am getting only the output

    CSL MMCSD - SD CARD POLL MODE TEST!

    API: MMC_open Successful
    SD card Detected!
    SD card is Standard Capacity Card
    Memory Access will use Byte Addressing

    API: MMC_write Successful

    I figured out that the code has stopped execution after during the read stage

    mmcStatus = MMC_read(mmcsdHandle, cardAddr, BUFFER_MAX_SIZE, pReadBuff);

    and not going further in the execution. I am running the code in debug mode.

    So, there is some basic problem.

    Regards

     

  • Hi!

    I found the problem. It is related to the version of C5500 Code generation tools. Earlier I was using the version 4.3.2 and I updated it to 4.3.9 and all the above stated problems of code hanging has been solved.

    Thanks

    Mayank Kumar

     

  • I have the same problem w/o commenting out the #define CHIP_5515.  The csl_general.h defines the C5515_EZDSP.

    My Code Generation tool is 4.3.9. 

    I have the Spectrum Digital C5515 EVM Onboard USB Emulator.

    The following is what is logged when running the CSL_MMCSD_SdCardExample_Out:

    CSL MMCSD - SD CARD POLL MODE TEST!

    API: MMC_open Successful
    SD card Detected!
    SD card is Standard Capacity Card
    Memory Access will use Byte Addressing

    API: MMC_write Successful

    Then it hangs in the same place you have described in csl_mmcsd.c at:

    do
         {
          status = hMmcsd->mmcRegs->MMCST0;
          if((status & CSL_MMCSD_DATA_TOUT_CRC_ERROR) != 0)
          {
           reIssueReadFlag = 1;
           break;
          }

         } while((status & CSL_MMCSD_READ_READY) != CSL_MMCSD_READ_READY);

    Regards,

    Dozier