Repository for CDMS code

Dependencies:   SimpleDMA mbed-rtos mbed eeprom

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

Revision:
342:77b0d59897f7
Parent:
338:d63eb331a67d
Child:
346:204497974293
--- a/CDMS_HK.h	Mon Jan 02 14:21:44 2017 +0000
+++ b/CDMS_HK.h	Thu Jan 05 17:38:21 2017 +0000
@@ -48,18 +48,22 @@
     uint8_t sd_stat = 0;
     uint8_t hk_count=0;
     while(1) {
+        gPC.printf("waiting for HK sig\n\r");
         gHK_THREAD->signal_wait(HK_SIGNAL);
+        gPC.printf("checking mutex in HK\n\r");
         gMutex.lock();
+        gPC.printf("locked mutex, entered in HK \n\r");
         if(hk_count == 1 || hk_count == 2) {
             FCTN_CDMS_PL_MAIN((void const *)NULL);
             hk_count--;
+            gPC.printf("releasing mutex for HK_PL \n\r");
             gMutex.unlock();
             continue;
         } else if(hk_count == 0) {
             FCTN_CDMS_PL_MAIN((void const *)NULL);
             hk_count = 2;
         }
-        //  gPC.printf("\n\rEntering HK thread\n");
+          
         //gPC.printf("\n\r%d\n",CDMS_WR_SD_FAULT_COUNTER);
         if(EN_CDMS_HK == 0x00)
             continue;
@@ -244,6 +248,7 @@
         } else
             gPC.printf("long Bcn not sent\r\n");
         //gPC.printf("\rCompleted Beacon\n");
+        gPC.printf("\rreleasing mutex for HK_MAIN \n\r");
         gMutex.unlock();
     }
 }