This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Fat File System Library

Other Parts Discussed in Thread: MSP430F1611

Hi,

 

I am currently working on a project that needs to record data to an SD card in it's prototyping stage that will eventually be removed in the final product.

I found a couple libraries online that were made for MSP430 or are generic enough to used on it.  I have yet to find one that is made for the MSP430F5xx series.

Does anyone know of a library for the MSP430F5xx series or easily portable to it.  This needs to last unattended for a few months so I would like something that I can have some confidence in after a few days of testing.  Since this is probably going to be eliminated in the final product I would not like to spend to much time on it.  So a library that requires the minimum amount of modifications would be desired.

 

Thanks,

Dan

 

 

  • Dan,

    What libraries have you found that were made for the MSP430?

     

    Thanks!

  • Dustin,

    I found two libraries that don't seem to have a name.  One was written by F. Foust from michigan state.  I have ported that one to the MSP430F5xx and it seems to work well so far.

    I am currently in the process of integrating FatFs with the SD card library.

  • Dan,

    I've found the libraries you were referencing, thanks for the good information.

    I am going through the code and in Appendix A it makes a call for a "util.h" file which I can't seem to track down.  Did you end up using that header file and if so could you possibly send it to me?

     

    Thanks!

    Dustin

  • Dustin,

    You must be using the app note from allan evans.  I ended up using the app note from foust.  The foust one worked pretty well, it did a few mistakes, and I was able to interface it with the FatFs library.

  • Dan,

    You're right, essentially I am trying to combine the two app notes in order to create an operable FAT file system.  What FatFs library did you end up using?  I have found a couple open source ones on the web that supposedly work with a MSP430, however, I'd be curious to know what you used that worked well with Foust's app note.

    Thanks again, definitely appreciate the support,

    Dustin

  • I used the latest fat library from the fatfs website.  I didn't use one that was ported to any platform.  I used the foust app note to provide the disk io functions.

  • Dan,

    Do you have a copy of the foust app note it no longer seems to be available on the web?

    R

  • Hello!

     

    You can find it at once with google. Keywords: SDCard foust

     

    Pascal

  • Hello,

     

    I use the same appli (Foust + Allan Evans) and I face some issue with some µSD brands. The µSD card freezes after the close_file() function and does not recover even if /CS deasserted.

    The config is MP430F149 at 1MHz (so spi clk at 500kHz). I added some more sd_wait_notbusy() before read access but it does not change anything. No DMA.

    Did anyone face the same issue?

    Do you have any suggestion about it please?

     

    Best regards

    Michel

     

     

  • There seems to be an issue with soem SD card brands. These cards seem to stop after a certain time or number of operations and require a completely new initialization. It seems that the serial mode isn't properly supported and the devices fall back to parallel mode. Or maybe it's a matter of supply voltage (on clising a file, much is being written at once).

    I've heard reports of this in some of the other threads regarding SD card access and it happened when doing raw access to the card. Sometimes on heavey load, sometimes after some hours.
    Personally, I never noticed this. I had a logger running for days without problems and I wrote continuously with 4Mhz SPi clock to the card (MSP430F1611). Never had my cards choking (besides bugs in the first versions of code, of course)

  • Thanks a lot  for the answer. Which µSD card size did you use? 2GB or only smaller?

  • I actually used only 1GB cards and less. I found info that some 2GB cards, while not necessarily being SDHC, are not always 100% compatible with older ones. Some do no longer have serial support or have problems addressing the 2GB when used in serial mode. So I stayed with 1GB.

    Also, there is a difference between SD and microSD cards. While SD cards and mini SD support he MMC init process, the microSD refuse it and require the init process introduced for SD cards.
    Th eofficial explanation was to be able to 'detect' a microSD card (which is not considered a removable data media anymore, as it will only endure a small amount of plugging cycles), but I think the manufacturers just wanted to reduce the code size, so they can include a controller with less rom. The 'type detection' could have gone into the info register as well.

**Attention** This is a public forum