
Repository for CDMS code
Dependencies: SimpleDMA mbed-rtos mbed eeprom
Fork of COM_MNG_TMTC_SIMPLE by
Revision 228:335da5b0d3e4, committed 2016-07-04
- Comitter:
- chaithanyarss
- Date:
- Mon Jul 04 23:13:24 2016 +0000
- Parent:
- 225:e6a3ffe4a530
- Child:
- 229:42624b9a08b4
- Child:
- 231:e2bd2a990bfe
- Child:
- 232:b1458c1e9199
- Commit message:
- I2C working after changing pins and removing conflicts in pin modes
Changed in this revision
--- a/COM_MNG_TMTC.h Mon Jul 04 14:48:16 2016 +0000 +++ b/COM_MNG_TMTC.h Mon Jul 04 23:13:24 2016 +0000 @@ -12,7 +12,7 @@ //#include "Flash.h" -DigitalIn tm_status_4m_slv(PIN39); //I2C interrupt to CDMS from BAE +//DigitalIn tm_status_4m_slv(PIN39); //I2C interrupt to CDMS from BAE //DigitalIn tm_status_4m_pl(PIN61); //I2C interrupt to CDMS from PL #define RESET_CDMS NVIC_SystemReset()
--- a/DefinitionsAndGlobals.h Mon Jul 04 14:48:16 2016 +0000 +++ b/DefinitionsAndGlobals.h Mon Jul 04 23:13:24 2016 +0000 @@ -31,8 +31,8 @@ DigitalOut PL_I2C_GPIO(PTC1); //I2C - CDMS to BAE - DigitalIn BAE_I2C_GPIO(PIN39); - DigitalOut CDMS_I2C_GPIO(PIN67); + DigitalIn BAE_I2C_GPIO(PIN67); + DigitalOut CDMS_I2C_GPIO(PIN39); // TC LIST #define TCL_STATE_INCOMPLETE 0x00 @@ -101,10 +101,6 @@ #define HPTC2 6 // Add more entries above - // SIZE of tc in bytes - #define TC_SHORT_SIZE 11 - #define TC_LONG_SIZE 135 - // TMID list #define TMID_ACK_L1 0xA #define TMID_ACK_L234 0xB
--- a/main.cpp Mon Jul 04 14:48:16 2016 +0000 +++ b/main.cpp Mon Jul 04 23:13:24 2016 +0000 @@ -37,15 +37,15 @@ #include "TEST_PL.h" #define PL_TC(tm_ptr){\ - Base_tc *beacon_tc = new Short_tc;\ + Base_tc *beacon_tc = new Long_tc;\ beacon_tc->next_TC = NULL;\ - PUTshort_or_long(beacon_tc,SHORT_TC_CODE);\ + PUTshort_or_long(beacon_tc,LONG_TC_CODE);\ PUTcrc_pass(beacon_tc,0x1);\ PUTexec_status(beacon_tc,0);\ beacon_tc->TC_string[0] = 0x01;\ - beacon_tc->TC_string[1] = 0xE0;\ + beacon_tc->TC_string[1] = 0x60;\ beacon_tc->TC_string[2] = 0x81;\ - beacon_tc->TC_string[3] = 0xD0;\ + beacon_tc->TC_string[3] = 0x21;\ beacon_tc->TC_string[4] = 0x00;\ beacon_tc->TC_string[5] = 0;\ beacon_tc->TC_string[6] = 0;\ @@ -54,6 +54,7 @@ uint16_t crc16 = crc16_gen(beacon_tc->TC_string, 9);\ beacon_tc->TC_string[9] = (crc16 & 0xFF00)>>8;\ beacon_tc->TC_string[10] = (crc16 & 0x00FF);\ + for(int i = 11; i<135;i++) beacon_tc->TC_string[i] = 0;\ tm_ptr = FCTN_CDMS_RLY_TMTC(beacon_tc);\ } #define OBSRS_TC(tm_ptr){\ @@ -151,14 +152,15 @@ - - /*gPC.printf("PL_TC sending\r\n"); + while(1){ + gPC.printf("PL_TC sending\r\n"); - Base_tm *tm_ptr = new Short_tm; - OBSRS_TC(tm_ptr); + Base_tm *tm_ptr = new Long_tm; + PL_TC(tm_ptr); + wait(1); + } + gPC.printf("PL_TC sent"); - gPC.printf("PL_TC sent"); - */ // *******************INITIALISATIONS END******************** FCTN_CDMS_HK_MAIN((void *)NULL);