working version
Dependencies: mbed mbed-rtos SimpleDMA FreescaleIAP eeprom
Fork of CDMS_CODE_FM_28JAN2017 by
Diff: COM_MNG_TMTC.h
- Revision:
- 290:3159ff1081a2
- Parent:
- 289:9bd62b69874c
- Child:
- 292:61aa2169ea1c
--- a/COM_MNG_TMTC.h Sat Aug 06 06:34:38 2016 +0000 +++ b/COM_MNG_TMTC.h Sun Aug 07 10:36:59 2016 +0000 @@ -371,9 +371,9 @@ gPC.printf("Write success\r\n"); //wait(0.2); int poll=0; - while(poll<20000 && BAE_I2C_GPIO==0) + while(poll<3000 && BAE_I2C_GPIO==0) { - wait_us(10); + wait_ms(1); poll+=1; } if(BAE_I2C_GPIO == 1) @@ -1124,9 +1124,12 @@ } if(PL_I2C_Intr == 1) { - gPC.printf("PL_I2C_Intr is high\r\n"); + gPC.printf("\n\rPL_I2C_Intr is high"); Base_tm *tm_ptr = new Long_tm; y=FCTN_I2C_READ_PL((char*)tm_ptr->TM_string,TM_LONG_SIZE); + gPC.printf("\n\r"); + for(int i = 0;i<134;i++) + gPC.printf("%X",(int)(tm_ptr->TM_string[i])); if(y==0) { tm_ptr->next_TM=NULL; @@ -1134,16 +1137,17 @@ } else if(y==1) { + gPC.printf("\n\rPL_TM read failure"); delete tm_ptr; Base_tm *tm_ptr_short = new Short_tm; - ACK_L234(tm_ptr_short,0x85,GETpacket_seq_count(tc_ptr)); - //gPC.printf("\n\rPTE->PDIR = 0x%08X",PTE->PDIR); + ACK_L234(tm_ptr_short,0x85,GETpacket_seq_count(tc_ptr)); + gPC.printf("\n\r0x85"); return tm_ptr_short; } } else if(PL_I2C_Intr == 0) //name to be changed later { - gPC.printf("PL_I2C_Intr is not high\r\n"); + gPC.printf("\n\rPL_I2C_Intr is not high"); Base_tm *tm_ptr_short = new Short_tm; ACK_L234(tm_ptr_short,0x84,GETpacket_seq_count(tc_ptr)); return tm_ptr_short; @@ -1152,7 +1156,7 @@ } default: //invalid TC { - gPC.printf("INVALID TC\r\n"); + gPC.printf("\n\rINVALID TC"); Base_tm *tm_ptr_short = new Short_tm; ACK_L234(tm_ptr_short,0x02,GETpacket_seq_count(tc_ptr)); return tm_ptr_short;