Repository for CDMS code

Dependencies:   SimpleDMA mbed-rtos mbed eeprom

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

Revision:
289:9bd62b69874c
Parent:
287:a387337491f7
Child:
297:7cc868888d56
Child:
301:701ac67649b7
diff -r aa93d6652381 -r 9bd62b69874c FMS_all.h
--- a/FMS_all.h	Fri Aug 05 17:13:23 2016 +0000
+++ b/FMS_all.h	Sat Aug 06 06:34:38 2016 +0000
@@ -3,7 +3,6 @@
 
 /*===================================================FMS Functions=================================================*/
 
-void STANDBY_PRCS();
 
 //Run processes
 void P_PL_INIT();
@@ -48,11 +47,6 @@
     SYS_PWR_RESET();
 }
 
-void STANDBY_PRCS()
-{
-    
-}
-
 void P_PL_INIT()
 {
     
@@ -85,18 +79,16 @@
 
 void CDMS_SD_SW_ON()
 {
-    SD_SW_EN_DS = 0;
+    SD_SW_EN_DS = 1;
     SD_STATUS = DEVICE_POWERED;
-    CDMS_SD_SW_STATUS = DEVICE_POWERED;
     FCTN_CDMS_WR_FLASH(2,DEVICE_POWERED);
     gPC.printf("sw on sd\n");
 }
 
 void CDMS_SD_SW_OFF()
 {
-    SD_SW_EN_DS = 1;
+    SD_SW_EN_DS = 0;
     SD_STATUS = DEVICE_DISABLED;
-    CDMS_SD_SW_STATUS = DEVICE_DISABLED;
     FCTN_CDMS_WR_FLASH(2,DEVICE_DISABLED);
     gPC.printf("sw off sd\n");
 }
@@ -126,18 +118,16 @@
 
 void SW_ON_BAE()
 {
-    BAE_SW_EN_DS = 0;
+    BAE_SW_EN_DS = 1;
     BAE_STATUS = DEVICE_POWERED;
-    BAE_SW_STATUS = DEVICE_POWERED;
     FCTN_CDMS_WR_FLASH(1,DEVICE_POWERED);
     gPC.printf("sw on bae\n");
 }
 
 void SW_OFF_BAE()
 {
-    BAE_SW_EN_DS = 1;
+    BAE_SW_EN_DS = 0;
     BAE_STATUS = DEVICE_DISABLED;
-    BAE_SW_STATUS = DEVICE_DISABLED;
     FCTN_CDMS_WR_FLASH(1,DEVICE_DISABLED);
     gPC.printf("sw off bae\n");
 }
@@ -152,7 +142,6 @@
     PYLD_DFF_CLK = 0;
     wait_us(1);
     PL_STATUS = DEVICE_POWERED;
-    PL_BEE_SW_STATUS = DEVICE_POWERED;
     FCTN_CDMS_WR_FLASH(3,DEVICE_POWERED);
 }
 
@@ -166,7 +155,6 @@
     PYLD_DFF_CLK = 0;
     wait_us(1);
     PL_STATUS = DEVICE_DISABLED;
-    PL_BEE_SW_STATUS = DEVICE_DISABLED;
     FCTN_CDMS_WR_FLASH(3,DEVICE_DISABLED);
 }
 
@@ -212,39 +200,45 @@
 
 void RST_SD()
 {
-    SD_SW_EN_DS = 1;
+    SD_SW_EN_DS = 0;
     wait_ms(10);
-    SD_SW_EN_DS = 0;
+    SD_SW_EN_DS = 1;
+    SD_STATUS = DEVICE_POWERED;
+    FCTN_CDMS_WR_FLASH(2,DEVICE_POWERED);
     gPC.printf("rst sd\n");
 }
 
 void SW_RST_BAE()
 {
-    BAE_SW_EN_DS = 1;
+    BAE_SW_EN_DS = 0;
     wait_ms(10);
-    BAE_SW_EN_DS = 0;
+    BAE_SW_EN_DS = 1;
+    BAE_STATUS = DEVICE_POWERED;
+    FCTN_CDMS_WR_FLASH(1,DEVICE_POWERED);
     gPC.printf("rst bae\n");
 }
 
 void SW_RST_PL_BEE()
 {
-    PYLD_DFF = 1;
+    PYLD_DFF = 0;
     wait_ms(10);
-    PYLD_DFF = 0;
+    PYLD_DFF = 1;
+    PL_STATUS = DEVICE_POWERED;
+    FCTN_CDMS_WR_FLASH(3,DEVICE_POWERED);
 }
 
 void RST_BAE()
 {
-    RESET_TO_BAE = 1;
+    RESET_TO_BAE = 0;
     wait_ms(10);
-    RESET_TO_BAE = 0;
+    RESET_TO_BAE = 1;
 }
 
 void RST_PL_BEE()
 {
-    RESET_TO_PYLD = 1;
+    RESET_TO_PYLD = 0;
     wait_ms(10);
-    RESET_TO_PYLD = 0;
+    RESET_TO_PYLD = 1;
 }
 
 void CDMS_INTERNAL_RESET()
@@ -346,6 +340,4 @@
 {
     for(int i=4;i<132;i++)
     tm_pointer->TM_string[i] = CDMS_HK_FRAME[i-4];
-}
-
-
+}
\ No newline at end of file