venkatesh223 0 Posted December 11, 2018 Share Posted December 11, 2018 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 SD.rar Quote Link to post Share on other sites
Rei Vilo 695 Posted December 11, 2018 Share Posted December 11, 2018 Have you tried the SD_TM4C library? venkatesh223 1 Quote Link to post Share on other sites
venkatesh223 0 Posted December 11, 2018 Author Share Posted December 11, 2018 no i havent. Ill get back after giving it a try. Thank you for your reply. Quote Link to post Share on other sites
venkatesh223 0 Posted December 11, 2018 Author Share Posted December 11, 2018 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? Quote Link to post Share on other sites
venkatesh223 0 Posted December 12, 2018 Author Share Posted December 12, 2018 Is it the same pin out as above or do i have to change it? Quote Link to post Share on other sites
venkatesh223 0 Posted December 13, 2018 Author Share Posted December 13, 2018 Anybody please reply? Quote Link to post Share on other sites
jsolarski 94 Posted December 19, 2018 Share Posted December 19, 2018 Its hard to give you an answer on this. If its say, SD card not initlized, then you really need to verify your setup and wiring. and post any modifications of the code provided. venkatesh223 1 Quote Link to post Share on other sites
zeke 693 Posted December 19, 2018 Share Posted December 19, 2018 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. venkatesh223 1 Quote Link to post Share on other sites
terjeio 134 Posted December 20, 2018 Share Posted December 20, 2018 @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. venkatesh223 1 Quote Link to post Share on other sites
venkatesh223 0 Posted December 20, 2018 Author Share Posted December 20, 2018 Thank you for your reply. @terjeio Can you please provide me the link of SD card example on the TI SDK. And it would be helpful if you can tell me the pin configuration with the msp432p401r . Will give it a try using CCS and see is it the same or not. Quote Link to post Share on other sites
venkatesh223 0 Posted December 20, 2018 Author Share Posted December 20, 2018 I tried the same code and the same SD card with Arduino uno, the card was detected. So what might be the possible reasons for not getting detected with MSP432P401R ??, even though the connections are right. Quote Link to post Share on other sites
terjeio 134 Posted December 20, 2018 Share Posted December 20, 2018 @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? Quote Link to post Share on other sites
venkatesh223 0 Posted December 20, 2018 Author Share Posted December 20, 2018 I use a Sandisk ultra SDHC 16Gb . No i did not try different cards. And the SPI bus isnt shared with any other devices Quote Link to post Share on other sites
Rei Vilo 695 Posted December 20, 2018 Share Posted December 20, 2018 The SD_TM4C library worked out of the box. Configuration: LaunchPad: MSP432P401R red Energia: 1.8.7E21 Boards package: Energia MSP432 EMT 5.23.1 SD card: Kingston 8 GB formatted in MS-DOS (FAT32). venkatesh223 1 Quote Link to post Share on other sites
venkatesh223 0 Posted December 20, 2018 Author Share Posted December 20, 2018 Thank you for the reply @Rei Vilo Ill try changing the SD card and test again. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.