Index: NVDataMgmt.c =================================================================== diff -u -r5010eb0fe6fb79f67dfa73ae40331d61cd80f17b -ra6005795af5d50ce9248d2801673e16a2fad0001 --- NVDataMgmt.c (.../NVDataMgmt.c) (revision 5010eb0fe6fb79f67dfa73ae40331d61cd80f17b) +++ NVDataMgmt.c (.../NVDataMgmt.c) (revision a6005795af5d50ce9248d2801673e16a2fad0001) @@ -428,8 +428,6 @@ static U32 currentTime = 0; ///< Current time. static volatile BOOL powerOffIsImminent = FALSE; ///< Power off warning has been signaled. Non-volatile memory operations should be completed ASAP and then ceased. -static U32 tempTest; //TODO remove for operations time measurements - // Private functions static NVDATAMGMT_SELF_TEST_STATE_T handleSelfTestStart ( void ); static NVDATAMGMT_SELF_TEST_STATE_T handleSelfTestReadCalibrationRecord ( void ); @@ -1913,6 +1911,7 @@ #ifndef DISABLE_CAL_CHECK // Check the integrity of the records as a whole. Check the upper layer CRC haveRecordsPassed = areRecordsValid(); +#endif #ifdef _DG_ // Check all the calibration groups @@ -1921,7 +1920,6 @@ #ifdef _HD_ haveCalGroupsPassed = isHDCalibrationRecordValid(); #endif -#endif // If any of the records did not pass, they should be filled // with benign values. After that, schedule a write to sector 0 @@ -1955,8 +1953,7 @@ { NVDATAMGMT_EXEC_STATE_T state = NVDATAMGMT_EXEC_STATE_WAIT_FOR_POST; - // TODO enable this line - //if ( nvDataMgmtSelfTestState == NVDATAMGMT_SELF_TEST_STATE_COMPLETE ) + if ( nvDataMgmtSelfTestState == NVDATAMGMT_SELF_TEST_STATE_COMPLETE ) { state = NVDATAMGMT_EXEC_STATE_IDLE; } @@ -2021,7 +2018,6 @@ { if ( ops == NVDATAMGMT_ERASE_SECTOR ) { - tempTest = getMSTimerCount(); Fapi_issueAsyncCommandWithAddress ( Fapi_EraseSector, (U32*)startAddress ); state = NVDATAMGMT_EXEC_STATE_ERASE_EEPROM; } @@ -2098,7 +2094,6 @@ // If the data is valid, and if it is at the end of the write, change to idle if ( jobSpecs.sizeofJob == recordAddressOffset ) { - U32 getValue = calcTimeSince( tempTest ); // TODO remove state = NVDATAMGMT_EXEC_STATE_IDLE; } else @@ -2895,8 +2890,10 @@ // regardless of the rest of the results if ( calcCRC != recordCRC ) { - //SET_ALARM_WITH_1_U32_DATA( ALARM_ID_NVDATAMGMT_GROUP_RECORD_CRC_INVALID, i ); +#ifndef DISABLE_CAL_CHECK + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_NVDATAMGMT_GROUP_RECORD_CRC_INVALID, i ); status = FALSE; +#endif } }