HW: Due/R3 + 2x identical cheapo ebay SD module with 5v and 3.3v (there is a 3.3 vregulator onboard that presumably drops the 5v)
SW: IDE 1.5.1r2
Libraries:
#include <SPI.h>
#include <SD.h>
I have a very simple SD card cloner set up as follows: MISO,MOSI,SCK on ICSP header, with SS for src drive on 4, SS for dst drive on 10
Before we continue I must make it clear that it works perfectly when I init both SPI channels with SPI_HALF_SPEED, i.e. I have exactly cloned an SD card on this rig. Both ebay cheapo readers running at 5v. So the code and wiring look good, hence not including complete details. I call the src and dst A and B for convenience.
The problem starts when I try SPI_FULL_SPEED, and it gets weird. I have tried the following with 7 different SD or Mini SD cards, ranging from good quality Kingston SDHC 4 through noname 128MB and sizes of 1GB 2GB 4GB. The following issue occurs exactly the same each time, no matter which card I use in A or B:
early code:
#define SRC 4
#define DST 10
Sd2Card src;
Sd2Card dst;
With any/all of the cards in A, with B empty, the following code correctly reports the size:
Serial.println(src.init(SPI_FULL_SPEED,SRC));
Serial.println(src.cardSize());
The same is true for any/all cards in B with A empty::
Serial.println(dst.init(SPI_FULL_SPEED,DST));
Serial.println(dst.cardSize());
Also reports correct size
B U T if both A and B are populated, either/both code snippet fail with init returning zero! Remember, at SPI_HALF_SPEED, the amended code reports correctly in all circumstances / permutations
Summary: When both SD readers are populated,BOTH inits fail if they are initialised at full speed, even on two cards that both successfully init'ed at FULL_SPEED when mounted solo, in either reader!
H E L P!!! I want full speed, half speed gives me about 9MB/s which translates to a loooooooong time even for 1GB
Any ideas?