To fix the hang problem

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE by shubham c

Revision:
324:c0a5228cc666
Parent:
311:af5ab655ba00
Child:
326:e424f70b86c0
--- a/main.cpp	Sat Dec 10 12:41:58 2016 +0000
+++ b/main.cpp	Sat Dec 10 13:39:35 2016 +0000
@@ -79,13 +79,20 @@
     gCS_RTC = 1;
     gCS_ADF = 1;
     
+    
     FCTN_CDMS_INIT_RTC();/* rtc initialization*/
     FCTN_CDMS_SD_INIT();/* sd card initialization*/
     
+    CDMS_RESET_COUNTER++;
+    FCTN_CDMS_WR_FLASH(17,CDMS_RESET_COUNTER);
+    TIME_LATEST_CDSMS_RESET = FCTN_CDMS_RD_RTC() >> 7;
+    FCTN_CDMS_WR_FLASH(8,TIME_LATEST_CDSMS_RESET);
     
-    uint8_t test[512] = {0};
-    disk_write(test,8000); //to be used only just before launch
+    SD_MNG_SECT = SD_LIB_BLK_CURRENT;
+    FCTN_SD_MNG();
     
+    
+
     #if DEBUG
     gPC.puts("welcome to mng_tmtc\r\n");
     #endif