publishing to check changes in cdms code
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE_samp_23SEP_DMA_flag by
Diff: CDMS_HK.h
- Revision:
- 310:30f20cc5c94b
- Parent:
- 308:af5ab655ba00
diff -r 91755ef8f22a -r 30f20cc5c94b CDMS_HK.h --- a/CDMS_HK.h Tue Nov 22 08:08:46 2016 +0000 +++ b/CDMS_HK.h Thu Nov 24 05:45:20 2016 +0000 @@ -71,7 +71,7 @@ CDMS_HK_MAIN_COUNTER++; FCTN_CDMS_HK(); //collects temperatures - RSSI_volatge = COMRX_RSSI_volatge.read() * 3.3;//to be checked + RSSI_volatge = COMRX_RSSI_volatge.read() * 3.3*10;//to be checked //gPC.printf("\n\rRSSI voltage = %f",RSSI_volatge); VERIFY_COMRX(); VERIFY_RTC(); @@ -160,6 +160,7 @@ if(crc == ((uint16_t)BAE_HK[132] << 8) | (uint16_t)BAE_HK[133]){ //gPC.printf("BAE HK data recieved through I2C\t"); TIME_LATEST_I2C_BAE = FCTN_CDMS_RD_RTC() >> 7; + gPC.printf("\r TIME_LATEST_I2C_BAE = %d",TIME_LATEST_I2C_BAE); /*for(int i = 0; i<15; i++) gPC.printf("\r 0x%02X\n",BAE_HK[i]);*/ for(int i = 0; i<4; i++) @@ -363,23 +364,25 @@ GPIO_STATUS=(COMRX_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<11)):(GPIO_STATUS)&(~((uint16_t)(0x1<<11))); // COMTX_OC_FAULT //$ GPIO_STATUS=(COM_TX_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<10)):(GPIO_STATUS)&(~((uint16_t)(0x1<<10))); + //SD_CARD_OC_FAULT //$ + GPIO_STATUS=(SD_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<9)):(GPIO_STATUS)&(~((uint16_t)(0x1<<9))); //BAE_OC_FAULT //$ - GPIO_STATUS=(BAE_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<9)):(GPIO_STATUS)&(~((uint16_t)(0x1<<9))); + GPIO_STATUS=(BAE_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<8)):(GPIO_STATUS)&(~((uint16_t)(0x1<<8))); //PL_GPIO_1_STATUS //$ - GPIO_STATUS=(PL_GPIO_1_STATUS)?(GPIO_STATUS)|((uint16_t)(0x1<<8)):(GPIO_STATUS)&(~((uint16_t)(0x1<<8))); + GPIO_STATUS=(PL_GPIO_1_STATUS)?(GPIO_STATUS)|((uint16_t)(0x1<<7)):(GPIO_STATUS)&(~((uint16_t)(0x1<<7))); //PL_GPIO_2_STATUS //$ - GPIO_STATUS=(PL_GPIO_2_STATUS)?(GPIO_STATUS)|((uint16_t)(0x1<<7)):(GPIO_STATUS)&(~((uint16_t)(0x1<<7))); + GPIO_STATUS=(PL_GPIO_2_STATUS)?(GPIO_STATUS)|((uint16_t)(0x1<<6)):(GPIO_STATUS)&(~((uint16_t)(0x1<<6))); //PL_GPIO_3_STATUS //$ - GPIO_STATUS=(PL_GPIO_3_STATUS)?(GPIO_STATUS)|((uint16_t)(0x1<<6)):(GPIO_STATUS)&(~((uint16_t)(0x1<<6))); + GPIO_STATUS=(PL_GPIO_3_STATUS)?(GPIO_STATUS)|((uint16_t)(0x1<<5)):(GPIO_STATUS)&(~((uint16_t)(0x1<<5))); //PL_BEE_SW_OC_FAULT //to be verified - GPIO_STATUS=(PL_BEE_SW_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<5)):(GPIO_STATUS)&(~((uint16_t)(0x1<<5))); + GPIO_STATUS=(PL_BEE_SW_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<4)):(GPIO_STATUS)&(~((uint16_t)(0x1<<4))); //PL_EPS_LATCH_SW_OC_FAULT // to be verified - GPIO_STATUS=(PL_EPS_LATCH_SW_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<4)):(GPIO_STATUS)&(~((uint16_t)(0x1<<4))); + GPIO_STATUS=(PL_EPS_LATCH_SW_OC_FAULT)?(GPIO_STATUS)|((uint16_t)(0x1<<3)):(GPIO_STATUS)&(~((uint16_t)(0x1<<3))); //EPS_V_C_EN_STATUS - GPIO_STATUS=(COM_RX_CNTRL)?(GPIO_STATUS)|((uint16_t)(0x1<<3)):(GPIO_STATUS)&(~((uint16_t)(0x1<<3))); + GPIO_STATUS=(COM_RX_CNTRL)?(GPIO_STATUS)|((uint16_t)(0x1<<2)):(GPIO_STATUS)&(~((uint16_t)(0x1<<2))); //EPS_V_D_EN_STATUS - GPIO_STATUS=(COM_TX_CNTRL)?(GPIO_STATUS)|((uint16_t)(0x1<<2)):(GPIO_STATUS)&(~((uint16_t)(0x1<<2))); + GPIO_STATUS=(COM_TX_CNTRL)?(GPIO_STATUS)|((uint16_t)(0x1<<1)):(GPIO_STATUS)&(~((uint16_t)(0x1<<1))); // gPC.printf("%04x\n",GPIO_STATUS); gPC.printf("\rBAE_OC STATE = %04x \n",GPIO_STATUS); } @@ -551,20 +554,28 @@ CDMS_RAM[18] = SD_LIB_WRITES; for(int i = 0; i<4; i++) CDMS_RAM[19+i] = TIME_LATEST_RTC >> (3-i)*8; + for(int i = 0; i<4; i++) CDMS_RAM[23+i] = TIME_LATEST_I2C_BAE >> (3-i)*8; + gPC.printf("\r TIME_LATEST_I2C_BAE = %d\n",TIME_LATEST_I2C_BAE); for(int i = 0; i<4; i++) CDMS_RAM[27+i] = TIME_LATEST_I2C_SPEED >> (3-i)*8; + gPC.printf("\r TIME_LATEST_I2C_SPEED = %d\n",TIME_LATEST_I2C_SPEED); for(int i = 0; i<4; i++) CDMS_RAM[31+i] = TIME_LATEST_SD_WR >> (3-i)*8; + gPC.printf("\r TIME_LATEST_SD_WR= %d\n",TIME_LATEST_SD_WR); for(int i = 0; i<4; i++) CDMS_RAM[35+i] = TIME_LATEST_SD_RD >> (3-i)*8; + gPC.printf("\r TIME_LATEST_SD_RD = %d\n",TIME_LATEST_SD_RD); for(int i = 0; i<4; i++) CDMS_RAM[39+i] = TIME_LATEST_SPI_SPEED >> (3-i)*8; + gPC.printf("\r TIME_LATEST_SPI_SPEED = %d\n",TIME_LATEST_SPI_SPEED); for(int i = 0; i<4; i++) CDMS_RAM[43+i] = FSC_CURRENT[1] >> (3-i)*8; + gPC.printf("\r FSC_CURRENT[1] = %d\n",FSC_CURRENT[1]); for(int i = 0; i<4; i++) CDMS_RAM[47+i] = FSC_LAST[1] >> (3-i)*8; + gPC.printf("\r FSC_LAST[1] = %d\n",FSC_LAST[1]); for(int i = 0; i<4; i++) CDMS_RAM[51+i] = FSC_CURRENT[2] >> (3-i)*8; for(int i = 0; i<4; i++)