things are working
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of CDMS_DEC_2016_jan by
Diff: CDMS_HK.cpp
- Revision:
- 2:2565deafb176
- Parent:
- 1:ad3b8a8032e2
- Child:
- 3:23cdab96a05d
--- 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);