Not sure if this belongs in the embedded forum or here.
Anyway I finally got my Pic reading my SD memory correctly. Turns out it was the one SD chip that I was using that appeared to be the problem.
Anyway I started using some FAT functions I found. It looks for a particular signature in Sector 0 of the chip to determine if it is FAT16 or FAT32.
I did some checking and see that at offset 54 for FAT16 you are supposed to have FAT16 in ASCII?
And FAT32 at offset 82 for FAT32?
Also the label is supposed to be stored in sector 0?
I am finding none of these? I found the label in sector 8321 and I am not finding anything that has to do with FAT anywhere on the chip.
Is this because I formatted with Windows 7? How can I get this SD chip formatted to comply with the FAT32 standard?
This is what Microsofts specification says for offset 82
Always set to the string FAT32 . Please see the note for this field in the FAT12/FAT16 section earlier. This field has nothing to do with FAT type determination.
http://msdn.microsoft.com/en-us/windows/hardware/gg463084
Not sure why the software is using these bytes but that is irrelevant. Why am I not finding FAT32 anywhere on the SD chip?
This is what it says about offset 43
Volume label. This field matches the 11-byte volume label recorded in the root directory.
NOTE: FAT file system drivers should make sure that they update this field when the volume label file in the root directory has its name changed or created. The setting for this field when there is no volume label is the string NO NAME
I am not seeing a label at 43.
Anyway I finally got my Pic reading my SD memory correctly. Turns out it was the one SD chip that I was using that appeared to be the problem.
Anyway I started using some FAT functions I found. It looks for a particular signature in Sector 0 of the chip to determine if it is FAT16 or FAT32.
I did some checking and see that at offset 54 for FAT16 you are supposed to have FAT16 in ASCII?
And FAT32 at offset 82 for FAT32?
Also the label is supposed to be stored in sector 0?
I am finding none of these? I found the label in sector 8321 and I am not finding anything that has to do with FAT anywhere on the chip.
Is this because I formatted with Windows 7? How can I get this SD chip formatted to comply with the FAT32 standard?
This is what Microsofts specification says for offset 82
Always set to the string FAT32 . Please see the note for this field in the FAT12/FAT16 section earlier. This field has nothing to do with FAT type determination.
http://msdn.microsoft.com/en-us/windows/hardware/gg463084
Not sure why the software is using these bytes but that is irrelevant. Why am I not finding FAT32 anywhere on the SD chip?
This is what it says about offset 43
Volume label. This field matches the 11-byte volume label recorded in the root directory.
NOTE: FAT file system drivers should make sure that they update this field when the volume label file in the root directory has its name changed or created. The setting for this field when there is no volume label is the string NO NAME
I am not seeing a label at 43.