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.

RTOS/LAUNCHXL-CC1352R1: Problems when using the SD card driver. It starts but doesn't initialize.

Part Number: LAUNCHXL-CC1352R1

Tool/software: TI-RTOS

Hi,

I am using this interface to communicate to the micro SD card via SPI. (See figure, I am not using the Texas Booster Pack).

I connected the corresponding pins to the launchpad (DIO8, DIO9, DIO10, and DIO25) for MISO, MOSI, SCLK and CS as follows in the Board.html. I also used the GND and 3.3 V for supply. 

When I run the example code "sdraw" that comes with the TI Drivers, it starts the SD example, but it displays an error for initializing it. 

I don't know what to do since the code I am using is an example one and I can't find a reason why it is not working. The only change I did in the code is printing the error number using the display library. But it gave me a generic error code number (-1).

best regards, 

Sara

  • Sara,

    Are you sure the voltages are correct here, that looks like an Arduino board that is designed for 5V operation. It has its own voltage regulator on the boards, but if you only supply 3.3V the LDO will not provide 3.3V to the rest of the system.

    Please post the schematic for that little board.

    Regards,
    /TA
  • Hi TA,

    I understood, but today I used a laboratory DC power supply (both with 3.3 V and after with 5 V). This procedure gave me the same result (error #-1).

    I searched for the schematic from the adapter provider website, but the link is dead. 

    What I found is a guy who built his own schematic as follows:

    The link I found this schematic (and other considerations about the adapter) is:

    http://www.vishnumaiea.in/projects/hardware/interfacing-catalex-micro-sd-card-module

    Thanks in advance,

    Sara

     

  • Hi TA,

    I posted the schematic, have you seen that?

    regards,

    Sara

  • Hi Sara,

    You need to use a logic analyzer to see what is happening on the SPI bus. Then you need to check if this communication is as expected.

    Regards,
    Fredrik
  • Hi Fredrik,

    Thanks you so much for answering me.

    I was expecting for a simpler  solution.

    Since the examples codes uses to be always correct I thought it was some hardware problem. Then I soldered jumpers direct to and sd card adapter. It also gave me the error. My hopeness here was to someone suggest maybe a software revision or change.

    Best regards,

    Sara

  • Hi Sara,

    You have to do some debugging to figure out why your setup fails.

    Regards,
    Fredrik
  • Hi Fredrik,

    I doubted it could be a hardware problem. I changed the SD card and now it was able to open.

    Buuuut, there is another problem:

    when I changed the const WRITEENABLE to 1 (to enable the write and finally try to run the sdraw example) it doesn't display errors. But when comparing the buffer it wrote to the SD card and the content it read it did not match.

    Do you have some suggestions?

    Besides, I used a computer adapter to verify if it has something written and the sd was empty.

    I realized that any filesystem presented in the micro sd would be corrupted when the code ran. Then, I was thinking if I couldn't read this in the PC because of the filesystem or because it has not been written anyway.

    Please, I need some guidance.

    I have to implement the non-volatile storage functionality to storage my sensor data and I don't have much time. I did not find libraries available. If I have to make my own driver from zero it will cost much time.

    Thanks!

  • You were right. Just used the 5V voltage and it worked now. The problem was in my first sd card which I had burned using other shield not for 5V.