Latest FM Code with EEPROM
Dependencies: FreescaleIAP SimpleDMA eeprom mbed-rtos mbed
Fork of CDMS_QM_03MAR2017_Flash_with_obsrs by
Diff: COM_MNG_TMTC.h
- Revision:
- 216:93505a6f8db7
- Parent:
- 215:570251b23c7b
- Child:
- 218:c63cdba0550f
diff -r 570251b23c7b -r 93505a6f8db7 COM_MNG_TMTC.h --- a/COM_MNG_TMTC.h Sun Jul 03 09:47:05 2016 +0000 +++ b/COM_MNG_TMTC.h Sun Jul 03 11:35:55 2016 +0000 @@ -45,7 +45,7 @@ -#define detect_ack(tm_ptr, temp_ack, tc_psc) {\ +#define detect_ack(tm_ptr, temp_ack) {\ if( tm_ptr != NULL ){\ int length = TM_SHORT_SIZE;\ if( GETshort_or_long_tm(tm_ptr) == SHORT_TM_CODE ){\ @@ -62,20 +62,20 @@ if( (temp8 == 0xC0) || (temp8 == 0xA0) )\ temp_ack = 0x01;\ else{\ - temp_ack = 0x00;\ + temp_ack = 0x02;\ /*CHECK FOR NACK CODE: CRC FAIL NACK*/\ temp8 = tm_ptr->TM_string[TM_ACK_CODE_INDEX];\ temp8 = temp8 & 0x0F;\ if( temp8 == CRC_FAIL_NACK_CODE ){\ - tm_ptr->TM_string[2] = tc_psc;\ + temp_ack = 0x04;\ }\ }\ }\ else\ - temp_ack = 0x00;\ + temp_ack = 0x03;\ }\ else{\ - temp_ack = 0x00;\ + temp_ack = 0x02;\ }\ } @@ -1047,7 +1047,7 @@ }\ else if( (service_subtype != OBOSC_SUB_DISABLE) && (service_subtype != OBOSC_SUB_RETRY) ){\ /*CHANGE THE ACK CODE TO INVALID TC*/\ - ackl234new->TM_string[2] = 0xA2;\ + ackl234new->TM_string[2] = 0xAF;\ }\ if (DEBUG)\ gPC.puts("completed obosc\r\n");\ @@ -1057,6 +1057,7 @@ #define EXECUTE_OBOSC_ONLY {\ + gMASTER_STATE = TCL_STATE_EXECUTING;\ int reset_flag = 0;\ if (DEBUG)\ gPC.puts("iNSIDE EXECUTE_OBOSC_ONLY\r\n");\