Go Down

Topic: SD card does not work on the Uno WiFi REV2 (Read 2093 times) previous topic - next topic

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?

Juraj

#1
Dec 27, 2018, 06:52 am Last Edit: Dec 27, 2018, 06:54 am by Juraj
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

sunbro42

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?

Juraj

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?

sunbro42

not working how? did you try the CardInfo example?
Yes, the CardInfo example still fails to initialize the SD card

Juraj

Yes, the CardInfo example still fails to initialize the SD card
fails how? what does it print?

sunbro42

fails how? what does it print?
Code: [Select]

  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

sunbro42

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!

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

Juraj

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

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  ?

Juraj

#11
Feb 08, 2019, 03:31 pm Last Edit: Feb 08, 2019, 03:33 pm by Juraj
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

Go Up