Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #15 on: December 14, 2012, 02:30:28 pm » |
I make the following connection between the Due and the Sparkfun SDshield: Due SDshield -------- -------- Ground Ground 3.3V 3.3V D8 D8 MOSI D11 MISO D12 SCK D13  It is working at full speed!!! Here are the result with a Kingston 2 GB microSD card: Type any character to start Free RAM: 62747 Type is FAT16 File size 20MB Buffer size 32768 bytes Starting write test. Please wait up to a minute Write 2224.90 KB/sec Maximum latency: 721045 usec, Minimum Latency: 8101 usec, Avg Latency: 14716 usec
Starting read test. Please wait up to a minute Read 3954.20 KB/sec Maximum latency: 9005 usec, Minimum Latency: 7940 usec, Avg Latency: 8286 usec
Done
Then I enable CRC checking (USE_SD_CRC set to 2 in SdFatConfig.h) and I modify bench.ino so that it loops for ever. After more than 100 loops, I don't get any error =========== Pass number 106 =========== Free RAM: 62743 Type is FAT16 File size 20MB Buffer size 32768 bytes Starting write test. Please wait up to a minute Write 1268.47 KB/sec Maximum latency: 370285 usec, Minimum Latency: 19459 usec, Avg Latency: 25752 usec
Starting read test. Please wait up to a minute Read 1686.36 KB/sec Maximum latency: 20292 usec, Minimum Latency: 19243 usec, Avg Latency: 19429 usec
Done =========== Pass number 107 ===========
I guess than, despite of large (and ugly) connections between the two cards, the buffer on the SDshield help to reformat the signals. Thank you fat16lib for your library!
|
|
|
|
|
Logged
|
|
|
|
|
London, ON
Offline
Newbie
Karma: 0
Posts: 49
|
 |
« Reply #16 on: January 17, 2013, 05:27:32 pm » |
I am having trouble getting my card prepped for the DUE, I am using the SanDISK Extreme Pro 16 Gb (95Mbps) Running QuickStartEnter the chip select pin number: 10
Card successfully initialized.
Can't determine the card size. Try another SD card or reduce the SPI bus speed. The current SPI speed is: 10.50 MHz Edit spiSpeed in this sketch to change it.
Running PrintBenchmarkType any character to start Free RAM: 95507 Can't access SD card. Do not reformat. SD errorCode: 0X4,0XFF
Any ideas why this is the case? Dan
|
|
|
|
|
Logged
|
Dialup is the future.
|
|
|
|
0
Offline
Jr. Member
Karma: 1
Posts: 83
Arduino rocks
|
 |
« Reply #17 on: January 17, 2013, 08:27:10 pm » |
Hi!
How are you connecting the SDcard to Due?
|
|
|
|
|
Logged
|
|
|
|
|
London, ON
Offline
Newbie
Karma: 0
Posts: 49
|
 |
« Reply #18 on: January 18, 2013, 11:50:47 am » |
Lmao, yes.. I am using a similar stand lone like this: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=246SS to pin 10 and everything else connected to the SPI header in the middle of the due. Daniel
|
|
|
|
|
Logged
|
Dialup is the future.
|
|
|
|
0
Offline
Jr. Member
Karma: 1
Posts: 83
Arduino rocks
|
 |
« Reply #19 on: January 18, 2013, 11:58:24 am » |
Ok, might be because of that chips and resistors.
Try to go to the lowest speed possible first.
If it works, start increasing until it fails.
|
|
|
|
|
Logged
|
|
|
|
|
London, ON
Offline
Newbie
Karma: 0
Posts: 49
|
 |
« Reply #20 on: January 18, 2013, 12:09:26 pm » |
Hmmm, interesting, I changed it to EIGHTH speed and quickstart, benchmark and sdformatter all worked. But that was the only speed that allows me. I hope this is fast enough for my application. How can I try and obtain a faster speed. Perhaps the 6'' cables are too long.
Dan
|
|
|
|
|
Logged
|
Dialup is the future.
|
|
|
|
0
Offline
Jr. Member
Karma: 1
Posts: 83
Arduino rocks
|
 |
« Reply #21 on: January 18, 2013, 12:42:38 pm » |
If you reduce cabling, you might get close to 14Mhz. But with that resistors, you'll not move further then that.
I've used the sdcard in my tft also, and I've managed to get up to 28Mhz by removing the resistors and just put a shunt in their place.
The only way I've got 42Mhz, was with one sdcard reader like that with wires directly attached to the sdcard reader socket bypassing all the electronics there. Those electronics are for voltage translation and are very slow. Since Due is already 3.3V, you can safely bypass it.
I can place a picture here later for your reference.
|
|
|
|
|
Logged
|
|
|
|
|
London, ON
Offline
Newbie
Karma: 0
Posts: 49
|
 |
« Reply #22 on: January 18, 2013, 02:57:45 pm » |
I think I am okay with the speed I have - I am just logging 2 byte numbers at 50Hz - so if I need the extra space, I will change the design. Thanks 
|
|
|
|
|
Logged
|
Dialup is the future.
|
|
|
|
0
Offline
Jr. Member
Karma: 1
Posts: 83
Arduino rocks
|
 |
« Reply #23 on: January 19, 2013, 08:24:17 am » |
Hi. Ok, that's up to you off course, I was just suggesting. Anyway, the is the modded sdcard reader for Due.   Regards, Joao
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 1
|
 |
« Reply #24 on: January 19, 2013, 09:11:59 pm » |
Thanks for the work on the library! Here's first results from bench for an 8 GB PNY micro class 4 in the Adafruit micro SD breakout: Type any character to start Free RAM: 95415 Type is FAT32 File size 5MB Buffer size 100 bytes Starting write test. Please wait up to a minute Write 85.27 KB/sec Maximum latency: 159470 usec, Minimum Latency: 15 usec, Avg Latency: 1171 usec
Starting read test. Please wait up to a minute Read 1208.31 KB/sec Maximum latency: 865 usec, Minimum Latency: 15 usec, Avg Latency: 81 usec
What were they thinking when they put the pins in the middle, right under the edge of the shield footprint? (I guess they were thinking minimum conductor length, and matching the original layout but not to accommodate existing shields that ignored the ICSP header...) Here's the same card with 20 MB and 32768 Buffer at full speed. Free RAM: 62747 Type is FAT32 File size 20MB Buffer size 32768 bytes Starting write test. Please wait up to a minute Write 2074.35 KB/sec Maximum latency: 452410 usec, Minimum Latency: 7830 usec, Avg Latency: 15788 usec
Starting read test. Please wait up to a minute Read 4381.52 KB/sec Maximum latency: 12166 usec, Minimum Latency: 7413 usec, Avg Latency: 7476 usec
more details at http://rwsarduino.blogspot.ca/2013/01/usd-on-arduino-due.html including the connection system I rigged up for the Adafruit breakout board.
|
|
|
|
« Last Edit: January 20, 2013, 01:28:19 pm by sellensr »
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 23
|
 |
« Reply #25 on: January 22, 2013, 09:02:16 pm » |
Hey Guys
I have LCD with SD card + shield for him + arduino DUE
the shield got this conection with sd card and due board
D_BUSY pin 7 D_CLK pin 6 D_CD pin 5 D_DIN pin 4 D_OUT pin 3 D_IRQ pin 2 F_WP pin 1 TX0 F_HOLD pin 0 RX0
Ok so, where i find pin definition in lib ?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #26 on: February 09, 2013, 08:33:10 am » |
Thanks for the libary and the pin maps. I am a arduino noob and i managed to access the SD on the Due. I use direct wires to a sd card socket and the following pin connections: | DUE | SD | SPI | | MOSI | CMD | DI | | MISO | DAT0 | DO | | SCK | CLK | SCK | | D10 | CD/DAT3 | CS | | 3.3V | VDD | VDD | | GND | VSS | VSS | | GND | VSS2 | VSS2 |
I get this for a cheap 2GB san disk SD Free RAM: 62747 Type is FAT16 File size 20MB Buffer size 32768 bytes Starting write test. Please wait up to a minute Write 3863.25 KB/sec Maximum latency: 27974 usec, Minimum Latency: 7838 usec, Avg Latency: 8472 usec
Starting read test. Please wait up to a minute Read 4255.58 KB/sec Maximum latency: 11905 usec, Minimum Latency: 7564 usec, Avg Latency: 7698 usec
and this for a 8GB Sandisk extreme Pro 95mb/s: Free RAM: 62747 Type is FAT32 File size 20MB Buffer size 32768 bytes Starting write test. Please wait up to a minute Write 4241.14 KB/sec Maximum latency: 13791 usec, Minimum Latency: 7635 usec, Avg Latency: 7717 usec
Starting read test. Please wait up to a minute Read 4424.19 KB/sec Maximum latency: 7806 usec, Minimum Latency: 7384 usec, Avg Latency: 7405 usec
|
|
|
|
|
Logged
|
|
|
|
|
Finland
Offline
Newbie
Karma: 0
Posts: 34
|
 |
« Reply #27 on: March 13, 2013, 01:22:18 pm » |
I have a shield a screwshield for tft/sd with rtc from aqualedsource.com - rtc and tft and sd works perfectly. SD even on highest speed.. But when I put it all together, I cannot read time from RTC.. It's ds1307, and I am using https://github.com/adafruit/RTClib as RTC library. I think wire.h cannot be used together with sdfat library on Due's DMA mode.. Any solutions?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 1
Posts: 83
Arduino rocks
|
 |
« Reply #28 on: March 14, 2013, 09:30:23 am » |
Hi Jake.
Well, if that is some kind of conflict between DMA and I2C, you can try the Henning Karlsen RTC library. I think it uses some kind of softI2C, it might work for you.
Give it a try.
|
|
|
|
|
Logged
|
|
|
|
|
Finland
Offline
Newbie
Karma: 0
Posts: 34
|
 |
« Reply #29 on: March 15, 2013, 09:35:59 pm » |
Thanks!
Nice library - I've combined it and RTClib, as I think RTClib was better expect it was using Wire.h and I'd rather go without..
Anyway, my bad and my apologies - it seems after all not to be SdFat that causes this, it's UTFT which makes sure RTC is in accessible.. Investigating further..
|
|
|
|
|
Logged
|
|
|
|
|
|