Logging to uSD card (filesystems??)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Logging to uSD card (filesystems??)

Jump to solution
1,784 Views
Iain
Contributor I

Using:

CW 5.9, HCS08QE32, DEMOQE

4D μDrive-USD-G1 μSD card module

 

I am trying to log data to a micro SD card using the above devices. I am a bit confused by file systems. My uSD unit supports fat16 file system as well as RAW (first time I have heard of this) i think. It uses SCI for communication with the uC. What do I need to do to be able to write data to the card? Is it a case of downloading a premade fat file system and including the file in my project code? Or is it easier to just write data to RAW?

 

Ideally I would like the data stored in a .txt file or something similar, but not if it involves complicated programming, so really what's the easiest way of doing it?

I am also open to suggestions of a different SD card module, that might make the task easier.

 

Thanks

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
828 Views
BlackNight
NXP Employee
NXP Employee

Hello,

it depends a little bit what you want to do. If you want to exchange data with a windows host, then FAT (or: FAT32) is the choice. It means that there is some overhead (compared to RAW), but in my view usually this is very well spend.

 

I have used http://elm-chan.org/fsw/ff/00index_e.html and made a Processor Expert Embedded component out of it (to make it really ease of use), and successfully reading/writing data from SD cards (including microSD cards). A

 

BK

View solution in original post

0 Kudos
Reply
3 Replies
829 Views
BlackNight
NXP Employee
NXP Employee

Hello,

it depends a little bit what you want to do. If you want to exchange data with a windows host, then FAT (or: FAT32) is the choice. It means that there is some overhead (compared to RAW), but in my view usually this is very well spend.

 

I have used http://elm-chan.org/fsw/ff/00index_e.html and made a Processor Expert Embedded component out of it (to make it really ease of use), and successfully reading/writing data from SD cards (including microSD cards). A

 

BK

0 Kudos
Reply
828 Views
gman8
Contributor I

Hi,

 

I am making an MP3 player.

I want to connect a micro-SD and an MP3 codec to a MC9S08DZ having 2 SPI buses.

Can you share your code to interface to the micro-SD.

 

Thanks.

garyArgraves@sbcglobal.net

0 Kudos
Reply
828 Views
Iain
Contributor I

Thanks BlackNight, on closer inspection, it seems that my uSD module takes care of the FAT16 file system, and has a command set for writing to it.

0 Kudos
Reply