Electrical – STM32F407VG SDIO read and write speed

sdiostm32f4

I am writing the on board accelerometer data to my SD card. I am using a STM32F407VG board. The data is being written and read. How can I measure or test the speed of reading and writing data to the SD card through STM32F407VG board?

Best Answer

Count the number of written blocks per second.
You can probably hook into the SDIO interrupts or driver to get an integer increment somewhere. Or it might already have this, check the documentation.
Then in the systick for example, see every 1 second how many blocks were written. And reset the integer.

Or use the producing data thread, and increment an integer each byte you write to the file stream. Then see how big this number is every 1 second, and clear it.

For example, printf and related functions often return the number of written bytes.

Related Topic