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 by
Revision 244:cf5b95f5d499, committed 2016-07-10
- Comitter:
- ee12b079
- Date:
- Sun Jul 10 12:31:49 2016 +0000
- Parent:
- 242:4a78c173060b
- Commit message:
- Working for BYPASS_RX1M_USE_ADF
Changed in this revision
--- a/COM_MNG_TMTC.h Fri Jul 08 12:18:41 2016 +0000
+++ b/COM_MNG_TMTC.h Sun Jul 10 12:31:49 2016 +0000
@@ -16,26 +16,6 @@
//DigitalIn tm_status_4m_pl(PIN61); //I2C interrupt to CDMS from PL
#define RESET_CDMS NVIC_SystemReset()
-#define BAE_TC{\
- tc_ptr->next_TC = NULL;\
- PUTshort_or_long(tc_ptr,SHORT_TC_CODE);\
- PUTcrc_pass(tc_ptr,0x1);\
- PUTexec_status(tc_ptr,0);\
- tc_ptr->TC_string[0] = 0x01;\
- tc_ptr->TC_string[1] = 0x60;\
- tc_ptr->TC_string[2] = 0x81;\
- tc_ptr->TC_string[3] = 0x21;\
- tc_ptr->TC_string[4] = 0x00;\
- tc_ptr->TC_string[5] = 0;\
- tc_ptr->TC_string[6] = 0;\
- tc_ptr->TC_string[7] = 0;\
- tc_ptr->TC_string[8] = 0;\
- uint16_t crc16 = crc16_gen(tc_ptr->TC_string, 9);\
- tc_ptr->TC_string[9] = (crc16 & 0xFF00)>>8;\
- tc_ptr->TC_string[10] = (crc16 & 0x00FF);\
-}
-
-
uint8_t received = 0;
uint16_t mid1;
uint16_t mid2;
@@ -378,7 +358,6 @@
case 1: //apid=01 implies it corresponds to bae
{
BAE_I2C_mutex.lock();
- BAE_TC;
gPC.printf("Telecommand is for BAE\r\n");
gPC.printf("Sending TC to BAE...\r\n"); //interrupt to be sent to the bae
y = FCTN_I2C_WRITE((char*)tc_ptr->TC_string,TC_LONG_SIZE); // Check for SHORT and LONG TC and then send
--- a/DefinitionsAndGlobals.h Fri Jul 08 12:18:41 2016 +0000
+++ b/DefinitionsAndGlobals.h Sun Jul 10 12:31:49 2016 +0000
@@ -1,6 +1,6 @@
// **************DEFINITIONS*********************
-#define bypass_adf 1
+#define bypass_adf 0
// COM_RX
#define RX_TIMEOUT_LIMIT 0.5
--- a/adf.h Fri Jul 08 12:18:41 2016 +0000
+++ b/adf.h Sun Jul 10 12:31:49 2016 +0000
@@ -388,9 +388,9 @@
#define check {\
check_status;\
- gPC.printf("I 0x%X\r\n",(int)status);\
+ /*gPC.printf("I 0x%X\r\n",(int)status);*/\
if(IRQ || bypass_adf){\
- gPC.printf("det\r\n");\
+ /*gPC.printf("det\r\n");*/\
if(!ADF_off) {\
if(finish_write_data) {\
write_data;\
--- a/main.cpp Fri Jul 08 12:18:41 2016 +0000
+++ b/main.cpp Sun Jul 10 12:31:49 2016 +0000
@@ -107,7 +107,7 @@
// DEBUG
//gPC.puts("welcome to mng_tm_tc\r\n");
- gPC.baud(57600);//changed for bypassing COM
+ gPC.baud(115200);//changed for bypassing COM
// COMMON SPI
spi.format(8,0);
@@ -119,11 +119,11 @@
gCS_ADF = 1;
FCTN_CDMS_INIT_RTC();/* rtc initialization*/
- //FCTN_CDMS_SD_INIT();/* sd card initialization*/
+ FCTN_CDMS_SD_INIT();/* sd card initialization*/
- //uint8_t test[512] = {0};
- //disk_write(test,7000); //to be used only just before launch
+ uint8_t test[512] = {0};
+ disk_write(test,7000); //to be used only just before launch
#if DEBUG
gPC.puts("welcome to mng_tmtc\r\n");
@@ -132,7 +132,7 @@
// COM_MNG_TMTC THREAD
- /*gCOM_MNG_TMTC_THREAD = new Thread(COM_MNG_TMTC_FUN);
+ gCOM_MNG_TMTC_THREAD = new Thread(COM_MNG_TMTC_FUN);
gCOM_MNG_TMTC_THREAD->set_priority(osPriorityHigh);
#if DEBUG
gPC.puts("allocating threads\r\n");
@@ -142,7 +142,7 @@
gSCIENCE_THREAD->set_priority(osPriorityAboveNormal);
#if DEBUG
gPC.puts("competed allocating threads\r\n");
- #endif*/
+ #endif
master.frequency(400000);
@@ -167,11 +167,11 @@
//RtosTimer gCDMS_HK_TIMER(FCTN_CDMS_HK_MAIN, osTimerPeriodic);
//gCDMS_HK_TIMER.start(5000);
- test_pl_main();
+ /*test_pl_main();
RtosTimer gCDMS_PL_TIMER(FCTN_CDMS_PL_MAIN, osTimerPeriodic);
gCDMS_PL_TIMER.start(10000);
-
+ */
/*starting the thread with signal*/
//set_sig();
//payload_isr_fun();
