Jump to content
43oh

Trouble Porting Arduino SD Card Library to Energia


Recommended Posts

Hello everyone,

 

I'm basically trying to port over Arduino's SD card library (which utilizes SPI communication) to Energia, and am starting by testing whether I am able to properly initialize the SD card or not.  First,  I made sure that the Arduino library worked on an AT Mega 2560 and SD card that I have (it did).  I then moved on to porting the library for Energia.  I changed the pin mapping and the SPI settings to work for the F5529 and so far I can prove with a logic analyzer that the SD initialization function commands the CS, SCLK, MISO, and MOSI SPI lines in the exact same manner for the MSP430 as for the Atmel, byte for byte.  Basically, the information coming in to and out of each mircrocontroller is exactly the same so I know that all the SD card information is there for me

 

However, the problem is that the information does not seems to be received by the MSP430 in the same manner as the Atmel and causes the initialization to fail.  I think the roots of this issue involve differences between the way the Atmel device

DataloggerArduino.zip

DataloggerEnergia.zip

Link to post
Share on other sites

Much to my excitement, I put the SD_TM4C library into the MSP430 libraries and it recognized my SD card connected to my F5529LP without needing any changes!  I'm frustrated that I spent so much time working on porting my own library, but it's good to know that I can move onward.  One thing I did notice, line 56 of CardInfo.ino has the parameters switched which causes a failure. It should read if (!card.init(chipSelect, SPI_HALF_SPEED)).  Thanks for the help.

Link to post
Share on other sites
  • 1 year later...
  • 3 months later...

i am using energia with msp432p401r launchpad...i have interfaced a sensor which is bosch bme 280 via i2c with the lauchpad and have showed the output via sharp lcd boosterpack...now i have to store the data which is temperature, pressure and humidity in a sd card ...can anyone help pleases ?

Link to post
Share on other sites
  • 3 years later...

I tried to configure above library, but not able to configured, There is no any error, But i am get confused with wire configuration, Can you please correct me.

Please provide me wire configuration for MSP432P401R

Currently using 

CS - 5.0
SLK -1.5
VCC - 5V
MDSI - 1.6
MISO - 1.7
 

But not able to access the SD card please help me

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...