I am using an Arduino Due with SD and SPI libraries.
I have a matrix (12 x 8) of analogue sensors all of which are sampled, the information processed and the resulting data stored at a rate of 1kHz. The system is thus pretty much at its limits. I need to output these data along with a time stamp to an SD card. As I had read that there could be an issue of latency I opted to store the data in an external ram buffer (at present 2Mbit but I hope to expand it to 4Mbit on the next itteration). The data are transfered from the ram to the SD card at the end of the run (determined either by the ram being full or the observation ceasing).
Everything works fine but I would like to upgrade to the SdFat library to be able to use its enhanced functionality.
When I do upgrade I find that the system cannot properly access the ram and writes 0xff to the SD card and not the saved data. (I know the data are correct in the ram as I can test them before initiating the SD system.)
I have extracted the relevant bits of code (as appended) and tested them. The outputs reflect exactly what I am getting from my main code (the SD system transfers the saved data, the SdFat system only writes a load of 0xff) so I guess that the problems reside somewhere in this code. My guess is that the SdFat is somehow blocking the reading of the ram but I have no 'scope to be able to analyse the SPI lines properly.
I am somewhat confused as I understood the SD library to be a subset of the larger more powerful SdFat library. I would have expected the upgrade from SD to SdFat to therefore be unproblematic.
Can anybody point me in the right direction to get a solution. Thanks.
r_w_sram_nobuff_sdfat.ino (3.67 KB)
r_w_sram_nobuff_sd.ino (3.6 KB)