Jump to content
43oh

[Energia Library] Petit FatFS SD Card Library


Recommended Posts

  • 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,

 

it seems the file energia-1.6.10E18/hardware/tools/msp430/msp430/include/msp430f5529.h has a problem in the USB definition part. I don't know exactly what for a problem, but I was able to compile the above mentioned sketch after commenting out the USB part in msp430f5529.h (between rows ~3430 and ~4227).

Maybe it helps you.

 

Regards,

Liviu

Link to post
Share on other sites

Hi,

 

fount it. :)

It seems, the DIR definition in energia-1.6.10E18/hardware/tools/msp430/msp430/include/msp430f5529.h

/* USBCTL Control Bits */
#define DIR            (0x0001)  /* USB - Data Response Bit */
conflicts with the DIR in the energia-1.6.10E18/libraries/PFatFs/utility/pff.h:

/* Directory object structure */
typedef struct {
	WORD	index;		/* Current read/write index number */
	BYTE*	fn;			/* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */
	CLUST	sclust;		/* Table start cluster (0:Static table) */
	CLUST	clust;		/* Current cluster */
	DWORD	sect;		/* Current sector */
} DIR;
No idea where it will be better to change to remove the conflict, but probably in the PFatFs.

 

Regards,

Liviu

Link to post
Share on other sites

I am not sure how to remove the old files.   I am working with MAC OS X and I do not have a file structure to look at so I cannot simply replace files.

 

Instead I reloaded PFatFs into Energia using the Include Library --> add .ZIP tool.

 

I do not think this worked as I am getting the same error.

 

I tried to delete Energia and redownload it but that did not work either. i guess the settings are saved someplace else.   I do not know where.

 

Any help would be great.

 

Spineless 

Link to post
Share on other sites

i am having some issues with the example file.   I want to seperate the write and read functions, but I am getting a lot of errors when I attempt to seperate them.  I want to write a string of data to the file in the SD card then later read the entire file back. 

 

Can you please update your example with this functionality?   Subroutines are awesome!   If you could simple call a subroutine to write data and then a seperate subrountine to read it that would be great. 

 

Spineless

Link to post
Share on other sites
  • 2 months later...

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.org/fsw/ff/00index_p.html

 

A lot of credits goes to the main contributors to this topic http://forum.43oh.com/topic/1427-petitefs-fatfs-sdcard-usci-code/

 

 

Because this library makes use of the SPI library included in Energia it  works for both MSP430 and Stellaris launchpads.

 

With MSP430 I noticed some interference with Serial.print so before every call to the fat library I had to add a small delay. On Stellaris board these are not necessary. 

 

 

Unzip and copy in Energia\hardware\msp430\libraries or Energia\hardware\lm4f\libraries .

 

[uPDATE] See post #15 http://forum.43oh.com/topic/3209-energia-library-petit-fatfs-sd-card-library/#entry30031

 

[DOWNLOAD LINK] http://forum.43oh.com/index.php?app=core&module=attach&section=attach&attach_id=3019

Hello, 

 

I tried this library on MSP432, but it doesn't work. What changes should I make to make it work.

Thanks!

 

Marvin

Link to post
Share on other sites
  • 4 months later...

I am getting error

Quote

Failed with rc=3

When i interchange MISO MOSI pins I get error 

Quote

Failed with rc=6

what could be possibly wrong??

Thax in advance...

Can someone give me your mobile number please I really want to solve  this problem...

 

I will pay 5 $ if anyone can solve my problem... 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...