With the help of members of this forum I was able to successfully port FATFs to my project which includes SD Card connected to SAMD21 via SPI Interface. I am now trying to optimise the code in order to achieve maximum speed for reading and writing. I have read on Atmel knowledge database that the maximum frequency that the SPI interface of SAMD21 can achieve is 12MHz this is due to limitations of the Silicon.
At 12MHz a single write takes about 12ms which includes f_open f_write and f_close. I am not sure if this is the maximum speed that can be achieved at 12MHz bus speed, since I understand that the FATFS stack also consumes a portion of this time to do its stuff. Does anyone here have experience with SD card benchmarking specially with SAMD20/21 and could give me some hints as to how I can further optimise the process to reduce the time.
Thanks in advance.