Jump to content
Forum sending old emails Read more... ×
calinp

[Energia Library] Petit FatFS SD Card Library

Recommended Posts

Hi Bluehash, I've been reading through this post and the other related one ( http://forum.43oh.com/topic/1427-petitefs-fatfs-sdcard-usci-code/#p18738 )

I was wondering 2 thing:

 

1 - Do you have any more SD Card Booster Packs available for purchase?

 

and 2 - Is it possible to use these libraries directly to an MicroSD card, given that I connect the appropriate pins and settings?

 

My group and I are using the MSP430 Launchpad as well with the g2553 microcontrollers. We are hoping to access SD cards for memory read&write to save text data onto the card and even shooting high enough to read Audio&MP3 data files from the card and decoding them.

Share this post


Link to post
Share on other sites

@@Hammerwang Yes, you should be able to get them from here.

You can try to use a micro sd to sd card adaptor to convert the pins to the right format. I have not tested it out though. If you really need to have it tested, let me know , I'll do a quick one.

 

If you guys are from a university, please let me know.. I'll try to sneak in a discout for you.

 

Also, welcome to 43oh!

Share this post


Link to post
Share on other sites

Thanks for the welcome :D

we're actually students at Univ. of Central Florida working on our senior design.

We've soldered connections to the SD Card adapter to try connection.
It would be awesome if you could test it as well to know that we aren't messing anything up haha.

I also posted on the related post asking about compatibility with a breakout board for the Micro SD card. I understand that the formatting libraries are specifically for SD cards, but I was curious whether it is possible for us to alter the connection settings in the libraries to communicate with this board
http://www.hobbytron...sflash-breakout
 

Share this post


Link to post
Share on other sites

@@calinp
I ran through your latest code and it works great! hit a few bumps getting it set up, but I managed to figure it out.
It works perfectly with the microSD breakout board that I have :D

 

so next up, I will try to get it working with CCS if thats possible from the other post!

thanks guys

Share this post


Link to post
Share on other sites

 

 
I have formatted my SD Card to FAT file system 
My pin connections are as below (checked in the petit fatfs libray)
(and 10 for the CS)
I have pasted t_read and t_write .txt files into the sd card..
P.S. My 16MHz Crystal is not soldered is this an issue for this task?
 
  uint8_t data;
  uint8_t _SCLK = 7;
  uint8_t _MOSI = 15;
  uint8_t _MISO = 14;  //defaults on HW SPI pins
 
I am getting this message on serial monitor and so when i check my sd card i see that t_write is still blank..
 
Press button to start...
 
Open a test file (t_read.txt).
 
Failed with rc=6

 

 

@@sirri

 

>> Hi, looking at the picture i see you left the led jumpered, shouldn't you remove that jumper in order to use the MISO (P1.6) signal? 

Share this post


Link to post
Share on other sites

@@sirri

 

>> Hi, looking at the picture i see you left the led jumpered, shouldn't you remove that jumper in order to use the MISO (P1.6) signal? 

i will tell the results when i test it.. thanks ; )

Share this post


Link to post
Share on other sites

Hi @@sirri, I have the same setup as what you show in your pic and getting the same problem as you with "failed with rc=6".  I noticed you have CS connected to P2.2 but that gives me a rc=1 error on the FatFS.begin call.

Everything I'm reading says CS should be tied to P2.0 which lets the 'begin' work, but the 'read' and 'write' calls both give the 'rc=6' error.

 

Did you get this working?

 

Not sure how to share a pic of the wiring on the forums.

 

 

Share this post


Link to post
Share on other sites

Ok... solved the problem.  After reading the source code I noticed that the CS pin on the SD card in version 2.0 and higher of the code was moved to P2.2 on the MSP430.

That and a lot more debugging code and I found the issue!

 

Now onto getting sound files to load and play!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×