cancel
Showing results for 
Search instead for 
Did you mean: 

Why SDIO needs about 3ms on transferring only 512Bytes

Yang Yang
Associate II

Hello, ST experts

STM32F415RGT6 is used on custom board. Everything looks fine except that SDIO opertions.

f_write function is called at an interval about 500ms to write 512Bytes to SD card. SDIO_CLK is 24MHz, 4bit bus wide. I really don't know why there are activities lasting 3ms on sdio_cmd pin.

Best Regards

Yang

1 ACCEPTED SOLUTION

Accepted Solutions

Haven't timed it, but single sector writing is very inefficient, there is a lot of command overhead, blocks on the media are typically around 128KB. If your writes aren't aligned FatFs will need to read and write several sectors.​

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

Haven't timed it, but single sector writing is very inefficient, there is a lot of command overhead, blocks on the media are typically around 128KB. If your writes aren't aligned FatFs will need to read and write several sectors.​

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