To fix the hang problem

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE by shubham c

Revision:
262:752c8689944a
Parent:
261:1e54415b34d3
Child:
263:3b872778b8c7
--- a/main.cpp	Thu Jul 14 13:07:30 2016 +0000
+++ b/main.cpp	Thu Jul 14 17:57:05 2016 +0000
@@ -9,7 +9,7 @@
 #include "dmaSPIslave.h"
 #include "rtos.h"
 #include "mbed_debug.h"
-
+void rx_read();
 #include "Structures.h"
 #include "pinconfig.h"
 #include "DefinitionsAndGlobals.h"
@@ -22,7 +22,6 @@
 #include "common_functions.h"
 #include "RESET_functions.h"
 #include "CDMS_HK.h"
-#include "OBSRS.h"
 #include "adf.h"
 #include "COM_RCV_TC.h"
 #include "Flash.h"
@@ -30,9 +29,9 @@
 #include "FMS_all.h"
 #include "Compression.h"
 #include "COM_MNG_TMTC.h"
+#include "COM_POWER_OFF_TX.h"
 #include "COM_POWER_ON_TX.h"
-#include "COM_POWER_OFF_TX.h"
-
+#include "OBSRS.h"
 #include "ThreadsAndFunctions.h"
 #include "TEST_PL.h"
 
@@ -187,6 +186,9 @@
     HK_counter = new RtosTimer(hk_isr, osTimerPeriodic,(void * )NULL);
     HK_counter->start(10000);
     
+    sys_reset_cdms_timer = new RtosTimer(sys_pwr_reset, osTimerPeriodic, (void * )NULL);
+    sys_reset_cdms_timer->start(cdms_reset_timeout);
+
     /*PL_wo_dma = new RtosTimer(payload_isr_fun_dma, osTimerPeriodic,(void * )NULL);
     PL_wo_dma->start(6000);*/
     //gSCIENCE_THREAD->signal_set(SCIENCE_SIGNAL);