test this

Dependencies:   FreescaleIAP mbed-rtos mbed

Fork of CDMS_DEC_2015 by Pradeep Kotipalli

Files at this revision

API Documentation at this revision

Comitter:
pradeepvk2208
Date:
Fri Jan 22 18:07:48 2016 +0000
Parent:
1:ad3b8a8032e2
Commit message:
test this code

Changed in this revision

CDMS_HK.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r ad3b8a8032e2 -r 2565deafb176 CDMS_HK.cpp
--- a/CDMS_HK.cpp	Thu Jan 21 14:46:28 2016 +0000
+++ b/CDMS_HK.cpp	Fri Jan 22 18:07:48 2016 +0000
@@ -42,7 +42,11 @@
         uint64_t time=FCTN_CDMS_RD_RTC();
         char tree[61];
         hk_cdms.printf("i am done\r\n");
-        uint8_t* data;
+        uint8_t data[512];
+        for(int i=0;i<512;i++)
+        {
+            data[i]=0x00;
+        }
         tree[0]=(char)(time>>(56))&(0xFF);
         tree[1]=(char)(time>>(48))&(0xFF);
         tree[2]=(char)(time>>(40))&(0xFF);
@@ -56,8 +60,14 @@
             tree[i+8]=BAE_HK[i];
         }
         printf("Hope u r alive \r\n");
-       data=(uint8_t*)tree;
-        
+        for(int i=0;i<81;i++)
+        {
+            data[i]=(uint8_t)tree[i];
+        }
+        for(int i=0;i<512;i++)
+        {
+            printf("%d",data[i]);
+        }
         uint8_t fsc=FCTN_SD_MNGR(0x3);
         printf("FSC where SD is written is %d\r\n",fsc);
         int a=SD_WRITE(data,0x00000012,0x3);