
FM
Dependencies: SimpleDMA eeprom mbed-rtos mbed FreescaleIAP
Fork of CDMS_CODE by
Revision 325:d375c11595be, committed 2016-12-10
- Comitter:
- chaithanyarss
- Date:
- Sat Dec 10 14:48:07 2016 +0000
- Parent:
- 324:c0a5228cc666
- Child:
- 326:e424f70b86c0
- Commit message:
- Added *verify_flash_sector* function is added in Flash.h file
Changed in this revision
COM_MNG_TMTC.h | Show annotated file Show diff for this revision Revisions of this file |
Flash.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/COM_MNG_TMTC.h Sat Dec 10 13:39:35 2016 +0000 +++ b/COM_MNG_TMTC.h Sat Dec 10 14:48:07 2016 +0000 @@ -484,6 +484,7 @@ flasharray_thres[z] = scp_threshold_m0[z+8]; erase_sector(strt_add_thres); program_flash(strt_add_thres, (char*)flasharray_thres,32); + Base_tm *tm_ptr_short = new Short_tm; ACK_L234(tm_ptr_short,0xA0,GETpacket_seq_count(tc_ptr)); return tm_ptr_short;
--- a/Flash.h Sat Dec 10 13:39:35 2016 +0000 +++ b/Flash.h Sat Dec 10 14:48:07 2016 +0000 @@ -93,4 +93,21 @@ { FCTN_CDMS_WR_FLASH(6,datablock & 0x00000001); } +} + +int verify_flash_sector(int mid,uint32_t* flasharray_thres) +{ + int add = strt_add_thres + ((mid-1)*SECTOR_SIZE); + int result = 0; + int* testfalsh = (int*)add; + for(int i=0;i<32;i++) + { + if(testflash[i] == flasharray_thres[i]) + continue; + else + { + return 1; + } + } + return 0; } \ No newline at end of file