
Repository for CDMS code
Dependencies: SimpleDMA mbed-rtos mbed eeprom
Fork of COM_MNG_TMTC_SIMPLE by
Revision 94:611c066467a1, committed 2016-01-24
- Comitter:
- ee12b079
- Date:
- Sun Jan 24 13:30:11 2016 +0000
- Parent:
- 93:4d76de54a699
- Child:
- 95:42d6747900cb
- Commit message:
- Compression.h tested, works when flash.h is commented due to ram-size.
Changed in this revision
--- a/COM_MNG_TMTC.h Sun Jan 24 09:30:22 2016 +0000 +++ b/COM_MNG_TMTC.h Sun Jan 24 13:30:11 2016 +0000 @@ -12,7 +12,7 @@ #include "pinconfig.h" #include "i2c.h" -#include "Flash.h" +//#include "Flash.h" #include "cdms_rtc.h" DigitalIn tm_status_4m_slv(PIN39); //I2C interrupt to CDMS from BAE @@ -484,8 +484,8 @@ //printf("sub_service:Read from RAM_Memory\r\n"); mid=(uint16_t)(tc_ptr->TC_string[3]<<4)+(uint16_t)(tc_ptr->TC_string[4]); - Data[0] = FCTN_CDMS_RD_FLASH(0); - Data[1] = FCTN_CDMS_RD_FLASH(1); + //Data[0] = FCTN_CDMS_RD_FLASH(0); + //Data[1] = FCTN_CDMS_RD_FLASH(1); //tm_pointer = new Long_tm; tm_pointer->TM_string[0] = 0x30; tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); @@ -508,8 +508,8 @@ //printf("sub_service:Read from Flash_Memory\r\n"); mid=(uint16_t)(tc_ptr->TC_string[3]<<4)+(uint16_t)(tc_ptr->TC_string[4]); - Data[0] = FCTN_CDMS_RD_FLASH(0); - Data[1] = FCTN_CDMS_RD_FLASH(1); + //Data[0] = FCTN_CDMS_RD_FLASH(0); + //Data[1] = FCTN_CDMS_RD_FLASH(1); //tm_pointer = new Long_tm; tm_pointer->TM_string[0] = 0x30; tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr); @@ -532,7 +532,7 @@ //printf("WRITE ON FLASH_MEMORY\r\n"); mid=(uint16_t)(tc_ptr->TC_string[3]<<4)+(uint16_t)(tc_ptr->TC_string[4]); block = (((uint32_t)(tc_ptr->TC_string[5])<<24)|((uint32_t)(tc_ptr->TC_string[5])<<16)|((uint32_t)(tc_ptr->TC_string[5])<<8)|((uint32_t)(tc_ptr->TC_string[5]))); - FCTN_CDMS_WR_FLASH(mid,block); + //FCTN_CDMS_WR_FLASH(mid,block); //tm_pointer = new Short_tm; tm_pointer->TM_string[0] = 0xB0; tm_pointer->TM_string[1] = GETpacket_seq_count(tc_ptr);
--- a/Compression.h Sun Jan 24 09:30:22 2016 +0000 +++ b/Compression.h Sun Jan 24 13:30:11 2016 +0000 @@ -273,7 +273,7 @@ space = adjust(1,0,pointer,8); space = adjust(4,3,pointer,space); FSC_science = FCTN_SD_MNGR(3); - gPC.printf("SID = 3, FSC = %02X", FSC_science); + gPC.printf("SID = 3, FSC = %02X\r\n", FSC_science); frames[id][1] = (FSC_science>>24)&0xff; frames[id][2] = (FSC_science>>16)&0xff; frames[id][3] = (FSC_science>>8)&0xff; @@ -287,7 +287,7 @@ space = adjust(1,0,pointer,8); space = adjust(4,2,pointer,space); FSC_science = FCTN_SD_MNGR(2); - gPC.printf("SID = 2, FSC = %02X", FSC_science); + gPC.printf("SID = 2, FSC = %02X\r\n", FSC_science); frames[id][1] = (FSC_science>>16)&0xff; frames[id][2] = (FSC_science>>8)&0xff; frames[id][3] = FSC_science&0xff; @@ -551,7 +551,7 @@ space = adjust(1,0,pointer,8); space = adjust(4,1,pointer,space); FSC_science = FCTN_SD_MNGR(1); - gPC.printf("SID = 1, FSC = %02X", FSC_science); + gPC.printf("SID = 1, FSC = %02X\r\n", FSC_science); frames[id][1] = (FSC_science>>16)&0xff; frames[id][2] = (FSC_science>>8)&0xff; frames[id][3] = (FSC_science)&0xff;
--- a/ThreadsAndFunctions.h Sun Jan 24 09:30:22 2016 +0000 +++ b/ThreadsAndFunctions.h Sun Jan 24 13:30:11 2016 +0000 @@ -274,8 +274,11 @@ void SCIENCE_FUN(void const *args){ uint8_t *ptr; - ptr = payload_data+3; + gPC.puts("haha\r\n"); + ptr = &(payload_data[3]); + gPC.puts("haha2\r\n"); int counter = 0; + gPC.puts("haha3\r\n"); payload_data[2] = 0;//for mode for(int i = 0; i<60 ;i++){ //for mode 0.....callibra for(int j= 0; j<48; j++){ //2 byte values @@ -287,8 +290,12 @@ ptr = ptr+112; counter = 0; } + srp(payload_data); - srp(payload_data); + gPC.puts("data given to payload"); + while(true){ + gSCIENCE_THREAD->wait(osWaitForever); + } // while(true){ // gSCIENCE_THREAD->signal_wait(SCIENCE_SIGNAL); // srp(payload_data);
--- a/main.cpp Sun Jan 24 09:30:22 2016 +0000 +++ b/main.cpp Sun Jan 24 13:30:11 2016 +0000 @@ -61,10 +61,15 @@ // COM_MNG_TMTC THREAD gCOM_MNG_TMTC_THREAD = new Thread(COM_MNG_TMTC_FUN); gCOM_MNG_TMTC_THREAD->set_priority(osPriorityAboveNormal); + gPC.puts("allocating threads\r\n"); gSCIENCE_THREAD = new Thread(SCIENCE_FUN); - gSCIENCE_THREAD->set_priority(osPriorityBelowNormal); + // gPC.puts("step one complete\r\n"); + gSCIENCE_THREAD->set_priority(osPriorityAboveNormal); + gPC.puts("competed allocating threads\r\n"); // *******************INITIALISATIONS END******************** + /*Calculating Stack used*/ + int theAcount = 0; while(true){ Thread::wait(osWaitForever);