Here is data from a test using a NUCLEO-F411RE.
Notice, one data point every microsecond.
I use TIM3 to trigger ADC1 a million times per second. I capture the data in 512 byte buffers in a high priority thread and write them to the SD in a lower priority thread.
I create a large contiguous file on an SD connected to SPI1. I write data to the file using a single raw SD multi-block write.
I don't use SDIO since the HAL does not have a method to do a single large multi-block write. Modern high performance SD card don't perform well unless you pipeline large writes.
Here is output from the test program:
ch> log demo.bin 1000000
Type any character to stop.
Done
ch> stats
STM32_SYSCLK 96000000, CH_CFG_ST_FREQUENCY 10000
STM32_ADCCLK 24000000
run time : 256053 msec
block write count : 1000000
min write latency : 94 usec
max write latency : 1987 usec
avg write latency : 95 usec
max used buffers : 10
total buffer count : 128
ch> ls
2016-07-04 12:34:32 4096000000 big.bin
2016-07-14 06:13:20 512000000 demo.bin
This program creates a file with one million 512 byte blocks and logs 256,000,000 sample to the file in 256 seconds.
The average time to write a block is 95 microseconds. the max time was 1,987 microseconds. Notice only 10 block buffers were used.
I also logged data from the six "Arduino analog pins" on the NUCLEO-F411RE, PA0, PA1, PA4, PB0, PC1, PC0.
I trigger ADC1 to read the six pin group 200,000 times per second. This results is 1,200,000 ADC values/sec. I connected all pins to a 10 kHz signal. Notice the skew in the plot below since it take a large fraction of a microsecond to digitize each value.
Here is output from the program:
ch> log six.bin 100000
Type any character to stop.
Done
ch> ls
2016-07-04 12:34:32 4096000000 big.bin
2016-07-14 06:13:20 512000000 demo.bin
2016-07-14 06:37:34 51200000 six.bin
ch> stats
STM32_SYSCLK 96000000, CH_CFG_ST_FREQUENCY 10000
STM32_ADCCLK 24000000
run time : 21007 msec
block write count : 100000
min write latency : 94 usec
max write latency : 1548 usec
avg write latency : 95 usec
max used buffers : 8
total buffer count : 128
ch> view six.bin
1274,1232,1199,1157,1117,1074
956,923,895,865,820,804
754,728,693,681,666,657
625,617,616,607,606,618
627,636,647,658,678,688
746,776,794,826,856,887
976,1016,1046,1088,1116,1165
1317,1341,1372,1434,1468,1516
1654,1707,1755,1810,1845,1897
2046,2094,2140,2188,2226,2280
2411,2449,2490,2529,2580,2610
2719,2751,2789,2812,2832,2868
2962,2965,2980,3009,3011,3032
3063,3061,3073,3072,3071,3074
3050,3043,3030,3023,3011,2990
2929,2909,2881,2860,2830,2799
2697,2670,2628,2588,2557,2501
2364,2348,2292,2259,2206,2159
2011,1966,1914,1873,1824,1775
1635,1586,1535,1497,1443,1396
1263,1223,1186,1145,1104,1065
958,926,896,865,845,801
711,727,695,681,668,656
626,616,615,607,606,619
625,636,646,656,679,688
744,776,795,826,856,890
976,1017,1046,1086,1128,1162
1320,1348,1375,1432,1470,1519
1656,1706,1755,1809,1846,1896
2044,2096,2137,2187,2228,2279
2405,2451,2489,2529,2582,2611
2720,2751,2792,2812,2845,2865
2962,2966,2981,3007,3010,3031
3061,3063,3071,3073,3075,3076
3051,3043,3033,3023,3012,2994
2929,2910,2882,2859,2830,2801
2696,2669,2630,2589,2550,2507
2367,2342,2294,2259,2206,2157
2011,1965,1913,1875,1826,1776
1634,1584,1535,1495,1443,1397
1263,1226,1188,1147,1102,1065
958,926,895,864,834,810
Done
ch> bin2csv six.bin six.csv
Type any character to stop
52%
Done