working

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

Files at this revision

API Documentation at this revision

Comitter:
ee12b079
Date:
Fri Feb 05 11:58:07 2016 +0000
Parent:
105:5ce0337e7c15
Child:
114:9fb55057b13f
Commit message:
testing shreesha's code with obsrs tc and non-obsrs tc

Changed in this revision

DefinitionsAndGlobals.h Show annotated file Show diff for this revision Revisions of this file
OBSRS.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/DefinitionsAndGlobals.h	Fri Jan 29 19:27:28 2016 +0000
+++ b/DefinitionsAndGlobals.h	Fri Feb 05 11:58:07 2016 +0000
@@ -108,10 +108,10 @@
     
 // PAYLOAD or SCIENCE
     #define PAYLOAD_BUFFER_LENGTH 6723
-    #define PAY_SPI_MOSI D11
-    #define PAY_SPI_MISO D12
-    #define PAY_SPI_CLK D13
-    #define PAY_SPI_CS D10
+    #define PAY_SPI_MOSI PTE18
+    #define PAY_SPI_MISO PTE19
+    #define PAY_SPI_CLK PTE17
+    #define PAY_SPI_CS PTE16
     
     
 // ****************GLOBAL VARIABLES******************
--- a/OBSRS.h	Fri Jan 29 19:27:28 2016 +0000
+++ b/OBSRS.h	Fri Feb 05 11:58:07 2016 +0000
@@ -10,7 +10,7 @@
 
 
 #define TMID_ACK_L234 0xB
-#define T_frames_in_segment 10
+#define T_frames_in_segment 40
 
 using namespace std;
 //Serial pc(USBTX, USBRX); // tx, rx
--- a/main.cpp	Fri Jan 29 19:27:28 2016 +0000
+++ b/main.cpp	Fri Feb 05 11:58:07 2016 +0000
@@ -30,9 +30,6 @@
 //void set_sig(){gSCIENCE_THREAD->signal_set(SCIENCE_SIGNAL);}
 int main()
 {
-    #if DEBUG
-    gPC.puts("welcome to mng_tmtc\r\n");
-    #endif
     //gLEDR = 1;
     
     // ******************INITIALISATIONS START******************
@@ -59,34 +56,29 @@
     gCS_ADF = 1;
     
     //FCTN_CDMS_INIT_RTC();/* rtc initialization*/
-//    FCTN_CDMS_SD_INIT();/* sd card initialization*/
-    
-    // initialise_card();
-    // int result= initialise_card();
-    // disk_initialize();    
+    FCTN_CDMS_SD_INIT();/* sd card initialization*/
     
-    // COM_TX
-    // *********************THE TEST
-    // cs_adf=1;
-    // *********************THE TEST
-
+    #if DEBUG
+    gPC.puts("welcome to mng_tmtc\r\n");
+    #endif
+    
     // COM_MNG_TMTC THREAD
     gCOM_MNG_TMTC_THREAD = new Thread(COM_MNG_TMTC_FUN);
     gCOM_MNG_TMTC_THREAD->set_priority(osPriorityAboveNormal);
     #if DEBUG
     gPC.puts("allocating threads\r\n");
     #endif
-//    gSCIENCE_THREAD = new Thread(SCIENCE_FUN);
+    gSCIENCE_THREAD = new Thread(SCIENCE_FUN);
    // gPC.puts("step one complete\r\n");
-//    gSCIENCE_THREAD->set_priority(osPriorityBelowNormal);
+    gSCIENCE_THREAD->set_priority(osPriorityBelowNormal);
     #if DEBUG
     gPC.puts("competed allocating threads\r\n");
     #endif
     
     // *******************INITIALISATIONS END********************
     
-    RtosTimer gCDMS_HK_TIMER(FCTN_CDMS_HK_MAIN, osTimerPeriodic);
-    gCDMS_HK_TIMER.start(5000);
+    //RtosTimer gCDMS_HK_TIMER(FCTN_CDMS_HK_MAIN, osTimerPeriodic);
+    //gCDMS_HK_TIMER.start(5000);
     
     /*starting the thread with signal*/
 //    set_sig();