SDFileSystem for STM32F746NG DISCOVERY with 4bit SDMMC interface on fixed pins
Dependents: DISCO-F746NG_SDFileSystem uzairkhan DISCO-F746NG_Scope_copy
Fork of SDFileSystem by
Diff: SDFileSystem.cpp
- Revision:
- 26:8f15aa3b052b
- Parent:
- 25:391eade4ef85
- Child:
- 27:8d192c180436
--- a/SDFileSystem.cpp Tue Apr 12 18:16:24 2016 +0000 +++ b/SDFileSystem.cpp Wed Apr 13 08:51:27 2016 +0000 @@ -204,6 +204,7 @@ //Read a single block, or multiple blocks if (count > 1) { BSP_SD_Set_RX_Busy(); + SCB_InvalidateDCache_by_Addr((uint32_t *)buffer,(512*count)); retval=BSP_SD_ReadBlocks_DMA((uint32_t *)buffer, (uint64_t) (sector * 512),512, count); while((BSP_SD_Get_RX_Busy()==1)&&(retval==MSD_OK)){;} CPU_CACHE_Flush((uint32_t *)buffer,(512*count)); @@ -211,6 +212,7 @@ return (retval ? RES_ERROR : RES_OK); } else { BSP_SD_Set_RX_Busy(); + SCB_InvalidateDCache_by_Addr((uint32_t *)buffer,(512)); retval= BSP_SD_ReadBlocks_DMA((uint32_t *)buffer, (uint64_t) (sector * 512), 512, 1); while((BSP_SD_Get_RX_Busy()==1)&&(retval==MSD_OK)){;} CPU_CACHE_Flush((uint32_t *)buffer,(512));