MicroSD card max size in Teensy 4.1

roncos

New member
I am considering Teensy 4.1 for a new project.
Can you tell me what is the largest MicroSD card that can be used with Teensy4.1?
Will a 256GB card work?
 
Sorry I am not 100% sure of the max size that the SDFat library will support. I am guessing it does, the largest ones I think I have played with are 32gb and 64gb.
I know that anything over 32GB will be formatted using ExFat
 
It is possible that with the most recent version of SdFat beta you can use the 256 Gb memory.

I have a 128 Gb microSD installed in the GPS and it works very well

SdFatBeta128Gb_0.jpg

SdFatBeta128Gb.jpg

SdFatBeta128Gb_1.jpg
 
Last edited:
Integrated SD_Fat code was tested with 512 GB cards last November:

Testing with SansDisk Extreme 512Gbmicro SD:

Builtin_SDCARD Cardinfo:
Code:
Initializing SD card...Wiring is correct and a card is present.

Card type: SDHC
Volume type is FAT64

Volume size (Kbytes): 499806208
Volume size (Mbytes): 488092

Extern Card Reader:
Code:
Initializing SD card...Wiring is correct and a card is present.
Card type: SDHC
Volume type is FAT64
Volume size (Kbytes): 499806208
Volume size (Mbytes): 488092

Also tried it with the ILI9341_slideshow JPEG sketch and read and displayed no issues

So far it seems to be working as tested
 
You need to use SdFat or the latest 1.54 betas (where SD is now just a thin wrapper for SdFat) for cards larger than 32GB.

If you use Teensyduino 1.53 or older, the old Arduino SD library supports only up to 32GB. If you're not sure which version you have, in Arduino click Help > About (or Teensyduino > About on Macintosh) to see which version is installed.
 
You need to use SdFat or the latest 1.54 betas (where SD is now just a thin wrapper for SdFat) for cards larger than 32GB.

Is SdFat a standalone program, so we can format the SD card simply with any cardreader connected to a PC ?

What is the file format to chose for the formatting in order to be used with a Teensy 4.1: exFat ?

Thank you
 
Use FAT for 32GB and smaller cards, or exFat for larger than 32GB.

Theoretically up to 2TB should work, but as far as I know 1TB is the largest card anyone has tried. The largest card I own is 512GB. It works fine.
 
Note: with SD library usage of SDFat, there are different classes you can setup to use:
FatlLb - which does: Fat16, Fat32 and optionally Fat12
ExFatLib - which does ExFat
FsLib - which is setup to use Fat or ExFat depending on the card.

Our SD Library uses the FsLib (at least for most teensy boards)

We have format code built in, including in some of our sketches.
However, you should be able to use any formatter on your PC.

I know at least at one point the developer of SDFat recommended the formatter from: https://www.sdcard.org/downloads/formatter/
Which should initialize and format the cards to the SD standards...
 
Back
Top