I have done some extensive benchmarking of the SD interface on a LPC1778 and found some intersting things.
First of all the specs:
- crystal: 12 Mhz
- CPU clock 96 MHz (set to be able to come as close as possible to 50 MHz for the SD card (96/2 = 48 MHz)
- SD card: Apacer industrial SD SLC chips memory 4 GB
I have done both RAW multi-sector writes (64x512 bytes at a time) and FAT32 (Chan FatFs) writes.
First I see that when I do writes on the start of the card's adresses (sector 0) during RAW writes I get a considerable lower speed than at an offset of say 1 GB. The results are for 1 MB writes 2.81 MB/s vs 14.96 MB/s. This is with a bus speed off 48 Mhz.
But this is the problem. I can not do any FAT writes on this bus speed. Things go wrong when checking the FAT table during opening of a new file. All goes well at a 20 MHz bus speed.
Anyone seen this before?
BTW speeds are comparable at 20 MHz for RAW vs FAT writes (multi-sector writes, cluster aligned, and writing 1MB or more at a time).