Having problems with SD card

Dear sir/madam,

Recently I acquired a Renesas Sakura development board, to evaluate whether we want to use Renesas ICs in the future. One of the most interesting features was the microSD card slot that was already present, which is ideal for datalogging.

However, even the simple demo program that was posted in the reference guide does not work. I tried SD cards in three different sizes (1GB, 2GB and 8GB), formatted as both FAT16 and FAT32, and none of the six configurations works, all I get is the notification that no SD card was found (that is, SD.begin() results in false).

I was wondering, am I doing something wrong? Is my board faulty? What would be the best way to test this? 

The code I used is as follows:

#include <Arduino.h>
#include <SD.h>
void setup(){
    while(!Serial.available()); // wait to press key
    Serial.read(); //dummy
        Serial.println("Card failed, or not present.");
void loop(){
    File file = SD.open("sample.txt", FILE_WRITE);
        Serial.println("Success to open sample.txt and write hello.");
        file.println("Hello, my SD");
        file = SD.open("sample.txt", FILE_READ);
        Serial.println("Reading file...");
        Serial.print("File Size:");
        digitalWrite(PIN_LED0, 0);
        Serial.println("Remove the file? y/n");
        if(Serial.read() == 'y'){
            Serial.println("sample.txt has been removed");
    } else {
        Serial.println("Failed to open file.");
        digitalWrite(PIN_LED0, 0);
Parents Reply
  • Dear Okamiya-さん

    This is correct. My DUT was using pin 11, so it didn't work. Pin 12 and pin 13 gave the same result.
    Great to hear it will be put in the reference, might save someone a headache someday.

    Thanks for trying to help though! 



No Data