To fix the hang problem
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Flash.h
- Committer:
- chaithanyarss
- Date:
- 2016-07-08
- Revision:
- 248:407ab7e337cd
- Parent:
- 52:0bd68655c651
- Child:
- 249:1560c64adffb
File content as of revision 248:407ab7e337cd:
#include "FreescaleIAP.h" int strt_add = flash_size() - (2*SECTOR_SIZE); uint32_t flasharray[8]; //256+(3*1024) /*corrected*/ int *nativeflash = (int*)strt_add; /*Writing to the Flash*/ void FCTN_CDMS_WR_FLASH(uint16_t j,uint32_t fdata) //j-position to write address ; fdata - flash data to be written { for(int i=0;i<8;i++) { flasharray[i]=nativeflash[i]; } flasharray[j]=fdata; erase_sector(strt_add); program_flash(strt_add, (char*)flasharray,32); } /*End*/ /*Reading from Flash*/ uint32_t* FCTN_BAE_RD_FLASH() { for(int i=0;i<8;i++) { flasharray[i]=nativeflash[i]; } return flasharray; } /*End*/