I am using a BF707 to write files to a micro sd card. My files a 4MB in size. My sd card clock is 50MHz and I have 4 data lines, so I should be able to write at least 5 files per second I thought. But in reality I reach only 2 files max and often I see the time increasing and I am writing only 1 fps.
I used the Analog Device rsi.c files, and the Fatfs the write in fat32 to the card.
Does any one know how I can improve the performance, or what is the reason why my performance varies som much and why is it even in best case so much lower than I had expected from a clock of 50MHz.
Hi Rene,Apologies for the delay in response. Can you please let me know whether you are using custom board or EZ-kit? Also, can you please share the SD Card part number? How are you measuring the SD card's speed? We would suggest you to test the performance by reading/writing large files. BTW, I believe the following thread might be of help.
This thread explains how the SD Card clock can be set based on the requirement.ez.analog.com/.../sd-card-clock-frequencyRegards,Lalitha S
I am sorry that I did not saw your reply earlier. I am using our own customised board.
What I found that it very dependend on the brand of the SD card. Further out of tests we noticed that at the moment I create a new folder the writing goes fast, but slows down at te moment when there are more files inside the folder.
I found on other postings (not AD or Blackfin) releated that other people have simular issues with writing files to sd cards.
Hello ,Apologies for the delay. Were you able to get going. Let me know if you are still facing any issues.Regards,Lalitha.S
Yes I have still this issue, but I am not sure if it is releated to the Blackfin. I found after testing from all kind of brands of sd cards the following:
At the moment I created a new folder on the disk, the writing goes relative fast (not as high as I would have expected with a 50MHz clock), but at an acceptable level. But at the moment more files a written to this folder to speed reduces. I can write approx 2.5 files of 4 MB per sec when a new folder is created, but this reduces (lineair) to 1.5 - 1 files/sec (dependend on brand of sd card) after 45 minutes.
What you see is the controller mcu on the sd-card getting more busy as the card get full and perhaps data start to get overwritten. How do you partition the card? Do you fill the partition or how much free space do you leave? There are info to be found about performance, wear management etc available from some SD-card and eMMC manufacturers and other sources. The performance of the controller (and the Nand itself) differs, as you have seen, a lot between brands and cards.
From blackfin side - do you transfer multiple pages / sectors at once or do you perform single sector writes? Some performance may be gained there...