SDFileSystem for STM32F746NG DISCOVERY with 4bit SDMMC interface on fixed pins

Dependencies:   FATFileSystem

Dependents:   DISCO-F746NG_SDFileSystem uzairkhan DISCO-F746NG_Scope_copy

Fork of SDFileSystem by Neil Thiessen

Files at this revision

API Documentation at this revision

Comitter:
DieterGraef
Date:
Tue Apr 12 18:16:24 2016 +0000
Parent:
24:698affe9560c
Child:
26:8f15aa3b052b
Commit message:
Solving cache issues.

Changed in this revision

SDFileSystem.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/SDFileSystem.cpp	Tue Apr 12 13:47:47 2016 +0000
+++ b/SDFileSystem.cpp	Tue Apr 12 18:16:24 2016 +0000
@@ -197,6 +197,8 @@
     //Make sure the card is initialized before proceeding
     if (m_Status & STA_NOINIT)
         return RES_NOTRDY;
+    __DSB();
+    __ISB();
     while(BSP_SD_Get_Busy()==1){;}
     BSP_SD_Set_Busy();
     //Read a single block, or multiple blocks
@@ -223,6 +225,8 @@
     //Make sure the card is initialized before proceeding
     if (m_Status & STA_NOINIT)
         return RES_NOTRDY;
+    __DSB();
+    __ISB();
     while(BSP_SD_Get_Busy()==1){;}
     BSP_SD_Set_Busy();
     //Make sure the card isn't write protected before proceeding
@@ -253,6 +257,8 @@
 int SDFileSystem::disk_sync()
 {
     //Select the card so we're forced to wait for the end of any internal write processes
+    __DSB();
+    __ISB();
     while(BSP_SD_Get_Busy()==1){;}
     BSP_SD_Set_Busy();
     while(BSP_SD_GetStatus()==SD_TRANSFER_BUSY){;}
@@ -272,6 +278,8 @@
     //Make sure the card is initialized before proceeding
     if (m_Status & STA_NOINIT)
         return 0;
+    __DSB();
+    __ISB();
     while(BSP_SD_Get_Busy()==1){;}
     BSP_SD_Set_Busy();
     BSP_SD_GetCardInfo(&m_CardInfo);