Hello!
I am trying to get some faster sd card writes using a samd51 board and running into some issues using DMA using some prewritten libraries, adafruit stuff, mostly. I am not entirely sure what's going on with the sercom spi library using the adafruit bsp, but I think it breaks the DMA access they had implemented earlier in their fork of SDfat.
Before I went further trying to implement my own spi driver, possibly using the SDfat due example as a start, I thought I might try and make raw SDIO work on a SAME54 xplained pro. I fudged some stuff around and think I have something that works as well as something that keeps time (systick counter) and I can't manage much more than 1,300kb/s write speeds at 50MHz divided clock speed. Looking at this link here I think this makes sense, except I am buffering/writing 64 512byte blocks so I expected more.
https://www.alkgrove.com/articles/SAMD51_MicroSD_article.html
The reference for due speeds are on the readme for the repository. I believe they were done at 24MHz and 32KB write buffer. If I recall, elsewhere he still manages more than 2MB/sec at a 12MHz spi clock speed too. For reference, with the adafruit SAMD BSP and their SDFat fork I get ~130kb/sec on the same exact SD card, with the same size write buffer.
I guess my question is, if I were willing to give up 2 large write buffers in ram could I possibly use DMA/SPI to log data to a SD card at >1MB/s? I figure waiting for the SD card to do it's thing is the main time waste, and if I were able to double buffer and use a few DMA channels and callbacks to switch between the two then it should be possible?
Thank you!!