Teensy 3.6 sd card

Status
Not open for further replies.

raindrop

Member
Hi to all!!
Well,recently i bought teensy 3.6 and i would like to use its sd on board module.As i know before i use an sd card i have to format it to FAT32 system,so technically the max size of sd card should be 4Gb.So which is the max size of an sd card that i can use with teensy 3.6 with the help of sdfat library(is it only 4Gb??)??Thanks!
 
Hi to all!!
Well,recently i bought teensy 3.6 and i would like to use its sd on board module.As i know before i use an sd card i have to format it to FAT32 system,so technically the max size of sd card should be 4Gb.So which is the max size of an sd card that i can use with teensy 3.6 with the help of sdfat library(is it only 4Gb??)??Thanks!

you can format uSD > 32 Gig with FAT32. only the cluster size, i.e. minimum file size is larger. 32 Gig is only standard x-over from Fat32 and exFAT
I'm using T3.6 with 128 Gig uSD (256 Gig is still somewhat expensive for my taste) but formatted with exFAT. You can search the forum for exFAT and will find earlier (last year) discussions on uSDFS (which handles SDIO AND exFAT) and on Bill Greiman's SdFatlib (which handles also SDIO, but not sure about exFAT,as no hint in read-me file).

The links are
uSDFS:https://github.com/WMXZ-EU/uSDFS
SdFatLib: https://github.com/greiman/SdFat

From the forum discussion you may note that Bill's SdFatLib is more optimized for reading/writing/streaming small amount of data.
 
Funny I got email about an @raindrop post that was pulled?

***************
So i can forma a 32Gb sd card to FAT 32 and use it with sdfatlib?
***************

Anyhow yes - follow my link to get the recommended tool to format a card up to 32GB for use with the standard SD library. Beyond that as WMXZ notes there are newer libraries that can go beyond 32GB - but even SD is not limited to 4GB by any means. The compromise is minimum file size from the larger underlying sectors/clusters needed to get the 4GB by design FAT32 system to get up to 32GB. So small files will not be able to fill the space without waste.
 
Could you tell which is the minimum file size when use 32 gb sd card formated to FAT32 and use standard sd card libraries??Thanks a lot!
 
Offhand no - experiment with it. Look at free space and add a new file, look at free space and repeat a couple of times.

If SDFormatter is used the UI may indicate the minimum Cluster size.
 
Could you tell which is the minimum file size when use 32 gb sd card formated to FAT32 and use standard sd card libraries??Thanks a lot!

The minimum file size is equal the cluster size. The smallest cluster is 512 bytes. The largest cluster size (allocation block) on the SD formatting tool is 64 kB.
officially supported (guaranteed to work) is up to 32 kB.
 
The minimum file size is equal the cluster size. The smallest cluster is 512 bytes. The largest cluster size (allocation block) on the SD formatting tool is 64 kB.
officially supported (guaranteed to work) is up to 32 kB.

So when i use 32Gb sd each read/write should be a buffer of 64Kb size instead of 512 buffer?
 
So when i use 32Gb sd each read/write should be a buffer of 64Kb size instead of 512 buffer?

Buffersize is independent of disk cluster size (i.e-allocation unit, which defined during formatting). Buffersize depends on the amount of ram yo have available and type of data you read/write
On T3.2 I use as buffer 8kB and on T3.6 I use 32 kB. That is, my read/writes are in chunk of 8 or 32 kB.
 
Buffersize is independent of disk cluster size (i.e-allocation unit, which defined during formatting). Buffersize depends on the amount of ram yo have available and type of data you read/write
On T3.2 I use as buffer 8kB and on T3.6 I use 32 kB. That is, my read/writes are in chunk of 8 or 32 kB.

I have noticed that teensy 3.6 has 4 bit spi.Does this feature supported by sdfat library?If no,how i can use it?Thanks
 
With the normal SD library, all you need to do is SD.begin(BUILTIN_SDCARD). The library will automatically use the 4 bit SDIO interface when you give it that option for SD.begin. Slow SPI mode is used when you give it a pin number for SD.begin(). Easy stuff.
 
Status
Not open for further replies.
Back
Top