Page 1 of 1

SD card read/write

Posted: Mon Aug 24, 2020 12:51 pm
by mebab
I am using Nucleo STM32L476 which includes Arduino like pins (other than ICSP on Arduino). I have connected SD shield 3.0 to the Nucleo as I used to connect it to the Arduino101 board. Meanwhile, I use the Arduino example for the 'read/write' on the SD card. The Nucleo board + SD shield is programmed via Arduino IDE.

Problem:
SD card cannot be initialized while installed on Nucleo where it can work fine with Arduino.
I use D4 on Arduino as 'CS' and I try the same and different pins on Nucleo without success. I cannot figure out what is wrong to get this error!

Any help is appreciated

Re: SD card read/write

Posted: Mon Aug 24, 2020 1:38 pm
by fpiSTM
Maybe an issue btw 5V/3V ?

Re: SD card read/write

Posted: Mon Aug 24, 2020 2:14 pm
by fpiSTM
I've tested with Nucleo L476 and a SD card shield (CI shield from arm mbed) and it works.

Re: SD card read/write

Posted: Mon Aug 24, 2020 9:13 pm
by mebab
Thanks for the comments!
I think I could find the root cause of the issue that was hardware related.
The SD shield 3.0 has a special female connector called ICSP (for SPI connections). While using this shield with Arduino, it is connected to the same male connector on the Arduino. However, Nucleo 64 doesn't have this male connector which means the SPI connection is broken.

I just came across three disconnected jumpers on the SD shield that can make the connection of pins (11, 12, and 13) of the SD shield to (MOSI, MISO, and SCK) of the microcontroller. After connecting these jumpers SD shield works as expected on the Nucleo 64 L476.

Bests,
Mehrdad