Repository for CDMS code

Dependencies:   SimpleDMA mbed-rtos mbed eeprom

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

Revision:
206:fba4aeebf004
Parent:
187:2c7263530c57
Child:
207:28a07943dded
--- a/main.cpp	Wed Jun 29 14:17:34 2016 +0000
+++ b/main.cpp	Thu Jun 30 14:00:33 2016 +0000
@@ -19,7 +19,7 @@
 #include "COM_SND_TM.h"
 #include "cdms_sd.h"
 #include "common_functions.h"
-//#include "CDMS_HK.h"
+#include "CDMS_HK.h"
 #include "OBSRS.h"
 #include "adf.h"
 #include "COM_RCV_TC.h"
@@ -29,8 +29,6 @@
 #include "Compression.h"
 #include "ThreadsAndFunctions.h"
 
-DigitalOut SD_SW_EN_DS (PIN97);
-
 //void set_sig(){gSCIENCE_THREAD->signal_set(SCIENCE_SIGNAL);}
 int main()
 {
@@ -58,25 +56,7 @@
     gCS_ADF = 1;
     
     FCTN_CDMS_INIT_RTC(); /* rtc initialization*/
-    FCTN_CDMS_SD_INIT(); /*sd card initialization*/
-    uint8_t test[512];
-    uint8_t data[512];
-    for(int i=0;i<512;i++)
-        data[i] = i%100;
-    for(int i=0;i<512;i++)
-        test[i] = 1;
-    disk_write(test,7000);
-    disk_read(test,7000);
-    uint32_t fsc = FCTN_SD_MNGR(3);
-    if(SD_WRITE(data,fsc,3) == 0)
-    {
-        SD_READ(test,fsc,3);
-        for(int i=0;i<15;i++)
-        {
-            gPC.printf("\r0x%02X 0x%02X\n",data[i],test[i]);
-        }
-    }
-    
+    FCTN_CDMS_SD_INIT(); /*sd card initialization*/    
     
     if (DEBUG)
         gPC.puts("\rwelcome to mng_22tmtc\r\n");
@@ -90,6 +70,7 @@
     gSCIENCE_THREAD = new Thread(SCIENCE_FUN);
    // gPC.puts("step one complete\r\n");
     gSCIENCE_THREAD->set_priority(osPriorityBelowNormal);
+    gHK_THREAD = new Thread(HK_);
     if (DEBUG)
         gPC.puts("competed allocating threads\r\n");