2021-03-22 01:02 PM
Hello,
In my application, I want to implement the SDcard write funcitonality using SDIO+DMA in STM32f103RGT6 processor. I could able to perform SDcard read functionality but the write does not work. Does anybody have any samply code or reference would be really helpful to me.
Thanks in advance.
2021-03-22 01:25 PM
STM32Cube_FW_F1_V1.8.2\Drivers\BSP\STM3210E_EVAL\stm3210e_eval_sd.c
STM32Cube_FW_F1_V1.8.2\Projects\STM3210E_EVAL\Applications\FatFs\FatFs_uSD\readme.txt
2021-03-22 01:59 PM
Hello,
Thank you so much for your reply. I forgot to mention that I have Freertos also in my project. Do you have any refenrence to any with SDIO+DMA+FREERTOS with Read and write for STM32F103R processor ?
2021-03-22 02:06 PM
I do not, I moved beyond the F1 parts a decade ago, and predominantly used the SPL with them at that time.
FatFs doesn't have the RTOS/DMA template drivers (diskio) for the F1, but things like the F4 do, perhaps you can draw inspiration from them?
STM32Cube_FW_F4_V1.24.1\Middlewares\Third_Party\FatFs\src\drivers\sd_diskio_dma_rtos_template.c
2023-08-07 04:54 AM
I'm having the same issue. I'm trying to use sdcard on stm32f103RE with dma. the read works. but the write doesn't work.
when I tried to see what's happening, I could see that after it sets up the write to sdio with dma, the dma transfer complete gets called and in the SD_DMATransmitCplt call back it only enables the dataend interrupt. which I assume that it's going to wait until the last byte (word) of the data from sdio's fifo is shifted out, then the actual sd transfer complete call back should happen in sdio interrupt. however, sdio interrupt never happens.
Has anyone actually get stm32f1 sdio working with dma?