To fix the hang problem
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: CDMS_HK.h
- Revision:
- 246:565458eefd94
- Parent:
- 245:da9d1bd999da
- Child:
- 247:d0be0773b951
--- a/CDMS_HK.h Sun Jul 10 13:47:26 2016 +0000 +++ b/CDMS_HK.h Sun Jul 10 21:32:28 2016 +0000 @@ -84,22 +84,22 @@ uint16_t crc = crc16_gen(CDMS_HK_FRAME,132); /*Adding CRC to TM frame*/ CDMS_HK_FRAME[133] = crc; CDMS_HK_FRAME[132] = crc >> 8; - - Convolution CDMS_HEALTH; - Convolution BAE_HEALTH; - CDMS_HEALTH.convolutionEncode(CDMS_HK_FRAME , convoluted_CDMS_HK); - CDMS_HEALTH.convolutionEncode(CDMS_HK_FRAME + 67, convoluted_CDMS_HK + 135); + + + exor(CDMS_HK_FRAME); + ConvObj.convolutionEncode(CDMS_HK_FRAME , convoluted_CDMS_HK); + ConvObj.convolutionEncode(CDMS_HK_FRAME + 67, convoluted_CDMS_HK + 135); interleave(convoluted_CDMS_HK , interleave_CDMS_HK); interleave(convoluted_CDMS_HK +135, interleave_CDMS_HK + 144); - for(int i=0; i<288; i++) - CDMS_HEALTH_FINAL[i] = interleave_CDMS_HK[i]; - - SD_WRITE(CDMS_HEALTH_FINAL,FSC_CURRENT[4]+1,4); - gPC.printf("\rCompleted CDMS HK\n"); - - /*---------------------------------- BAE HK --------------------------------------------*/ - - +// for(int i=0; i<288; i++) +// CDMS_HEALTH_FINAL[i] = interleave_CDMS_HK[i]; +// +// SD_WRITE(CDMS_HEALTH_FINAL,FSC_CURRENT[4]+1,4); +// gPC.printf("\rCompleted CDMS HK\n"); +// +// /*---------------------------------- BAE HK --------------------------------------------*/ +// +// BAE_HK_I2C = FCTN_I2C_READ(BAE_HK,134); gPC.printf("\rEntering BAE HK\n"); if(BAE_HK_I2C == 0) { @@ -119,15 +119,15 @@ crc = crc16_gen(BAE_HK_FRAME,132); /*Adding CRC to TM frame*/ BAE_HK_FRAME[133] = crc; BAE_HK_FRAME[132] = crc >> 8; - BAE_HEALTH.convolutionEncode(BAE_HK_FRAME , convoluted_BAE_HK); - BAE_HEALTH.convolutionEncode(BAE_HK_FRAME + 67, convoluted_BAE_HK + 135); - interleave(convoluted_BAE_HK , interleave_BAE_HK); - interleave(convoluted_BAE_HK +135, interleave_BAE_HK + 144); - 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); +// BAE_HEALTH.convolutionEncode(BAE_HK_FRAME , convoluted_BAE_HK); +// BAE_HEALTH.convolutionEncode(BAE_HK_FRAME + 67, convoluted_BAE_HK + 135); +// interleave(convoluted_BAE_HK , interleave_BAE_HK); +// interleave(convoluted_BAE_HK +135, interleave_BAE_HK + 144); +// 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); } - +// } else { gPC.printf("\rBAE HK data not recieved through I2C\n"); for(int i = 0; i<134; i++)