AnsweredAssumed Answered

High performance SDIO/SDMMC driver using DMA for FreeRTOS - anyone?

Question asked by David Harrison on Mar 3, 2017
Latest reply on Mar 22, 2017 by Alvarez.German

Hi, has anyone written a high performance STM32F4/F7 SDIO/SDMMC driver using DMA for FreeRTOS?


I am currently converting my complex audio application from bare metal to run on freeRTOS but am still faced with STM's poor implementation of their SDMMC driver which, although using DMA, blocks until the DMA transfer is complete. They have not thought through that driver very well as it really gives no better performance than a polling method since the transfer rate is dictated by the SD card bus speed, not by the CPU/memory access speed.


The mid-level functions disk_read/disk_write and the higher level FATFS f_read/f_write which call the SDMMC driver to read/write blocks of data are expecting sequential file access reads/writes. Surely this problem must have been solved by someone before now. I am new to RTOS of any kind and don't want to have to write a decent SDMMC driver for FreeRTOS, when STM should have done a decent job in the first place.

Has anyone already got a working DMA based SDMMC card driver (for STM32F4/F7) that works efficiently with FreeRTOS?