
Repository for CDMS code
Dependencies: SimpleDMA mbed-rtos mbed eeprom
Fork of COM_MNG_TMTC_SIMPLE by
Revision 220:2aeab83212e6, committed 2016-07-04
- Comitter:
- chaithanyarss
- Date:
- Mon Jul 04 05:24:35 2016 +0000
- Parent:
- 219:8e8396f15bc2
- Child:
- 223:7c802e1ccd30
- Commit message:
- Testing TCs with GS
Changed in this revision
--- a/CDMS_PL.h Sun Jul 03 15:28:43 2016 +0000 +++ b/CDMS_PL.h Mon Jul 04 05:24:35 2016 +0000 @@ -76,6 +76,8 @@ pl_tc_standby->TC_string[10] = (uint8_t)(crc16 & 0x00FF);\ tm_ptr_standby = FCTN_CDMS_RLY_TMTC(pl_tc_standby);\ VERIFY_TM(tm_ptr_standby);\ + delete pl_tc_standby;\ + delete tm_ptr_standby;\ } //TC_string[0] should not be 0x00 @@ -100,6 +102,8 @@ pl_tc_hibernate->TC_string[10] = (uint8_t)(crc16 & 0x00FF);\ tm_ptr_hibernate = FCTN_CDMS_RLY_TMTC(pl_tc_hibernate);\ VERIFY_TM(tm_ptr_hibernate);\ + delete pl_tc_hibernate;\ + delete tm_ptr_hibernate;\ } //TC_string[0] should not be 0x00 @@ -125,6 +129,8 @@ pl_tc_science->TC_string[10] = (uint8_t)(crc16 & 0x00FF);\ tm_ptr_science = FCTN_CDMS_RLY_TMTC(pl_tc_science);\ VERIFY_TM(tm_ptr_science);\ + delete pl_tc_science;\ + delete tm_ptr_science;\ } void print_processed_block(uint8_t index) {
--- a/DefinitionsAndGlobals.h Sun Jul 03 15:28:43 2016 +0000 +++ b/DefinitionsAndGlobals.h Mon Jul 04 05:24:35 2016 +0000 @@ -83,6 +83,7 @@ // max value of telecommands in a tcl #define TCL_OVERFLOW_CONSTANT 256 #define TM_OVERFLOW_CONSTANT 256 +#define BYTE_OVERFLOW_CONSTANT 35000 // starting value of packet sequence count at each pass #define PSC_START_VALUE 1
--- a/i2c.h Sun Jul 03 15:28:43 2016 +0000 +++ b/i2c.h Mon Jul 04 05:24:35 2016 +0000 @@ -45,7 +45,6 @@ } if(((pdirr1 & 0x03000000)==0x03000000))//if SCL and SDA are both high { - TIME_LATEST_I2C_SPEED = FCTN_CDMS_RD_RTC() >> 7; gPC.printf("\n\rData received from PL"); } else @@ -58,6 +57,7 @@ else if (read_ack == 1) { I2C_busreset(); + CDMS_I2C_ERR_SPEED_COUNTER++; } PL_I2C_GPIO = 0; i2c_count = 0; @@ -80,7 +80,6 @@ } if(((pdirw1 & 0x03000000)==0x03000000)) { - TIME_LATEST_I2C_SPEED = FCTN_CDMS_RD_RTC() >> 7; gPC.printf("\n\r Data sent to PL"); } else @@ -93,6 +92,7 @@ if (write_ack == 1) { I2C_busreset(); + CDMS_I2C_ERR_SPEED_COUNTER++; } i2c_count = 0; return write_ack; @@ -127,6 +127,7 @@ else if (read_ack == 1) { I2C_busreset(); + CDMS_I2C_ERR_BAE_COUNTER++; } CDMS_I2C_GPIO = 0; i2c_count = 0; @@ -150,7 +151,6 @@ } if(((pdirw1 & 0x03000000)==0x03000000)) { - TIME_LATEST_I2C_BAE = FCTN_CDMS_RD_RTC() >> 7; gPC.printf("\n\r Data sent BAE"); } else @@ -163,6 +163,7 @@ if (write_ack == 1) { I2C_busreset(); + CDMS_I2C_ERR_BAE_COUNTER++; } CDMS_I2C_GPIO = 0; i2c_count = 0;
--- a/main.cpp Sun Jul 03 15:28:43 2016 +0000 +++ b/main.cpp Mon Jul 04 05:24:35 2016 +0000 @@ -123,7 +123,7 @@ - + CDMS_INIT(); uint8_t test[512] = {0}; disk_write(test,7000); //to be used only just before launch @@ -165,8 +165,8 @@ */ // *******************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(30000); /*starting the thread with signal*/ //set_sig(); @@ -184,8 +184,6 @@ break;} }*/ - - while(true) { Thread::wait(osWaitForever); //state = gCOM_MNG_TMTC_THREAD->get_state() + '0';