cancel
Showing results for 
Search instead for 
Did you mean: 

SDIO multiple block write

DSun
Associate

Hello,

I'm working with SDIO to write data to a sd card and I'm using DMA.

The basic process of my project is :

1.Get 512 bytes data from an external ADC

2.Write it into a SD card

3.Repeat

I want to use the multiple block write mode, but everytime just send 1 block data, so I don't need to send the single blcok write command each time.

I'm struggled with this for a long time , does anyone have any suggestion?

After implementing HAL_DMA_Start_IT(), the dma modle doesn't start sending data to FIFO, it will only be triggered after DPSM is re-enabled. Is my understanding right?

Many thanks,

Frank

2 REPLIES 2

Large aligned writes through FatFS will pass to DISKIO layer as cluster size writes.

Have a 32KB spill buffer, and flush to card whenever full, or at completion.

ST has SDIO/SDMMC code supporting multiple block read/write.

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

Thanks for response, but I don't want to use FatFs. I noticed this function "HAL_SD_WriteBlocks_DMA", but every time it will do lots of initialization.

I was thinkg I send write multiple blocks command to sd card, and everytime just reenable dma and dpsm, but I failed. Any suggestion?