SD Card Info OK, BUT the rest programs

Hi All,

After few days of fighting with my SD cards and Arduino Leonardo I have no more power and ideas to solve the problem myself :(. Please, help.

  1. Electrical connections for sure OK (ICSP → voltage divider → 3,3V → SD Card; 3,3V as power; PIN4 as CS → voltage divider → 3,3V → SD Card; GND to GND)
  2. Also tried with CATALEX Micro SD adapter (with 5V logical pins and Vcc) → THE RESULT IN PROGRAMS AND COMMUNICATION IS THE SAME which means that electrical connections are OK
  3. I tried 3 SD Cards → 2GB, 16GB, 16GB
  4. I tried different formats - as FAT, FAT32
  5. I tried original SD Card Formetter ver 4.0
  6. I tried partition programs to make 16GB card smaller (2GB)
  7. I tried a commend SD.begin(SPI_HALF_SPEED, chipSelect) and QUARTER_SPEED too.

The result ALWAYS the same:
Program CardInfo (example for Arduino SD library) shows 16GB card formated as FAT32. When there is a partition on this card maked to smaller the card to 1921KB it communicates it as 2GB card (below):

Initializing SD card…Wiring is correct and a card is present.
Card type: SDHC
Volume type is FAT32
Volume size (bytes): 2015268864
Volume size (Kbytes): 1968036
Volume size (Mbytes): 1921
Files found on the card (name, date and size in bytes):

Using the same card formatted orginally to 16GB by SD formatter it showes the card but smaller:

Initializing SD card…Wiring is correct and a card is present.
Card type: SDHC
Volume type is FAT32
Volume size (bytes): 2814377984
Volume size (Kbytes): 2748416
Volume size (Mbytes): 2684
Files found on the card (name, date and size in bytes):

Using 2GB card (different formats and partition sizes):

Initializing SD card…Wiring is correct and a card is present.
Card type: SD2
Could not find FAT16/FAT32 partition.
Make sure you’ve formatted the card

If there is any file on the cards, CardInfo program doesnt show it!

Then, after uploading the next example program, Datalogger, all my cards generates the same communicate:

Initializing SD card…Card failed, or not present
error opening datalog.txt

Also other simple data loggers which I wrote and were tested in the net by others dont work :frowning:

#include <SPI.h>
#include <SD.h>

File plik;

void setup() {

plik =“test.txt”, FILE_WRITE);
plik.println( “testowanie” );


void loop() {


:(( Please help. I dont know what to do.


The problem is the new 1,8 IDE!
After installing 1,7,11 ( everything is OK

Hey DEVELOPMENT TEAM! What is wrong with 1,8??

best regards Pawel

This might be relevant:

we have recently updated the SD library to increase its performances but we are receiving some reports like yours.
After some investigation seems that only certain SD cards are affected by this issue.

If so the problem is not related to the Arduino IDE version but instead to the SD library version. Since the 1.7.11 version of the IDE includes the older SD library it makes it seem like the IDE version change was the problem. You could test this by:

  • Install Arduino IDE 1.8.0
  • Sketch > Include Library > Manage Libraries...
  • Type SD in the "Filter your search..." box
  • Scroll down until you find the "SD built-in by Arduino, Sparkfun" entry, click on it.
  • Select "1.0.9 from the drop-down menu.
  • Click "Install"
  • After installation completes click "Close".

Hi Pawel,

there is definitely something wrong with the new IDE 1.8 (precise: the SD library), but the previous “” versions (reportedly since 1.6.9 or so) seemed already coming with the same “imworsement” for SD cards.

Today I could test a bit on my Mac; started with 1.6.13, upgraded to 1.8 (downgraded as adviced the SD card library from 1.10 to 1.09) → although my cards were formatted with the recommended SDFormatter 4.0 → no chance to get it working. Exactly the same problems in sequence as you reported in the first post here.

Now I got all working and maybe you can return to IDE 1.8 if you re-format your SD cards with SDFormatter 4.0 by using the option “interoperability”. This did the trick for me in IDE 1.8. - >


@Pert: the recommended downgrade of the SD library did not work for me!


thanks for answers - I’ll check your solutions and let you know.
rpt007 - where shall I search this special option “interoperability”?
I have SD Formatter 4.0 for Windows from here

and cannot find it. The attachement show my SD Formatter.

BR, Pawel

I am on a Mac and under options I found the "interoperabilty" button.
It looks as if Windows has a different screen and it might be that the option "Format Size Adjustment ON" means the same as "interoperability" on my Mac.

If so - the developers should be guided to be more consistent when producing tools which should do the same on different OS, just a thought; but I should not be so critical as they have apparently used at least the same icon for version 4 on both OS ...