Index: firmware/App/Services/NVMgmtDD.c =================================================================== diff -u -rb878faee61a0800b767d053ab3f65afb3790dacb -rf525d2be1e7038cacbe2bb34b8db3505cf26a350 --- firmware/App/Services/NVMgmtDD.c (.../NVMgmtDD.c) (revision b878faee61a0800b767d053ab3f65afb3790dacb) +++ firmware/App/Services/NVMgmtDD.c (.../NVMgmtDD.c) (revision f525d2be1e7038cacbe2bb34b8db3505cf26a350) @@ -203,7 +203,6 @@ default: break; } - } // Update Self Test Read Records Flag @@ -347,7 +346,7 @@ RECORD_JOBS_STATE_T job = recordCurrentJob.recordJob; PROCESS_RECORD_SPECS_T jobSpecs = getProcessRecord ( job ); - // Check if the write job is EEPROM or RTC RAM + // Check if the flash is ready if ( TRUE == isFlashReady() ) { U32 i; @@ -360,11 +359,9 @@ // Check if data in the buffer is not the same as the data in the structure if ( writtenRecordCheckBuffer[ i ] != *bufferPtr ) { - // Data is not valid. Schedule an erase and write of the calibration record since only a part of - // data cannot be written to EEPROM. + // Data is not valid. Schedule an erase and write of the record writtenRecordStatus = NVDATAMGMT_RECORD_NOT_VALID; - enqueueRecordJob( NVDATAMGMT_ERASE_SECTOR, NVDATAMGMT_CALIBRATION_RECORD ); - enqueueRecordJob( NVDATAMGMT_WRITE, NVDATAMGMT_CALIBRATION_RECORD ); + enqueueEraseAndWriteSector( job ); state = NVDATAMGMT_EXEC_STATE_IDLE; // Exit the loop since there is no point to check the rest of data break;