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.

SD-Card/Accelerometre Problems

Other Parts Discussed in Thread: MSP430FR5969

Good afternoon,
I am working on a system based on MSP430FR5969 that has a microSD card and a ADXL362 accelerometer. I am using them on the same SPI bus. Separately they works: i can write on the SD-Card and i can sample data from the accelerometer, but I have some problems to use them together.

In particular I can't read the Accelerometer registers if the SD-card is plugged in the slot. At the beginning i thought it was a software problem of Chip-Select, but using them correctly is the problem remains. So i used the Oscilloscope for reading the waveform of the MISO, MOSI, and CLK.
This is the MOSI waveform when the SD-card is not in, (i am using a probe with 100x attenuation, so 33mV is 3.3V). In this case all is ok, the signal is good:


Then I Insert the SD-card; this is the result:



The waveform is at 1V and so the sensor can't read it. The CLK has the same problem of the MOSI. The MISO is stranger: when the SD card is not plugged in works properly. When the sd-card is plugged in the the CS low it stays on GND, when the CS is High the wave is similar to second picture, it can be good but the high level is too low.
I read 2 datasheet of the SDIO communication and they are in contrast saying the CS is active low or high. According to the SD library that I am using it is High, and it works, but this 2 PDF says 2 different things:
 (www.sdcard.org/.../partE1_100.pdf) Page 18, Paragraph 7.1.1; in the important note it is written that the card is not selected with CS=1, so the CS is active low;
(www.sdcard.org/.../Simplified_SDIO_Card_Spec.pdf) Page 49 Paragraph 8.1.1; it is written that the card is not selected with CS=0, so the CS is active high;
I tryed both the configuration, CS active Low and High, but it does not work.

I don't know what the problem can be. Maybe do i need a pull-up? Do you have some other ideas?

Thanks in advance

Lorenzo

  • Hi Lorenzo,

    My understanding is that the SD card is active when CS is high. Are you using a 3-wire or 4-wire eUSCI implementation of SPI? I would recommend 3-wire and software control of the CS lines since you are multiplexing the eUSCI module between two different SPI devices. Make sure that only one device is active at any time. In a worst case scenario, would it be possible to use two separate eUSCI modules for the two devices? All three eUSCIs on the FR5969 are SPI-capable.

    Regards,
    Ryan
  • Hi Ryan,
    I am using a 3-wire implementation of the SPI; in the next version of the prototype i think I will use different eUSCI modules to avoid the problem. Can it be a pull-up problem in your opinion? The SPI usually does not need it, but maybe in this case it could?

    Regards,
    Lorenzo

  • Hey Lorenzo,

    I do not know of any cases where pull-up resistors are needed for a SPI implementation. It appears to me like both devices are active and therefore pulling on the SPI lines when the MSP430FR5969 is only trying to communicate with one of them.

    Regards,
    Ryan

**Attention** This is a public forum