To fix the hang problem

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE by shubham c

Files at this revision

API Documentation at this revision

Comitter:
samp1234
Date:
Tue Jan 17 06:19:27 2017 +0000
Parent:
344:2517c9f6bb4f
Commit message:
Changes include PL GPIO control during COM thread, SD card writing in science thread, Re-init HK Timer in alternate science thread to synchronise ISR.

Changed in this revision

CDMS_HK.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
--- a/CDMS_HK.h	Fri Jan 13 08:06:43 2017 +0000
+++ b/CDMS_HK.h	Tue Jan 17 06:19:27 2017 +0000
@@ -59,7 +59,7 @@
             hk_count--;
             gPC.printf("releasing mutex for HK_PL \n\r");
            SCI_LED1 =0;
-           PL_GPIO_1_STATUS=1;
+           PL_GPIO_1_STATUS=0;
             gMutex.unlock();
             continue;
         } else if(hk_count == 0) {
@@ -646,5 +646,5 @@
     for(int i = 0; i<4; i++)
         CDMS_RAM[79+i] = FSC_OLD[5] >> (3-i)*8;
     CDMS_RAM[83] = 0x00;
-    gPC.printf("\n\r%d %d %d %d %d",FSC_CURRENT[1],FSC_CURRENT[2],FSC_CURRENT[3],FSC_CURRENT[4],FSC_CURRENT[5]);
+    gPC.printf("\n\r%u %u %u %u %u",FSC_CURRENT[1],FSC_CURRENT[2],FSC_CURRENT[3],FSC_CURRENT[4],FSC_CURRENT[5]);
 }
\ No newline at end of file
--- a/DefinitionsAndGlobals.h	Fri Jan 13 08:06:43 2017 +0000
+++ b/DefinitionsAndGlobals.h	Tue Jan 17 06:19:27 2017 +0000
@@ -39,7 +39,7 @@
     #define SBC 1
     
     #if SBC
-    DigitalOut CDMS_I2C_GPIO(PIN67,0);
+    DigitalOut CDMS_I2C_GPIO(PIN67,1);
     DigitalIn BAE_I2C_GPIO(PIN1);
     #endif
     
--- a/ThreadsAndFunctions.h	Fri Jan 13 08:06:43 2017 +0000
+++ b/ThreadsAndFunctions.h	Tue Jan 17 06:19:27 2017 +0000
@@ -194,7 +194,7 @@
                 // DISABLE THREADS
                 HK_counter->stop();
                 gPAY_SPI->bulkRead_pause();
-                 PL_GPIO_1_STATUS=0;
+                 PL_GPIO_1_STATUS=1;
                 gFLAGS = gFLAGS | COM_SESSION_FLAG;
                 gSESSION_TIMEOUT.attach(&after_session, COM_SESSION_TIMEOUT);
                 gFLAGS = gFLAGS | COM_RX_FLAG;