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.

CCS/LAUNCHXL-F280049C: Micro SD Card interfacing with F280049C

Part Number: LAUNCHXL-F280049C

Tool/software: Code Composer Studio

Hello,

I am Sourabh Patil working on launchxl F280049c board. i want to interface micro sd card with this board using SPI bus.

Can anyone give me a basic idea how i can do this by any small example code or by library.

Thanking you,

Sourabh patil

  • Sourabh,

    We don't have a example project / appnote specific for this device (F280049C). But, we an appnote and example project for one of our older device (F2808) which interfaces F2808 device with SD-card. You can use this app note and example project to get started.

    Appnote: Interfacing SD/MMC Cards With TMS320F28xxx DSCs

    Example project: http://www-s.ti.com/sc/techlit/spraao7.zip

    If you are interfacing micro-SDcard to F280049C launch pad, you need to make these connections shown below. I hope you realize that F280049C launch pad doesn't come with micro-SDcard slot. So, you need an external board with micro-SDcard to make these connections.

    Other useful resources:

    https://openlabpro.com/guide/interfacing-microcontrollers-with-sd-card/

    https://components101.com/misc/microsd-card-pinout-datasheet

    Best of luck!

    Regards,

    Manoj

     

     

                                                           

     

     

  • Hello SIr,

    Thank you for your reply. Will go through it.

    But i am not able to open this link 

    Example project

    Thanking you,

    Sourabh patil

  • Hello Sir,

    I go through the pdf which you send, from that i got example code fro DSP controller. I change SPI pin configuration and all the things.

    But program stuck at

    in sd_initialization();

    while(response != IN_IDLE_STATE) //Wait until card responds with IDLE response
    sd_command_response();

    it is not coming out from this loop.

    i am able to generate clock and on MOSI pin it continuously send 0xFF00 i.e. dummy data.

    I checked this on CRO. 

    i used 4GB micro sd card.

    lease can you help me to come out from this..

    Thanking You,

    Sourabh Patil

  • Sourabh,

    The example project provided is not meant to be drop in replacement to run on F280049 device. I just provided this code to provide you a good starting point. You have to completely re-write code and adapt to F280049C device. There are many differences between F2808 (13 year old device) and F280049C (1 yrd old device) (like clocking, PIE, SPI FIFO and so much more). 

    The code I provided was meant to be run on F2808 device in the specific hardware mentioned in appnote. Also, note that the appnote is working with SDcard and you are working with micro-SD card. So, you have to completely re-write and adapt your code to work in new device, new hardware and Micro-SD card (not SDcard like in appnote)

    Regards,

    Manoj

  • Hello Manoj Sir,

    Thank you for your support i resolved my issue by your above post and by changing memory adapter card. which was mention in

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/708133?TMS320F2812-SD-card-Interface.  I used wrong memory card adaper board with F280049C.

    But now i am facing another problem is, it supports only 2GB memory card  if i put 4GB memory card then it wont work. Please suggest me if you know any thing about this. I want to interface 32GB memory card with F280049C board.

    Thanking You,

    Sourabh Patil

  • Patil,

    Unfortunately engineer who had developed this example project doesn't work with TI anymore and I'm not sure whether this code can be adopted for higher capacity SDcards.

    I'm not sure whether this will work. But, I would suggest you to try the following:

    1) Open SDcard_SPI library project using 28xxx_SD_SPI\build\28xxx_SD_SPI_lib.pjt

    2) Open SD_SPI_Initialization.c file

    3) In line 71, change high_capacity = TRUE

    4) build the project to re-generate the new library file

    5) build Example_28xxxSD_SPI.pjt again with new library file

    Regards,

    Manoj

  • Hello Manoj Sir,

    Thank you for your reply. I am able to initialize 32GB memory card.

    but now i am facing one issue in SD.h file there is 

    #define VER2_OP_COND 1073741824   this is the 1GB in byte form. 

    if i change this for 32GB  #define VER2_OP_COND 34359738368 then i get the warning at spi_xmit_command(SD_SEND_OP_COND, VER2_OP_COND, DUMMY_CRC); in void sd_version2_initialization() at SD_SPI_Initialization.c file. and code will not work further. the warning is integer conversion resulted in function

    VER2_OP_COND  is used to define memory card size ?

    Thanking You,

    Sourabh Patil

  • Sourabh,

    Why did you change VER2_OP_COND 1073741824 definition? I don't think it has anything to do with controlling the SDcard memory capacity.

    Did you try the same definition as SD.h and see whether you where able to get 32GB SDcard working.

    #define VER2_OP_COND                1073741824

    Regards,

    Manoj

  • Hello Manoj Sir,

    32GB memory card is working fine with #define VER2_OP_COND                1073741824.

    Now can you help me out what is sectors in memory card? and how to calculate sectors for 32 GB memory card.

    Only one sector is mention in code that is sector_zero 0x0000.

    Thanking You,

    Sourabh patil

  • Patil,

    SDCard sector size should be documented in SDcard specs.

    Example:

    Regards,

    Manoj