12-17-2019 10:43 AM
I have an application that writes a lot of data to an SD card. How can I check the write speed to see what current performance is? Is there anything I can do (settings/configurations) to make it faster it needed?
I am using the built-in xilffs from the SDK BSP. Is there a 3rd party package (like the one from elm-chan.org) that can be integrated and provide better throughput?
12-17-2019 07:14 PM
email@example.com , I assume you are refering to either the Zynq or Ultrascale+ SD/MMC. If so, then the throughput depends on a few factors:
1 - the number of contiguous sectors read or written in a "one shot". A single sector transfer will suffer from the set-up overhead and it's quite substantial, no matter the driver as there are a few commands to send to the card.
2 - All transfers are performed through DMA, so ignoring the set-up overhead, the throuput is in fact limited by the SD/MMC interface frequency - the DMA does guarantee all transfers will be done as needed, and the transfer size can be very very large - rhe controller is using a chain of DMA descriptors and it supports up to 65535 descriptors in the chain.
3 - When writing, the card itself is the main "bottleneck" because it has to erase the sector, write and check if it has been succesfully programmed (as for all flash programing, it may take a few iterations of program-check). Plus if the transfer is not the size of a physical sector, it's even longer (all SD/MMC support sectors of 512 bytes but their physical sector may be larger than 512). And some card manufacturers have very fast cards when others are extremely slow - I found the card itself is the most important thing limiting the throughput.
To check the write speed, you;ll have to instrument your code to check the time elapsed form requesting the write and when it's done.
As al alternate to to Xilinx BSP, you can get our BSP for the Zynq and Ultrascale+ (it's our own SD/MMC driver) in the freeware section of:
One of the demo (demo #9) allows you to perform throuput measurements, specifying the chunk size to read/write and the total number of bytes to read/write.
12-18-2019 08:27 AM
Thank-you for this info! We'll check out the website you mentioned and double check the settings of our SD/MMC. Yes, we are using a Zynq 7000 SoC. Specifically, I'm doing testing on a Zybo Z7.