Hello everybody!!
I'm developping an application and I need to write/read some data in a microSD Card.... I have Freescale's Flexis JM SD Card Reader, hardware and software... If I'm not wrong, documentation DRM104 refers to it.
This Freescale's hardware comes with 2 demo softwares:
1- SD Card Datalogger
2- SD Card Reader (USB-SD Reader)
Both softwares work fine... The datalogge logs the lumens or lux sensed (I don't remember wich one). Then, with the other soft. I can see the file content...
Now, for my application I want to use a microSD instead of a SD Card [Note: for the communication I use a SPI, not the SD Card Protocol]... So, to test if it's working I log the data wiht my own application and read the content wth Fresscale's Card Reader (I put the microSD in a SD adapter)...
Well nothing happens... I can read the microSD Card, but it's empty...
So then I use the microSD with Freescale's Datalogger (again, the microSD inside a SD adapter)... For my sourprise, nothing happens, one more time....
Once, I remember being in a Freescale Seminaire... And if I recall correctly, someone told me that NOT every microSD can be access by SPI.... So my question is... is that true? Does the microSD Card have other interfacing needs?
Thanks all of you!!!!
Solved! Go to Solution.
Well... I've finally solved it... It wasn't a timing problem, I just re-format the 2 microSD cards and they worked fine
The FAT File System of freescale with some bug fixes was posted on:
http://code.google.com/p/brtos/downloads/list
Now supports up to 512 MB and the list function is working correctly.
The corruption of files was also fixed.
Best Regards,
Gustavo
Hi Gustavo
I've downloaded and had a really good look at your FAT implementation. You mention that it now supports up to 512 MB. I can't see any difference between the 2 versions that would make this difference. From what I see, the array that stores the FAT entries (INT8U u8buffer[512] is 512 bytes in size and can therefore store 256 entries. With a max cluster size of 64k, that equals 64k x 256 = 16 384k. What am I missing?
Best regards, Norman
The calculation is not so simple. For a 512MB SD card there are 32 sectors per cluster.
512 MB - 1023 MB 16-bit 32 16K
Therefore:
32 * 512 = 16K (Cluster size)
And,
16K clusters * (64k/2) = 512MB
Right now i'm using other FAT file system implemention. This new file system supports FAT32 and directory structures. You can download the code in this links:
Coldfire JM128 Demo:
http://brtos.googlecode.com/files/TWR-LCD-FatFS.rar
Coldfire QE128 Demo:
http://brtos.googlecode.com/files/BRTOS%20CFV1%20SD%20Card%20%2B%20FatFS.rar
Best Regards,
Gustavo
I downloaded the bug fix, but the fat.c and sd.c files seem to be missing - they show in the project window, but when you click on them, the file is not found. I searched the downloaded projects and can't find the files. Can you please re-post the entire project.