for frequency correction testing
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: TEST_PL.h
- Revision:
- 248:da9d1bd999da
- Parent:
- 209:63e9c8f8b5d2
- Child:
- 266:ae588e75cfa4
--- a/TEST_PL.h Sat Jul 09 13:11:25 2016 +0000 +++ b/TEST_PL.h Sun Jul 10 13:47:26 2016 +0000 @@ -12,34 +12,34 @@ { {0,1,1,0,0,15,3,3}, {0,1,1,0,0,45,2,3}, - {0,1,1,0,1,00,1,3}, + {0,1,1,0,1,0,1,3}, {0,1,1,0,1,25,0,3}, - {0,1,1,0,2,10,3,3}, - {0,1,1,0,1,50,2,3}, - {0,1,1,0,2, 0,2,3}, + {0,1,1,0,1,50,3,3}, {0,1,1,0,2,10,2,3}, - {0,1,1,0,2,20,2,0}, - {0,1,1,0,2,30,2,3}, + {0,1,1,0,1,40,2,3}, + {0,1,1,0,1,10,2,3}, + {0,1,1,0,3,40,2,0}, + {0,1,1,0,4,10,2,3}, - {0,1,1,0,2,50,0,1}, - {0,1,1,0,4,10,3,3}, - {0,1,1,0,5,30,3,3}, - {0,1,1,0,4,15,2,3}, - {0,1,1,0,4,10,1,0}, - {0,1,1,0,3,10,2,3}, - {0,1,1,0,4,10,3,3}, - {0,1,1,0,5,10,0,3}, - {0,1,1,0,6,10,1,3}, - {0,1,1,0,6,20,1,2}, + {0,1,1,0,4,40,0,1}, + {0,1,1,0,5,10,3,3}, + {0,1,1,0,5,40,3,3}, + {0,1,1,0,6,10,2,3}, + {0,1,1,0,6,40,1,0}, + {0,1,1,0,7,10,2,3}, + {0,1,1,0,7,40,3,3}, + {0,1,1,0,8,10,0,3}, + {0,1,1,0,8,40,1,3}, + {0,1,1,0,9,10,1,2}, - {0,1,1,0,1,40,2,3}, - {0,1,1,0,1,20,3,1}, - {0,1,1,0,1,30,3,3}, - {0,1,1,0,1,10,2,1}, - {0,1,1,0,0, 0,0,0}, - {0,1,1,0,0, 0,0,0}, - {0,1,1,0,0, 0,0,0}, - {0,1,1,0,0, 0,0,0}, + {0,1,1,0,9,40,2,3}, + {0,1,1,0,10,10,3,1}, + {0,1,1,0,10,40,3,3}, + {0,1,1,0,11,10,2,1}, + {0,0,0,0,11,40,0,0}, + {0,1,1,0,12,10,0,0}, + {0,1,1,0,12,40,0,0}, + {0,1,1,0,13, 0,0,0}, {0,1,1,0,0, 0,0,0}, {0,1,1,0,0, 0,0,0}, @@ -233,6 +233,15 @@ test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\ test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\ test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\ + delete test_tc;\ + Base_tm *temp;\ + temp = test_tm_ptr;\ + while(test_tm_ptr!=NULL)\ + {\ + temp = temp->next_TM;\ + delete test_tm_ptr;\ + test_tm_ptr = temp;\ + }\ } #define test_schedule_2(test_tm_ptr) {\ Base_tc *test_tc = new Long_tc;\ @@ -247,6 +256,15 @@ test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\ test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\ test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\ + delete test_tc;\ + Base_tm *temp;\ + temp = test_tm_ptr;\ + while(test_tm_ptr!=NULL)\ + {\ + temp = temp->next_TM;\ + delete test_tm_ptr;\ + test_tm_ptr = temp;\ + }\ } #define test_schedule_3(test_tm_ptr) {\ Base_tc *test_tc = new Long_tc;\ @@ -261,6 +279,15 @@ test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\ test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\ test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\ + delete test_tc;\ + Base_tm *temp;\ + temp = test_tm_ptr;\ + while(test_tm_ptr!=NULL)\ + {\ + temp = temp->next_TM;\ + delete test_tm_ptr;\ + test_tm_ptr = temp;\ + }\ } #define test_schedule_4(test_tm_ptr) {\ Base_tc *test_tc = new Long_tc;\ @@ -275,6 +302,15 @@ test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\ test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\ test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\ + delete test_tc;\ + Base_tm *temp;\ + temp = test_tm_ptr;\ + while(test_tm_ptr!=NULL)\ + {\ + temp = temp->next_TM;\ + delete test_tm_ptr;\ + test_tm_ptr = temp;\ + }\ } #define test_schedule_5(test_tm_ptr) {\ Base_tc *test_tc = new Long_tc;\ @@ -289,6 +325,15 @@ test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\ test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\ test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\ + delete test_tc;\ + Base_tm *temp;\ + temp = test_tm_ptr;\ + while(test_tm_ptr!=NULL)\ + {\ + temp = temp->next_TM;\ + delete test_tm_ptr;\ + test_tm_ptr = temp;\ + }\ } #define test_schedule_6(test_tm_ptr) {\ Base_tc *test_tc = new Long_tc;\ @@ -303,6 +348,15 @@ test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\ test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\ test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\ + delete test_tc;\ + Base_tm *temp;\ + temp = test_tm_ptr;\ + while(test_tm_ptr!=NULL)\ + {\ + temp = temp->next_TM;\ + delete test_tm_ptr;\ + test_tm_ptr = temp;\ + }\ } #define test_schedule_F(test_tm_ptr) {\ Base_tc *test_tc = NULL;\ @@ -323,6 +377,7 @@ test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\ test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\ test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\ + delete test_tc;\ } void send_verify_0xF(Base_tm* test_tm_ptr) { @@ -330,8 +385,8 @@ uint8_t j=0,tm_data_err_count=0; Base_tm* temp_ptr; test_schedule_F(test_tm_ptr); - //gPC.printf("\n\r----------------------------------------------------------------------------------"); - //gPC.printf("\n\rTC_Schedule_Report(0xF):\n"); + gPC.printf("\n\r----------------------------------------------------------------------------------"); + gPC.printf("\n\rTC_Schedule_Report(0xF):\n"); temp_ptr=test_tm_ptr; while(temp_ptr!=NULL) { @@ -389,7 +444,15 @@ { gPC.printf("\n\rNo errors in TM Data(0xF)"); } - //gPC.printf("\n\r----------------------------------------------------------------------------------"); + gPC.printf("\n\r----------------------------------------------------------------------------------"); + Base_tm *temp;\ + temp = test_tm_ptr;\ + while(test_tm_ptr!=NULL)\ + {\ + temp = temp->next_TM;\ + delete test_tm_ptr;\ + test_tm_ptr = temp;\ + }\ } void verify_extracted(uint8_t c) { @@ -423,20 +486,19 @@ } void test_pl_main() { - //uint32_t temp_pl_block[192] = {0}; + uint32_t temp_pl_block[192] = {0}; uint8_t wrong_modify=0,z; Base_tm* test_tm_ptr; - //Base_tm* temp; - //for(z=0;z<192;z++) - // pl_block[z] = 0xFFFFFFFF; - //testing 0xF + for(z=0;z<192;z++) + pl_block[z] = 0xFFFFFFFF; + // testing 0xF send_verify_0xF(test_tm_ptr); - //for(z=0;z<192;z++) - // temp_pl_block[z] = pl_block[z]; + for(z=0;z<192;z++) + temp_pl_block[z] = pl_block[z]; //testing TC = 0x1,0x2...0x6 - uint8_t w =1; - for(uint8_t v=1;w<7;w++) + int w =1; + for(uint8_t v=1;w<1000;w++) { /*switch(v) { @@ -453,6 +515,7 @@ case 6: test_schedule_6(test_tm_ptr); break; }*/ + gPC.printf("\n\rIndex:%d",w); if(v==1) { test_schedule_1(test_tm_ptr); @@ -477,7 +540,7 @@ { test_schedule_6(test_tm_ptr); } - /*for(z=0;z<192;z++) + for(z=0;z<192;z++) { if((z>=((v-1)*32)) && (z<=((v*32)-1))) z++; @@ -501,12 +564,12 @@ //gPC.printf("\n\r%03d-0x%08X\t%03d-0x%08X",(i),pl_block[i],(i)+1,pl_block[(i)+1]); //gPC.printf("\t%03d-0x%08X\t%03d-0x%08X\n",(i)+2,pl_block[(i)+2],(i)+3,pl_block[(i)+3]); } - }*/ + } send_verify_0xF(test_tm_ptr); verify_extracted(v); - //for(z=0;z<192;z++) - // temp_pl_block[z] = pl_block[z]; - wait(1); + for(z=0;z<192;z++) + temp_pl_block[z] = pl_block[z]; + //wait(1); } gPC.printf("\n\rTesting TC_TM block processing complete"); } \ No newline at end of file