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.

Problem with micro SD card

Other Parts Discussed in Thread: RM48L952, RM57L843, HALCOGEN

Hello.

I had developed sd card interface for RM48 and  moving it to RM57 system now. But it doesn't work.  SPI communication seems like normal. I tested it with loopback mode. But SD card returns only 0xFF in my system when I send command and dummy data, so I can't initiate or use it. it happens in both my system and RM57 HDK.

Is there any difference for using SD card in RM48L952 and RM57L843?

  • Wonjae,

    Which SPI interface do you use for interfacing to the SD card? I believe this is the SPI2 port. The SPI2 port on RM48 had dedicated terminals, so no multiplexing control configuration was required. These signals are not the default functions on the RM57 and you need to configure the I/O multiplexing controls to output SPI2 signals.

    Please refer to this post for more information:

    http://e2e.ti.com/support/microcontrollers/hercules/f/312/p/382902/1349724.aspx#1349724

    Regards, Sunil

  • Hello Sunil,

    I had created the post you mentioned. I configured pinmux for MIBSPI2 using HALCoGen and initialized and then I can get some data from SPI loopback test. It is changed also in communication with SD card, SD card sends only 0x00 before I configure the pinmux, but it sends 0xFF now.. I think 0xFF is normal dummy data from SD card.

    I missed some configuration for using SPI..?

     +) I checked signals using oscilloscope. RM57 is used for master. CLK and SIMO signals are normal, but CS signal is HIGH always..  I want to know the way to change the 'chip select'. I'm using this way that changing PC3 value like this.

    spiREG2->PC3 |= 0x01;          // SCS[0] = high

    spiREG2->PC3 &= ~0x01;        // SCS[0] = low

     

  • I had tested a few ways.. but I can't see any enabled CS signal even analog loopback is working well. I'm checking SD card module pins because PGA is hard to check. RM57 and SD card module is connected directly. The analog loopback signal is communicated internally? if it isn't, I can see the CS signal on CS pin of SD card module

    Using SPIDAT register is the only way to transmit data? Is there any way forcing CS value? I want to CS pin as GIO and then I can change it manually.

    +) I can see the CS signal just before. I used 'spiTransmitAndReceiveData()' in HALCoGen Code. It didn't show CS signal when it sending only one data block. I found the CS hold is enabled when the data block is bigger than 2, so I tried the function with long data array and I can see the CS signal.. there are a few questions.

    1. 'CS' and 'CS hold' are same? i.e Can I use the CS hold register for control the CS?

    2. There is no CS signal when it sends one block size. Is it right to send a data without CS?

    3. Can I use 8 bit SPI communication? because SD card using 8 bit data, but SPI transmit data register is 16 bit.