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/TMS570LS0432: SD CARD INITIALIZATION

Part Number: TMS570LS0432
Other Parts Discussed in Thread: HALCOGEN,

Tool/software: Code Composer Studio

HELLO,

I am currently trying to initialize the SD card in SPI mode. I have used MibSPI for this purpose. All that I'm doing is :

1. Making CS high ( SD card not selected)

2. Sending dummy values to complete more than 80 cycles.

3. Making CS low (SD card selected)

4.Sending the information (CMD0) over MOSI to SD card

I expect the SD card to send 0X01 as the reply (stating it has entered idle mode) but I'm getting FFFF in return.

Kindly guide on this on where am I going wrong.

I have attached the result screenshot and the .dll and .hcg files

7624.SD_mibspi.rar

  • Hello,
    In this thread you can find attached demo code for SD communication: e2e.ti.com/.../355057

    I am not familiar with SD Card communication protocols but what i saw in your code is that you are using Transfer Group to send data. In HALCoGen your configuration is for 16 bit char length and buffer is also with length of 16. At the other side in sys_main.c you init buffers with length of 8. In this way it is not clear what will be sent to Slave. The transfer will start with 0x40 and then 15 more packets will be sent. Last known will be 0x8888.

    Best regards,
    Miro
  • Hello Miro,

    What are the prominent changes that have to be made when I have to edit the code written in RM48 platform to TMS570LS0432 controller. 
    I'm confused on :

    1]What all registers to change

    2]How to replicate the halcogen driver enables and other things

    3]The pin-muxing pins are different as the controller is different

    4]The SPI mode used in RM48 and replicating on TMS570LS0432

    5]What if I want to use MibSPI over SPI, the functions available in the controller changes

    6]With MibSPI, if I select charlen as 16 bits, can I send 16-bit value over MOSI and MISO or are there reasons on why it can't be set more than 8 bits?

    How to proceed on these and what all needs to be changed; enlighten me with the basic understanding of what and all req. to shift codes from one controller to another?

    Thank you.

  • Hello Miro,

    What are the prominent changes that have to be made when I have to edit the code written in RM48 platform to TMS570LS0432 controller.
    I'm confused on :

    1]What all registers to change

    2]How to replicate the halcogen driver enables and other things

    3]The pin-muxing pins are different as the controller is different

    4]The SPI mode used in RM48 and replicating on TMS570LS0432

    5]What if I want to use MibSPI over SPI, the functions available in the controller changes

    6]With MibSPI, if I select charlen as 16 bits, can I send 16-bit value over MOSI and MISO or are there reasons on why it can't be set more than 8 bits?

    How to proceed on these and what all needs to be changed; enlighten me with the basic understanding of what and all req. to shift codes from one controller to another?

    Thank you.
  • Hello,
    The code above is for reference.
    You can't replicate HALCoGen settings automatically. You have to make your own configuration. PINMUX has to be set according your device.
    Functions to work with SPI will be generated by HALCoGen with your settings but the names and usage will be the same. In MibSPI mode functions are different than in SPI mode. MibSPI Charlength could be programmed 2 to 16 bit.

    Best regards,
    Miro