SD card does not work on the Uno WiFi REV2

Using the CardInfo example I tried to set up an SD module with a regular 8GB SDHC card formatted to FAT32 on the Uno WiFi REV2.
CS to pin 4, MOSI to pin 11, MISO to pin 12, CLK to pin 13, GND to GND and +5V to +5V.
This doesn't work, the initialization fails every time, also when I try to set the CS to pin 10. But using this exact same setup on the Uno REV3 works perfectly fine, can anyone help me out?

sunbro42:
Using the CardInfo example I tried to set up an SD module with a regular 8GB SDHC card formatted to FAT32 on the Uno WiFi REV2.
CS to pin 4, MOSI to pin 11, MISO to pin 12, CLK to pin 13, GND to GND and +5V to +5V.
This doesn't work, the initialization fails every time, also when I try to set the CS to pin 10. But using this exact same setup on the Uno REV3 works perfectly fine, can anyone help me out?

use the ICSP header to wire to SPI pins and you can use pin 4 as CS.
Uno WiFi R2 is very different from Uno R3. it doesn't have SPI on 11. 12, 13

1 Like

Juraj:
use the ICSP header to wire to SPI pins and you can use pin 4 as CS.
Uno WiFi R2 is very different from Uno R3. it doesn't have SPI on 11. 12, 13

Hi Juraj, after trying it with the SPI pins the SD card is still not working on the Uno WiFi R2, all the attached pins are correct, is there anything else I need to do?

sunbro42:
Hi Juraj, after trying it with the SPI pins the SD card is still not working on the Uno WiFi R2, all the attached pins are correct, is there anything else I need to do?

not working how? did you try the CardInfo example?

Juraj:
not working how? did you try the CardInfo example?

Yes, the CardInfo example still fails to initialize the SD card

sunbro42:
Yes, the CardInfo example still fails to initialize the SD card

fails how? what does it print?

Juraj:
fails how? what does it print?

  if (!card.init(SPI_HALF_SPEED, chipSelect)) {
    Serial.println("initialization failed. Things to check:");
    Serial.println("* is a card inserted?");
    Serial.println("* is your wiring correct?");
    Serial.println("* did you change the chipSelect pin to match your shield or module?");
    while (1);
  } else {
    Serial.println("Wiring is correct and a card is present.");
  }

It fails here

I got it working with the ICSP headers, the problem was that I forgot to supply 5V to the ICSP header, thanks for your time!

Hello,

I have the same problem, can you give all the wiring you have between the board and SD card shield ?

Many thanks

Fred

fcamps:
Hello,

I have the same problem, can you give all the wiring you have between the board and SD card shield ?

Many thanks

Fred

he had a module. you have a shield? put it on

Yes a shield, but i understood the shield in not compatible, i had to use other pin, but how to change the SD library ?

fcamps:
Yes a shield, but i understood the shield in not compatible, i had to use other pin, but how to change the SD library ?

what SD shield exactly?

the SD library uses the SPI library and it uses the default SPI pins. they should be at the ISCP/SPI 2x3 header. the CS pin is specified with SD.begin