@DYann.1 wrote:
Thank you for this information, does this mean by default I am already in DMA with my STM32L5xx card ? Right ? For CubeMX I have this version
As said SDMMC is already a DMA but in sd_diskio.c / SD_read() and SD_write() there are two types of implementations with and without DMA:
HAL_SD_ReadBlocks_DMA(): with DMA
HAL_SD_ReadBlocks(): without DMA
HAL_SD_WriteBlocks_DMA(): with DMA
HAL_SD_WriteBlocks(): without DMA
Look at the implementations of SD_read() and SD_write() in the examples:
STM32L552E-EV/Applications/FatFs/FatFs_uSD_Standalone
and
STM32L552E-EV/Applications/FatFs/FatFs_uSD_DMA
Their corresponding sd_diskio.c are respectively:
1- https://github.com/STMicroelectronics/STM32CubeL5/blob/master/Projects/STM32L552E-EV/Applications/FatFs/FatFs_uSD_Standalone/FATFS/Target/sd_diskio.c
2- https://github.com/STMicroelectronics/STM32CubeL5/blob/master/Projects/STM32L552E-EV/Applications/FatFs/FatFs_uSD_DMA/FATFS/Target/sd_diskio.c
PS: in any case you need to update your CubeMx version.
To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.