Micro-SD card not recognized

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
mlportersr
 
Posts: 20
Joined: Fri Feb 16, 2018 5:55 pm

Micro-SD card not recognized

Post by mlportersr »

I have one of the new ethernet shields and the ethernet functionality works well. The problem is with the Micro-SD slot. I can't get it to recognize any card. Anybody know of cards that they know work?

Mike...

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: Micro-SD card not recognized

Post by adafruit_support_carter »

Are you using this?
https://www.adafruit.com/product/2971
How are you trying to access the SD card?

User avatar
mlportersr
 
Posts: 20
Joined: Fri Feb 16, 2018 5:55 pm

Re: Micro-SD card not recognized

Post by mlportersr »

Yes, and I am using the example sketches that came with the SD library. Do I need special libraries, like for the Ethernet?

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: Micro-SD card not recognized

Post by adafruit_support_carter »

I'd think the standard SD library would work, although there is a different one linked to from here:
http://wiki.seeed.cc/W5500_Ethernet_Shi ... /#software

How are you formatting the SD card? Post the full output you get on the serial monitor when you run the example.

User avatar
mlportersr
 
Posts: 20
Joined: Fri Feb 16, 2018 5:55 pm

Re: Micro-SD card not recognized

Post by mlportersr »

OK, I am using the Cardinfo.ino example script from the standard SD library.

I can't figure out how to post the screenshot I took, but the error simply says,

"Initializing SD card....initialization failed. Things to check:
* is a card inserted?
* is your wiring correct?
* did you change the chipSelect pin to match your shield or module?"

And the answers are:
yes there is a card inserted
there is no wiring involved
the CS is set to 4 -- which should be correct, but I tried 10 and 8 for grins -- all to no effect.

User avatar
mlportersr
 
Posts: 20
Joined: Fri Feb 16, 2018 5:55 pm

Re: Micro-SD card not recognized

Post by mlportersr »

One more thought: Is there a limit as to the size that it can handle? I have looked but have't seen that parameter mentioned anywhere. 8Gb or 16Gb are the smallest I can find locally here in Houston.

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: Micro-SD card not recognized

Post by adafruit_support_carter »

One more thought: Is there a limit as to the size that it can handle?
That could be it. There is both a size limit and requirement for specific formatting. It does mention here:
http://wiki.seeed.cc/W5500_Ethernet_Shi ... e-overview
the limit is:
SD Card Socket: support Micro SD card in FAT16 or FAT32; maximum storage is 2GB.

User avatar
mlportersr
 
Posts: 20
Joined: Fri Feb 16, 2018 5:55 pm

Re: Micro-SD card not recognized

Post by mlportersr »

Do you folks by chance sell 2Gb cards? No stores sell them that small in Houston and if I have to do online, I would rather deal with you guys.

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: Micro-SD card not recognized

Post by adafruit_support_carter »

We don't. But maybe it's the way you've formatted it. Are you sure you've formatted the card with either FAT16 or FAT32?

User avatar
mlportersr
 
Posts: 20
Joined: Fri Feb 16, 2018 5:55 pm

Re: Micro-SD card not recognized

Post by mlportersr »

It is formatted FAT32.

User avatar
adafruit2
 
Posts: 22187
Joined: Fri Mar 11, 2005 7:36 pm

Re: Micro-SD card not recognized

Post by adafruit2 »

it should definitely work, the SD library works for all SDHC cards, up to 16GB for sure . do you hvae only one card?

User avatar
mlportersr
 
Posts: 20
Joined: Fri Feb 16, 2018 5:55 pm

Re: Micro-SD card not recognized

Post by mlportersr »

The card I have is a 16G - somewhere I found a comment saying that there were issues with 32G or larger.

In any case I have a couple 2G cards on order online. You guys should really consider selling these things -- especially since 2G cards are not commonly available. Or better yet someone needs to figure out what needs to be done so the boards can actually use cards that are commonly available.

User avatar
adafruit2
 
Posts: 22187
Joined: Fri Mar 11, 2005 7:36 pm

Re: Micro-SD card not recognized

Post by adafruit2 »

we sell 4G! they work great :)
https://www.adafruit.com/product/102
but any 4G or 2G card will work. above 32GB they're often SDXC cards, which are different

User avatar
smp
 
Posts: 52
Joined: Tue Dec 18, 2018 4:40 pm

Re: Micro-SD card not recognized

Post by smp »

I have been struggling with the same issue. I have the Seeed W5500 shield on a Metro M4.
I am using a 4GB SDHC card. To get the SD card to function I had to call the following code BEFORE
calling the Ethernet initialization code:

Code: Select all

bool
setupSD(void)
{
    pinMode(W5500_SS, OUTPUT);
    digitalWrite(W5500_SS, HIGH);

    // Set up variables using the SD utility library functions:
    if (!card.init(SPI_HALF_SPEED, cardSelect)) {
        Serial.printf("SD card initialization failed.\n");
        return false;
    }
    else {
        return true;
    }
}
It came from code I found here:
https://learn.adafruit.com/arduino-ethe ... d?view=all

No idea why it works, but it allows me to use the SD card, where otherwise its not found.
I experimented placing it at different locations. The closest I came to nailing it down is that
it MUST be called before the Ethernet card setup.

Note that to actually setup the SD card I call:

Code: Select all

void
useSD(void)
{
    // See if the card is present and can be initialized:
    if (!SD.begin(cardSelect)) {
        Serial.println("SD Card init failed!");
        sos();
    }
}
after initializing network, etc.

Steve

User avatar
adafruit2
 
Posts: 22187
Joined: Fri Mar 11, 2005 7:36 pm

Re: Micro-SD card not recognized

Post by adafruit2 »

yeah that happens, some SD cards want to be initialized first!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”