Go Down

Topic: SdFat for Due posted (Read 24 times) previous topic - next topic

kamil_szczepan

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 ?



thomasmue

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:









DUESDSPI
MOSICMDDI
MISODAT0DO
SCKCLKSCK
D10CD/DAT3CS
3.3VVDDVDD
GNDVSSVSS
GNDVSS2VSS2


I get this for a cheap 2GB san disk SD
Code: [Select]
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:
Code: [Select]
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


jake1981

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?

alvesjc

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.

jake1981

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..

Go Up