Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos SimpleDMA FreescaleIAP eeprom
Fork of CDMS_CODE_FM_28JAN2017 by
Diff: Flash.h
- Revision:
- 315:f9a30c8cbe96
- Parent:
- 289:9bd62b69874c
- Child:
- 324:c0a5228cc666
--- a/Flash.h Wed Dec 07 06:38:22 2016 +0000
+++ b/Flash.h Thu Dec 08 10:12:15 2016 +0000
@@ -7,47 +7,50 @@
int strt_add = flash_size() - (2*SECTOR_SIZE);
uint32_t flasharray[32]; //256+(3*1024)
uint32_t INITIAL_FLASH[32];
+
/*corrected*/
int *nativeflash = (int*)strt_add;
void FLASH_INI()
{
+ INITIAL_FLASH[16] = 8000;
uint32_t read[32];
for(int i=0;i<32;i++)
- {
- read[i] = nativeflash[i];
- }
+ {
+ read[i] = nativeflash[i];
+ }
if(read[0] == -1)
+ {
for(int j=0;j<32;j++)
- {
- FCTN_CDMS_WR_FLASH(j,INITIAL_FLASH[j]);
- }
+ {
+ FCTN_CDMS_WR_FLASH(j,INITIAL_FLASH[j]);
+ }
+ }
else
- {
+ {
for(int j=0;j<32;j++)
- {
- read[j] = nativeflash[j];
- }
- EPS_V_A_EN_STATUS = read[0];
- BAE_STATUS = read[1];
- SD_STATUS = read[2];
- PL_STATUS = read[3];
- PL_EPS_LATCH_SW_EN = read[4];
- RTC_INIT_STATUS = read[5];
- CDMS_RTC_DISABLE = read[6];
- CDMS_RESET_COUNTER = read[7];
- TIME_LATEST_CDSMS_RESET = read[8];
- COM_TC_BYTES_LIMIT = read[9];
- COM_RX_CURRENT_MAX = read[10];
- COM_RX_DISABLE_TIMEOUT = read[11];
- COM_PA_TMP_HIGH = read[12];
- COM_PA_RECOVERY_TIMEOUT = read[13];
- COM_SESSION_TIMEOUT = read[14];
- COM_RSSI_MIN = read[15];
- SD_LIB_BLK_CURRENT = read[16];
+ {
+ read[j] = nativeflash[j];
}
-
+ }
+ EPS_V_A_EN_STATUS = read[0];
+ BAE_STATUS = read[1];
+ SD_STATUS = read[2];
+ PL_STATUS = read[3];
+ PL_EPS_LATCH_SW_EN = read[4];
+ RTC_INIT_STATUS = read[5];
+ CDMS_RTC_DISABLE = read[6];
+ CDMS_RESET_COUNTER = read[7];
+ TIME_LATEST_CDSMS_RESET = read[8];
+ COM_TC_BYTES_LIMIT = read[9];
+ COM_RX_CURRENT_MAX = read[10];
+ COM_RX_DISABLE_TIMEOUT = read[11];
+ COM_PA_TMP_HIGH = read[12];
+ COM_PA_RECOVERY_TIMEOUT = read[13];
+ COM_SESSION_TIMEOUT = read[14];
+ COM_RSSI_MIN = read[15];
+ SD_LIB_BLK_CURRENT = read[16];
}
/*Writing to the Flash*/
