Repository for CDMS code

Dependencies:   SimpleDMA mbed-rtos mbed eeprom

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

Files at this revision

API Documentation at this revision

Comitter:
ee12b079
Date:
Mon Apr 18 12:18:53 2016 +0000
Parent:
162:48fda0b8d573
Child:
165:60a4a23131a3
Child:
170:286ef9dad36a
Commit message:
Working Code : OBSRS and MMS cheked with GS using actual CDMS Hardware

Changed in this revision

COM_MNG_TMTC.h Show annotated file Show diff for this revision Revisions of this file
DefinitionsAndGlobals.h Show annotated file Show diff for this revision Revisions of this file
ThreadsAndFunctions.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/COM_MNG_TMTC.h	Thu Apr 14 04:34:58 2016 +0000
+++ b/COM_MNG_TMTC.h	Mon Apr 18 12:18:53 2016 +0000
@@ -177,6 +177,11 @@
         testTC = testTC->next_TC;\
         ++overflowCount;\
     }\
+    if(returnHere == 0xFF)\
+    {\
+        uint16_t temp = TC_STATE_SUCCESSFULLY_EXECUTED;\
+        PUTexec_status(testTC,temp);\
+    }\
 }
 
 /*
--- a/DefinitionsAndGlobals.h	Thu Apr 14 04:34:58 2016 +0000
+++ b/DefinitionsAndGlobals.h	Mon Apr 18 12:18:53 2016 +0000
@@ -1,14 +1,14 @@
 // **************DEFINITIONS*********************
 
-#define bypass_adf 1
+#define bypass_adf 0
 
 // COM_RX
     #define RX_TIMEOUT_LIMIT 0.5
-    //#define COM_RX_UART_TX PTE20    // For bypassing RX1M (SET BAUD RATE 1200) #define COM_RX_UART_TX USBTX
-    //#define COM_RX_UART_RX PTE21    // For bypassing RX1M (SET BAUD RATE 1200) #define COM_RX_UART_RX USBRX
+    #define COM_RX_UART_TX PTE20    // For bypassing RX1M (SET BAUD RATE 1200) #define COM_RX_UART_TX USBTX
+    #define COM_RX_UART_RX PTE21    // For bypassing RX1M (SET BAUD RATE 1200) #define COM_RX_UART_RX USBRX
     
-    #define COM_RX_UART_TX USBTX
-    #define COM_RX_UART_RX USBRX
+    //#define COM_RX_UART_TX USBTX
+    //#define COM_RX_UART_RX USBRX
     
 // COMMON SPI
     #define SPI_MOSI PTE1
--- a/ThreadsAndFunctions.h	Thu Apr 14 04:34:58 2016 +0000
+++ b/ThreadsAndFunctions.h	Mon Apr 18 12:18:53 2016 +0000
@@ -104,6 +104,7 @@
         }
         else if( gFLAGS & NEW_TC_RECEIVED ){
             gPC.puts("NEW TC RECEIVED\r\n");
+            Thread::wait(10000);
             gFLAGS = gFLAGS & (~NEW_TC_RECEIVED);
             gFLAGS = gFLAGS | COM_MNG_TMTC_RUNNING_FLAG;
 
@@ -146,7 +147,7 @@
 //                                DEBUF_PRINT("EXECUTING TELECOMMANDS\r\n");
                                 EXECUTE_OBOSC_ONLY;
                                 EXECUTE_TC;
-                                /*gPC.puts("COMPLETED EXECUTION\r\n");*/
+                                gPC.puts("COMPLETED EXECUTION\r\n");
                             }
                             else{
                                 gFLAGS = gFLAGS | COM_PA_HOT_FLAG;
@@ -169,7 +170,7 @@
                         }
                     }
                     else{
-                        //gPC.puts("tc list is not complete\r\n");
+                        gPC.puts("tc list is not complete\r\n");
                         if(tempContinue & 0x01){
                             //gPC.puts("last packet bit not found\r\n");
                         }
@@ -210,7 +211,7 @@
                 }
             }
             else{
-                /*gPC.puts("No valid TC received\r\n");*/
+                gPC.puts("No valid TC received\r\n");
                 RX1M.attach(&rx_read, Serial::RxIrq);
                 gFLAGS = gFLAGS & (~COM_MNG_TMTC_RUNNING_FLAG);
                 reset_all;
--- a/main.cpp	Thu Apr 14 04:34:58 2016 +0000
+++ b/main.cpp	Mon Apr 18 12:18:53 2016 +0000
@@ -53,7 +53,7 @@
     
     // DEBUG
     //gPC.puts("welcome to mng_tm_tc\r\n");
-    gPC.baud(115200);
+    gPC.baud(1200);
     
     // COMMON SPI
     spi.format(8,0);