Skip to content

SDIO library(C and C++) - #3139

Open
VitorBoss wants to merge 4 commits into
stm32duino:mainfrom
VitorBoss:sdio_library
Open

VitorBoss wants to merge 4 commits into
stm32duino:mainfrom
VitorBoss:sdio_library

Conversation

@VitorBoss

@VitorBoss VitorBoss commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR implements a common mode to use SDIO/SDMMC on Arduino projects

I have a project that need asyncfatfs and very high speed R/W, instead of writing multiple HAL layers inside the IO driver, I started this 2 years ago(wasn't a priority), now I had some AI help to fix my issues and build documentation for it.

It have a detection pin support and callback when pins level changes. It supports DMA transfers and can enabled(or not) at begin(), use begin(true) to enable DMA

Tested on WeAct SMT32F446RE, Black_F407VE and WeACT STM32H562RG boards. I got 4200KB/sec R/W on F446 at 48MHz on a 64GiB exFAT card.
Benchmarks are on my asyncfatfs repo.

It have 2 examples, a board validation one and a DMA sector read.

This is a log of the benchmark I built to test it on F446RE(using SDIO and DMA):

Write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
4291.13,10218,93,476
4304.06,10138,93,474

Read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
4090.97,2098,95,284
4094.32,695,95,284

This is a log of the benchmark I built to test it on H562RG(using SDIO and IDMA):

Write speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
3913.24,10019,148,522
3913.24,9983,148,522

Read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
3242.00,1801,151,320
3244.11,700,150,319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant