cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 SD Card maximum writing rate

ARA_electronics
Associate II

Hi Everyone,

I use SDMMC on my STM32H7 to write data on SD Card. I have several question :

- for now I can't reach better rates than 12Mo/s writing, using 32Ko buffers and with the stm32 doing only that. Is that normal? I think I should reach the 25Mo/s announced by the High Speed Sd Card mode.

- when the stm32 is running normally, I can't reach better rates than 7.5Mo/s in High Speed SD Card mode. Once again, is it a normal rate or could I do better ?

- Those rates are in high speed mode in 3.3V. Should I consider to use a level shifter to write in 1.8V with SDR50 or SDR104 ? 

Thank you very much !

1 ACCEPTED SOLUTION

Accepted Solutions

MicroSD and SDHC cards should be able to sustain 50 MHz wire speeds, and 25 MBps ceiling that would provide for.

It's mostly going to come down the ability to absorb the data, and manage the >128KB erase block sizes.

FATFS isn't going to write blocks >32KB, and not going to preallocate. Beyond the transfer modes, there's likely commands/methods in the specs to optimize streaming throughput. Can't say I've looked at that, nor is it implemented anywhere in ST's stacks. The eMMC from certain vendor scan take a block count/length on write that make a significant difference. Seen 27 MBps Writes on 50 MHz 8-bit DDR (104 MBps capable mode), so the bottlenecking is not the availability of data to write.

The cards you use are going to be the easiest thing to change / optimize.

The make, model and specific part# will be important.

The H7-EVAL boards have transceivers if you want to experiment with the lower voltage / exotic modes, but the clocking speed of the SDMMC, and pin speeds are likely to fit the limits before the protocols of the cards.

Some of the H7-DISCO have eMMC part, but they are not fast parts. Pity they didn't use high density sockets like ODROID, et al so some Kingston or SanDisk/WesternDigitial could be benchmarked.

To get high speeds you're going to have to be very selective on parts and wiring.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

1 REPLY 1

MicroSD and SDHC cards should be able to sustain 50 MHz wire speeds, and 25 MBps ceiling that would provide for.

It's mostly going to come down the ability to absorb the data, and manage the >128KB erase block sizes.

FATFS isn't going to write blocks >32KB, and not going to preallocate. Beyond the transfer modes, there's likely commands/methods in the specs to optimize streaming throughput. Can't say I've looked at that, nor is it implemented anywhere in ST's stacks. The eMMC from certain vendor scan take a block count/length on write that make a significant difference. Seen 27 MBps Writes on 50 MHz 8-bit DDR (104 MBps capable mode), so the bottlenecking is not the availability of data to write.

The cards you use are going to be the easiest thing to change / optimize.

The make, model and specific part# will be important.

The H7-EVAL boards have transceivers if you want to experiment with the lower voltage / exotic modes, but the clocking speed of the SDMMC, and pin speeds are likely to fit the limits before the protocols of the cards.

Some of the H7-DISCO have eMMC part, but they are not fast parts. Pity they didn't use high density sockets like ODROID, et al so some Kingston or SanDisk/WesternDigitial could be benchmarked.

To get high speeds you're going to have to be very selective on parts and wiring.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..