Jump to content

[Energia Library] Petit FatFS SD Card Library

Recommended Posts

  • 3 months later...
  • Replies 148
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Hello,   This is a port of ChaN Petit FatFS SD library targeted to low RAM microcontrollers and offers a minimal FAT implementation, with limited write support. For more details see http://elm-chan.

A small update: - all config settings in one file - pffconf.h - a soft SPI driver ( shuftIn/shiftOut ) that can be enabled in pffconf.h. It defaults on HW SPI pins, but these can be changed using Fa

Hi, i just wanted to report that the library won't compile with Energia release 0101E0011 and the F5529 Launchpad because "DIR" is already defined in \energia-0101E0011\hardware\tools\msp430\msp430\in

Posted Images

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.

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!

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

Link to post
Share on other sites
  • 1 month later...


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





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

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

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.



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

Join the conversation

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

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