SD card read/write

Development environment specific, Arduino, Eclipse, VS2013, Em::Blocks etc
Post Reply
mebab
Posts: 115
Joined: Mon Aug 24, 2020 12:42 pm
Answers: 4

SD card read/write

Post 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
by mebab » Mon Aug 24, 2020 9:13 pm
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
Go to full post
User avatar
fpiSTM
Posts: 1756
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: SD card read/write

Post by fpiSTM »

Maybe an issue btw 5V/3V ?
User avatar
fpiSTM
Posts: 1756
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: SD card read/write

Post by fpiSTM »

I've tested with Nucleo L476 and a SD card shield (CI shield from arm mbed) and it works.
mebab
Posts: 115
Joined: Mon Aug 24, 2020 12:42 pm
Answers: 4

Re: SD card read/write

Post 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
Post Reply

Return to “IDE's”