2018-11-05 06:23 AM
Solved! Go to Solution.
2018-11-05 07:12 AM
>>How can i calculate the speed of microcontroller at what speed it can load data..
The machine is synchronous, all the clocks have defined ratios to each other.
You can time transfers, like using a stop-watch in real life, to see how long it takes to write blocks of X length. Measure operations over multiple micro or milli-seconds. Use a free running TIM to provide a counter, giving you elapsed time.
FATFS is only needed if you want a file system. You can use memories without that, but it will make interchange difficult. ie If you want to be able to stick a card into a Windows PC it better have a recognized file system, otherwise you have to write apps and drivers, which I don't suspect you know how to do.
Expect SPI / 1-bit mode to be at least 4x slower than SDIO / 4-bit, and likely significantly worse.
There is an AdaFruit SD library in the BSP supporting SPI mode.
>>Does the speed depend on coding like using f_write and f_printf or does the speed depend on clock speed( HSI) we provide ?
It is going to depend on multiple variables, clocking the interface is one, the other is the size and alignment of the data being written. Writing small blobs of data requires a lot of interactions, and will be SLOW, writing ONE sector to the media will also have significant command/response overhead, which can be decimated by writing larger groups of sectors.
>>where can i get this information?
One can infer ceilings using simple math, and try simple experiments.
2018-11-05 07:12 AM
>>How can i calculate the speed of microcontroller at what speed it can load data..
The machine is synchronous, all the clocks have defined ratios to each other.
You can time transfers, like using a stop-watch in real life, to see how long it takes to write blocks of X length. Measure operations over multiple micro or milli-seconds. Use a free running TIM to provide a counter, giving you elapsed time.
FATFS is only needed if you want a file system. You can use memories without that, but it will make interchange difficult. ie If you want to be able to stick a card into a Windows PC it better have a recognized file system, otherwise you have to write apps and drivers, which I don't suspect you know how to do.
Expect SPI / 1-bit mode to be at least 4x slower than SDIO / 4-bit, and likely significantly worse.
There is an AdaFruit SD library in the BSP supporting SPI mode.
>>Does the speed depend on coding like using f_write and f_printf or does the speed depend on clock speed( HSI) we provide ?
It is going to depend on multiple variables, clocking the interface is one, the other is the size and alignment of the data being written. Writing small blobs of data requires a lot of interactions, and will be SLOW, writing ONE sector to the media will also have significant command/response overhead, which can be decimated by writing larger groups of sectors.
>>where can i get this information?
One can infer ceilings using simple math, and try simple experiments.
2021-08-22 05:54 AM
Thanks for the detailed answer.