DMA issue to be tested

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE by shubham c

Files at this revision

API Documentation at this revision

Comitter:
ee12b079
Date:
Sun Sep 04 11:12:00 2016 +0000
Parent:
300:609c3e4240c9
Child:
303:b49b486a7107
Commit message:
Correcting CDMS_HK

Changed in this revision

CDMS_HK.h Show annotated file Show diff for this revision Revisions of this file
FMS_all.h Show annotated file Show diff for this revision Revisions of this file
OBSRS.h Show annotated file Show diff for this revision Revisions of this file
cdms_rtc.h Show annotated file Show diff for this revision Revisions of this file
--- a/CDMS_HK.h	Sat Sep 03 16:44:56 2016 +0000
+++ b/CDMS_HK.h	Sun Sep 04 11:12:00 2016 +0000
@@ -66,6 +66,7 @@
 
     FCTN_CDMS_HK();//collects temperatures
     RSSI_volatge = COMRX_RSSI_volatge.read() * 3.3;//to be checked
+    gPC.printf("\n%f\n",RSSI_volatge);
     VERIFY_COMRX();
     VERIFY_RTC();
     HANDLE_HW_FAULTS();
@@ -519,36 +520,37 @@
     CDMS_RAM[17] = SD_LIB_WRITES >> 8;
     CDMS_RAM[18] = SD_LIB_WRITES;
     for(int i = 0; i<4; i++)
-        CDMS_RAM[19+i] = TIME_LATEST_RTC >> i*8;
+        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 >> i*8;
+        CDMS_RAM[23+i] = TIME_LATEST_I2C_BAE >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[27+i] = TIME_LATEST_I2C_SPEED >> i*8;
+        CDMS_RAM[27+i] = TIME_LATEST_I2C_SPEED >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[31+i] = TIME_LATEST_SD_WR >> i*8;
+        CDMS_RAM[31+i] = TIME_LATEST_SD_WR >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[35+i] = TIME_LATEST_SD_RD >> i*8;
+        CDMS_RAM[35+i] = TIME_LATEST_SD_RD >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[39+i] = TIME_LATEST_SPI_SPEED >> i*8;
+        CDMS_RAM[39+i] = TIME_LATEST_SPI_SPEED >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[43+i] = FSC_CURRENT[1] >> i*8;
+        CDMS_RAM[43+i] = FSC_CURRENT[1] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[47+i] = FSC_LAST[1] >> i*8;
+        CDMS_RAM[47+i] = FSC_LAST[1] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[51+i] = FSC_CURRENT[2] >> i*8;
+        CDMS_RAM[51+i] = FSC_CURRENT[2] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[55+i] = FSC_LAST[2] >> i*8;
+        CDMS_RAM[55+i] = FSC_LAST[2] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[59+i] = FSC_CURRENT[3] >> i*8;
+        CDMS_RAM[59+i] = FSC_CURRENT[3] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[63+i] = FSC_LAST[3] >> i*8;
+        CDMS_RAM[63+i] = FSC_LAST[3] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[67+i] = FSC_CURRENT[4] >> i*8;
+        CDMS_RAM[67+i] = FSC_CURRENT[4] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[71+i] = FSC_LAST[4] >> i*8;
+        CDMS_RAM[71+i] = FSC_LAST[4] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[75+i] = FSC_CURRENT[5] >> i*8;
+        CDMS_RAM[75+i] = FSC_CURRENT[5] >> ((3-i)*8);
     for(int i = 0; i<4; i++)
-        CDMS_RAM[79+i] = FSC_LAST[5] >> i*8;
+        CDMS_RAM[79+i] = FSC_LAST[5] >> ((3-i)*8);
     CDMS_RAM[83] = 0x00;
+    gPC.printf("%d %d %d %d %d\n",FSC_CURRENT[1],FSC_CURRENT[2],FSC_CURRENT[3],FSC_CURRENT[4],FSC_CURRENT[5]);
 }
\ No newline at end of file
--- a/FMS_all.h	Sat Sep 03 16:44:56 2016 +0000
+++ b/FMS_all.h	Sun Sep 04 11:12:00 2016 +0000
@@ -338,6 +338,6 @@
 
 void FCTN_CDMS_RD_L_RAM(Base_tm *tm_pointer)
 {
-    for(int i=4;i<132;i++)
-    tm_pointer->TM_string[i] = CDMS_HK_FRAME[i-4];
+    for(int i=0;i<128;i++)
+    tm_pointer->TM_string[i+4] = CDMS_HEALTH_DATA[i];
 }
\ No newline at end of file
--- a/OBSRS.h	Sat Sep 03 16:44:56 2016 +0000
+++ b/OBSRS.h	Sun Sep 04 11:12:00 2016 +0000
@@ -672,6 +672,7 @@
     
     gPC.printf("sid = %u \r\n",SID);
     gPC.printf("FSC = %u\r\n",FSC);
+    gPC.printf("no_of_frames = %u\r\n",no_of_frames);
 //    gPC.puts("exit_sdcard");
     
 //    SID = 0x1;
--- a/cdms_rtc.h	Sat Sep 03 16:44:56 2016 +0000
+++ b/cdms_rtc.h	Sun Sep 04 11:12:00 2016 +0000
@@ -79,6 +79,8 @@
     spi.write(0x00); //set year to 00(2000)
     gCS_RTC=1;
     gPC.puts("\n\r rtc initalised \n");
+    RTC_INIT_STATUS = 1;
+    FCTN_CDMS_WR_FLASH(5,1);
     SPI_mutex.unlock();
 }