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:
// wait to press key
"Card failed, or not present."
File file = SD.open(
"Success to open sample.txt and write hello."
"Hello, my SD"
file = SD.open(
"Remove the file? y/n"
"sample.txt has been removed"
"Failed to open file."
In reply to Okamiya Yuuki:
In reply to Mitsuki:
I have attached the .bin file. The serial monitor is running at 9600 baud.
I hope you can help me further tomorrow.
It works fine on my Sakura as seen below screen. There seems to be no problem on your software.
I used 4GB micro SD. Arduino library supports SD, SDHC so I think there is no problem with your SD. Please confirm your Sakura if it had physical damage at SD socket.
Dear Okamiya-さん Thanks for all the help you provided. The problem has been resolved now. It appeared that my DUT messed up the connection. Once I removed all connections to the DUT, the SD card function worked flawlessly. The SPI pins, pins 11, 12, 13, should be avoided, apparently. Maybe it would be nice to add this to the reference page at http://gadget.renesas.com/en/reference/sakura/library_sdmmc.html to avoid future problems. Yours, 美月
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!