Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE_samp_23SEP_DMA_flag by
Revision 276:9e5b0085763d, committed 2016-07-27
- Comitter:
- chaithanyarss
- Date:
- Wed Jul 27 09:54:26 2016 +0000
- Parent:
- 270:9dacc1d8459a
- Commit message:
- some changes..
Changed in this revision
--- a/CDMS_HK.h Thu Jul 21 11:07:04 2016 +0000
+++ b/CDMS_HK.h Wed Jul 27 09:54:26 2016 +0000
@@ -40,12 +40,24 @@
void FCTN_CDMS_HK_MAIN(void const *args)
{
uint8_t sd_stat = 0;
+ uint8_t count;
while(1)
{
gHK_THREAD->signal_wait(HK_SIGNAL);
+ if(count == 1 || count == 2)
+ {
+ FCTN_CDMS_PL_MAIN((void const *)NULL);
+ count--;
+ continue;
+ }
+ else if(count == 0)
+ {
+ FCTN_CDMS_PL_MAIN((void const *)NULL);
+ count = 2;
+ }
gPC.printf("\n\nEntering HK thread\n");
- if(EN_HK == 0x00)
+ if(EN_CDMS_HK == 0x00)
continue;
gMutex.lock();
CDMS_HK_MAIN_STATUS = 0x01;
@@ -56,7 +68,7 @@
VERIFY_COMRX();
VERIFY_RTC();
HANDLE_HW_FAULTS();
- FUNC_CDMS_GPIO_STATUS(); //yet to be done
+ FUNC_CDMS_GPIO_STATUS();
uint8_t CDMS_quant[20];
CDMS_quant[1]= (uint8_t)quant_data.CDMS_temp_quant;
@@ -74,7 +86,25 @@
for(int i = 0;i<20;i++) //Collecting Data from Temp sensors
CDMS_HEALTH_DATA[86+i] = CDMS_quant[i];
- // Here: Have to FIT flash data.
+ // Here: Have to FIT flash data.
+ CDMS_HEALTH_DATA[106] = (EPS_V_A_EN_STATUS<<7) | ((BAE_SW_STATUS<<5)&0x60) | ((CDMS_SD_SW_STATUS<<3)&0x18) | ((PL_BEE_SW_STATUS<<1)&0x06) | (PL_EPS_LATCH_SW_EN & 0x01);
+ CDMS_HEALTH_DATA[107] = (RTC_INIT_STATUS<<6) | ((CDMS_RTC_DISABLE<<5)&0x20);
+ CDMS_HEALTH_DATA[108] = CDMS_RESET_COUNTER >>8;
+ CDMS_HEALTH_DATA[109] = CDMS_RESET_COUNTER;
+ CDMS_HEALTH_DATA[110] = TIME_LATEST_CDSMS_RESET >>24;
+ CDMS_HEALTH_DATA[111] = TIME_LATEST_CDSMS_RESET >>16;
+ CDMS_HEALTH_DATA[112] = TIME_LATEST_CDSMS_RESET >>8;
+ CDMS_HEALTH_DATA[113] = TIME_LATEST_CDSMS_RESET;
+ CDMS_HEALTH_DATA[114] = COM_TC_BYTES_LIMIT>>8;
+ CDMS_HEALTH_DATA[115] = COM_TC_BYTES_LIMIT;
+ CDMS_HEALTH_DATA[116] = COM_RX_CURRENT_MAX;
+ CDMS_HEALTH_DATA[117] = COM_RX_DISABLE_TIMEOUT;
+ CDMS_HEALTH_DATA[118] = COM_PA_TMP_HIGH;
+ CDMS_HEALTH_DATA[119] = COM_PA_RECOVERY_TIMEOUT;
+ CDMS_HEALTH_DATA[120] = COM_SESSION_TIMEOUT;
+ CDMS_HEALTH_DATA[121] = COM_RSSI_MIN;
+ CDMS_HEALTH_DATA[122] = SD_LIB_BLK_CURRENT>>8;
+ CDMS_HEALTH_DATA[122] = SD_LIB_BLK_CURRENT;
uint64_t time = FCTN_CDMS_RD_RTC() >> 7; //Reading Time from RTC
for(int i = 124; i<128; i++)
@@ -167,7 +197,7 @@
beacon_array[8] = RTC_FAULTCOUNT >> 8;
beacon_array[9] = RTC_FAULTCOUNT;
beacon_array[10] = (((SD_STATUS == DEVICE_DISABLED || SD_STATUS == DEVICE_OC_FAULT)?1:0)<<7)|(RTC_STATUS <<6)|(COM_RX_STATUS<<3)|(V_C_PGOOD<<2)|(COMRX_OC_FAULT<<1)|(COMTX_OC_FAULT);
- beacon_array[11] = (EPS_V_C_EN_STATUS <<7)|(EPS_V_D_EN_STATUS);
+ beacon_array[11] = (EPS_V_C_EN_STATUS <<7)|(COM_TX_CNTRL);
beacon_array[12] = CDMS_HK_MAIN_COUNTER >>8;
beacon_array[13] = CDMS_HK_MAIN_COUNTER;
beacon_array[14] = PL_MAIN_COUNTER >>8;
@@ -321,7 +351,7 @@
//EPS_V_C_EN_STATUS
GPIO_STATUS=(EPS_V_C_EN_STATUS)?(GPIO_STATUS)||((uint16_t)(0x1<<3)):(GPIO_STATUS)&(~((uint16_t)(0x1<<3)));
//EPS_V_D_EN_STATUS
- GPIO_STATUS=(EPS_V_D_EN_STATUS)?(GPIO_STATUS)||((uint16_t)(0x1<<2)):(GPIO_STATUS)&(~((uint16_t)(0x1<<2)));
+ GPIO_STATUS=(COM_TX_CNTRL)?(GPIO_STATUS)||((uint16_t)(0x1<<2)):(GPIO_STATUS)&(~((uint16_t)(0x1<<2)));
}
--- a/COM_MNG_TMTC.h Thu Jul 21 11:07:04 2016 +0000
+++ b/COM_MNG_TMTC.h Wed Jul 27 09:54:26 2016 +0000
@@ -880,12 +880,12 @@
else if(GETpid(tc_ptr)==0x40)
{
//gPC.printf("RESET_HK_COUNTER\r\n"); // call PWR_SWCH_ON function
- if(tc_ptr->TC_STRING[4] == 0x00 || tc_ptr->TC_STRING[4] == 0x01)
- EN_PL = tc_ptr->TC_STRING[4];
- else if(tc_ptr->TC_STRING[5] == 0x00 || tc_ptr->TC_STRING[5] == 0x01)
- EN_HK = tc_ptr->TC_STRING[5];
- else if(tc_ptr->TC_STRING[6] == 0x00 || tc_ptr->TC_STRING[6] == 0x01)
- EN_RCV_SC = tc_ptr->TC_STRING[6];
+ if(tc_ptr->TC_string[4] == 0x00 || tc_ptr->TC_string[4] == 0x01)
+ EN_PL = tc_ptr->TC_string[4];
+ else if(tc_ptr->TC_string[5] == 0x00 || tc_ptr->TC_string[5] == 0x01)
+ EN_CDMS_HK = tc_ptr->TC_string[5];
+ else if(tc_ptr->TC_string[6] == 0x00 || tc_ptr->TC_string[6] == 0x01)
+ EN_RCV_SC = tc_ptr->TC_string[6];
Base_tm *tm_ptr_short = new Short_tm;
ACK_L234(tm_ptr_short,0xA0,GETpacket_seq_count(tc_ptr));
return tm_ptr_short;
--- a/DefinitionsAndGlobals.h Thu Jul 21 11:07:04 2016 +0000 +++ b/DefinitionsAndGlobals.h Wed Jul 27 09:54:26 2016 +0000 @@ -287,7 +287,7 @@ DigitalIn PL_BEE_SW_OC_FAULT (PIN91); DigitalIn PL_EPS_LATCH_SW_OC_FAULT (PIN5); DigitalOut EPS_V_C_EN_STATUS (PIN72); -DigitalOut EPS_V_D_EN_STATUS (PIN56); +//DigitalOut EPS_V_D_EN_STATUS (PIN56); DigitalIn SD_OC_FAULT (PIN90); @@ -366,9 +366,4 @@ uint8_t COM_PA_RECOVERY_TIMEOUT; uint8_t COM_SESSION_TIMEOUT; uint8_t COM_RSSI_MIN; -uint16_t SD_LIB_BLK_CURRENT; - -//Enable's -uint8_t EN_PL; -uint8_t EN_HK; -uint8_t EN_RCV_SC; \ No newline at end of file +uint16_t SD_LIB_BLK_CURRENT; \ No newline at end of file
--- a/main.cpp Thu Jul 21 11:07:04 2016 +0000 +++ b/main.cpp Wed Jul 27 09:54:26 2016 +0000 @@ -21,11 +21,11 @@ #include "cdms_sd.h" #include "common_functions.h" #include "RESET_functions.h" +#include "CDMS_PL.h" #include "CDMS_HK.h" #include "adf.h" #include "COM_RCV_TC.h" #include "Flash.h" -#include "CDMS_PL.h" #include "FMS_all.h" #include "Compression.h" #include "COM_MNG_TMTC.h"
