To fix the hang problem
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: CDMS_HK.h
- Revision:
- 223:7c802e1ccd30
- Parent:
- 219:8e8396f15bc2
--- a/CDMS_HK.h Mon Jul 04 05:24:35 2016 +0000 +++ b/CDMS_HK.h Mon Jul 04 13:53:20 2016 +0000 @@ -13,8 +13,6 @@ void minMaxHkData(); void COLLECT_CDMS_RAM(); -Serial hk_cdms(USBTX, USBRX); - AnalogIn TempInput(PIN27); // Input from Current Multiplexer AnalogIn CDMS_temp_sensor(PIN53); AnalogIn COMRX_RSSI_volatge(PIN70); @@ -27,7 +25,7 @@ void FCTN_CDMS_HK_MAIN(void const *args) { - + gPC.printf("Entering HK thread"); unsigned char CDMS_HK_FRAME[134] = {0}; char BAE_HK[128] = {0}; uint8_t convoluted_CDMS_HK[270]; @@ -57,6 +55,7 @@ minMaxHkData(); uint64_t time = FCTN_CDMS_RD_RTC(); //Reading Time from RTC + gPC.printf("0x%08X \n",time); time = time>>7; uint32_t HK_time = (uint32_t)time; for(int i = 0; i<4; i++) @@ -70,7 +69,6 @@ CDMS_HEALTH_DATA[126] = GPIO_STATUS; //Reading GPIO Pins CDMS_HEALTH_DATA[127] = GPIO_STATUS >> 8; - FCTN_SD_MNGR(); //Adding FSC & TMID to TM frame CDMS_HK_FRAME[0] = 0x20; CDMS_HK_FRAME[1] = FSC_CURRENT[4]+1; @@ -94,16 +92,15 @@ CDMS_HEALTH_FINAL[i] = interleave_CDMS_HK[i]; SD_WRITE(CDMS_HEALTH_FINAL,FSC_CURRENT[4]+1,4); - hk_cdms.printf("CDMS hk succesfully completed\r\n"); - + gPC.printf("Completed CDMS HK\n"); /*---------------------------------- BAE HK --------------------------------------------*/ BAE_HK_I2C = FCTN_I2C_READ(BAE_HK,134); + gPC.printf("Entering BAE thread\n"); if(BAE_HK_I2C == 0) { TIME_LATEST_I2C_BAE = FCTN_CDMS_RD_RTC() >> 7; - hk_cdms.printf("Bae hk data received"); } else { for(int i = 0; i<128; i++) BAE_HK[i] = 0; @@ -126,7 +123,7 @@ for(int i=0; i<288; i++) BAE_HEALTH_FINAL[i] = interleave_BAE_HK[i]; SD_WRITE(BAE_HEALTH_FINAL,FSC_CURRENT[5]+1,5); - hk_cdms.printf("BAE hk succesfully completed\r\n"); + gPC.printf("Completed BAE HK\n"); /*----------------------------------Beacon message--------------------------------------*/ unsigned char SC_HK_LBM_0[135]; @@ -138,6 +135,7 @@ SC_HK_LBM_0[132] = crc; SC_HK_LBM_0[133] = crc >> 8; FCTN_I2C_WRITE((char *)SC_HK_LBM_0,135); + gPC.printf("Completed Beacon\n"); } int quantiz(float start,float step,float x)