Repository for CDMS code

Dependencies:   SimpleDMA mbed-rtos mbed eeprom

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

Revision:
206:fba4aeebf004
Parent:
187:2c7263530c57
Child:
207:28a07943dded
diff -r 5f75962ae7ea -r fba4aeebf004 DefinitionsAndGlobals.h
--- a/DefinitionsAndGlobals.h	Wed Jun 29 14:17:34 2016 +0000
+++ b/DefinitionsAndGlobals.h	Thu Jun 30 14:00:33 2016 +0000
@@ -11,11 +11,11 @@
     #define COM_RX_UART_RX USBRX
     
 // COMMON SPI
-    #define SPI_MOSI PTD6
-    #define SPI_MISO PTD7
-    #define SPI_CLK PTD5
+    #define SPI_MOSI PTE1
+    #define SPI_MISO PTE3
+    #define SPI_CLK PTE2
     #define SPI_CS_ADF PTA15
-    #define SPI_CS_SDC PTD4
+    #define SPI_CS_SDC PIN20
     #define SPI_CS_RTC PIN26
     
 // COM_TX
@@ -24,6 +24,15 @@
 
 // ADF INTERRUPT
     #define ADF_IRQ PTA14
+    
+//I2C - Payload to CDMS (need to change while using CDMS hardware);
+    I2C master(PIN32,PIN31);
+    DigitalIn PL_I2C_Intr(PTC13);
+    DigitalOut PL_I2C_GPIO(PTC1);
+            
+//I2C - CDMS to BAE
+    DigitalIn BAE_I2C_GPIO(PIN39);
+    DigitalOut CDMS_I2C_GPIO(PIN67);
 
 // TC LIST
     #define TCL_STATE_INCOMPLETE 0x00
@@ -211,13 +220,11 @@
 const uint8_t gCALL_SIGN_STRING[TM_SHORT_SIZE] = {0xE0, 0x00, 0x00, 0x00, 0x56, 0x55, 0x32, 0x4E, 0x43, 0x46, 0x00, 0xAC, 0x11};
 
 // CDMS HK
-uint8_t CDMS_HEALTH_DATA[134];
+uint8_t CDMS_HEALTH_DATA[128];
 uint8_t CDMS_RAM[59];
 uint16_t GPIO_STATUS;
-uint8_t CDMS_HK_MAIN_STATUS;  
-uint16_t CDMS_HK_MAIN_COUNTER;  
+uint8_t CDMS_HK_MAIN_STATUS;    
 uint8_t COMRX_STATUS;
-uint16_t COMRX_RESET_COUNTER;
 uint8_t RTC_FAULTCOUNT;
 uint16_t SD_FAULTCOUNT;
 uint8_t SD_STATUS;
@@ -227,8 +234,6 @@
 uint16_t PL_FAULTCOUNT;
 bool BAE_HK_I2C;
 uint8_t RTC_STATUS;
-uint32_t CDMS_HK_FSC;
-uint32_t BAE_HK_FSC;
 float RSSI_volatge;
 
 CDMS_HK_actual actual_data;
@@ -238,4 +243,20 @@
 
 //SD HK
 uint32_t FSC_CURRENT[6];
-uint32_t FSC_LAST[6];
\ No newline at end of file
+uint32_t FSC_LAST[6];
+
+//Time's
+uint32_t TIME_LATEST_RTC;
+uint32_t TIME_LATEST_I2C_BAE;
+uint32_t TIME_LATEST_I2C_SPEED;
+uint32_t TIME_LATEST_SD_WR;
+uint32_t TIME_LATEST_SD_RD;
+uint32_t TIME_LATEST_SPI_SPEED;
+
+//Counter's
+uint16_t CDMS_I2C_ERR_SPEED_COUNTER;
+uint16_t CDMS_I2C_ERR_BAE_COUNTER;
+uint16_t CDMS_HK_MAIN_COUNTER;
+uint16_t COMRX_RESET_COUNTER;
+uint16_t PL_MAIN_COUNTER;
+uint16_t PL_RCV_SC_DATA_COUNTER;
\ No newline at end of file