Jump to content
43oh

Recommended Posts

hello there,

Ive been trying trying to interface an sd card to msp432p401r but i get many errors. my task is top build a data logger where the sensor readings will be stored in a text file. So i tried basics first.

First i tired to serial print the sd card info but had lot of errors (screenshot can be seen below).

the files i used is attached in the rar file "SD", in that i tried the Card info example. Please can someone help me what is wrong with this code.

Thanks

Screenshot (30).png

Screenshot (31).png

SD.rar

Link to post
Share on other sites

Thanks for the above link, had no issues compiling.

I connected the SD cad as shown in the screenshot below and yes i did change the CS pin to 13 as per msp432 but still in the serial monitor it says not initialized. And yes i did check the sd card in pc it did work and formatted it with fat32.

Can you tell me what can be done? to make it work?

Screenshot (32).png

Screenshot (33).png

Link to post
Share on other sites

Maybe I am thinking of the PetiteFS way of using an SD card but doesn't that SD card need to be first formatted on a PC and have a file created as well?

Then, the MSP430 would access the SD card, open up the pre-existing file, and then write to it?

I would verify the SD card on a PC first by formatting it then creating an empty text file on it. Then, get the MSP430 to see it then open it.

Double check the wiring of the card.

And make sure that you have a really good +5V power source for that SD card. I have read that they want a bunch of current to operate properly. And, I suspect the dev board cannot supply that much current on the +5V line. Gotta verify that too.

 

Link to post
Share on other sites

@zeke : SD cards are rated for 3.3V (1.8V for some - with 3.3V init), 5V will kill them?

Lately I have accessed cards via FatFS on MSP432E401Y and TM4C1294 LaunchPads with power supplied from the BoosterPack header without problems.
Up to 500mA can be supplied via the LDO on the MSP432P401R LaunchPad, and I believe enough is left for a SD card (draw is typ. 20-100mA according to wikipedia).

The code I used was from the TI SDKs.

Link to post
Share on other sites

@venkatesh223

The TI SDKs are downloads, I do not know if the individual examples are available for browsing online. However, there is no SDK driver/example for the MSP432P401R that I am aware of.

IMO the connection diagram you posted above should be correct.

A couple of issues I had:

microSD does not have the same pinout as a regular (large) card.

I could not access a 64GB card as the FatFS driver I used did not support exFAT.

So perhaps these questions are relevant for your problem:

What size and type is the SD card(s)?

Did you try more than one card, preferably of different makes and sizes?

Is the SPI bus shared with other devices?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...