Index: firmware/App/Services/NVMgmtDD.c =================================================================== diff -u -r43e60a63eae841e599ff9106f43177a8f63d22be -ra68c7679e493224bd41df72321d4c2537207234f --- firmware/App/Services/NVMgmtDD.c (.../NVMgmtDD.c) (revision 43e60a63eae841e599ff9106f43177a8f63d22be) +++ firmware/App/Services/NVMgmtDD.c (.../NVMgmtDD.c) (revision a68c7679e493224bd41df72321d4c2537207234f) @@ -152,7 +152,7 @@ NVDATAMGMT_EXEC_STATE_T state = NVDATAMGMT_EXEC_STATE_IDLE; BOOL areQueuesNotEmpty = FALSE; NVDATAMGMT_OPERATION_STATE_T ops; - U32 startAddress; + U32 recordFlashAddress; U08* bufferAddress; PROCESS_RECORD_JOB_T recordCurrentJob; RECORD_JOBS_STATE_T job; @@ -173,7 +173,7 @@ areQueuesNotEmpty = TRUE; ops = recordCurrentJob.memoryOperation; currentTime = getMSTimerCount(); - startAddress = jobSpecs.startAddress + recordAddressOffset; + recordFlashAddress = jobSpecs.recordFlashAddress + recordAddressOffset; bufferAddress = jobSpecs.structAddressPtr + recordAddressOffset; } } @@ -184,18 +184,18 @@ switch ( ops ) { case NVDATAMGMT_ERASE_SECTOR: - eraseSector( (U32*)startAddress ); + eraseSector( (U32*)recordFlashAddress ); state = NVDATAMGMT_EXEC_STATE_ERASE_EEPROM; break; case NVDATAMGMT_WRITE: - writeSector( (U32*)startAddress, (U08*)bufferAddress, jobSpecs.maxWriteBufferSize ); + writeSector( (U32*)recordFlashAddress, (U08*)bufferAddress, jobSpecs.maxWriteBufferSize ); currentTime = getMSTimerCount(); state = NVDATAMGMT_EXEC_STATE_WRITE_TO_EEPROM; break; case NVDATAMGMT_READ: - readSector( (U32*)startAddress, (U32*)bufferAddress, ( jobSpecs.maxReadBufferSize / EEPROM_OPS_SIZE_OF_CONVERTER ) ); + readSector( (U32*)recordFlashAddress, (U32*)bufferAddress, ( jobSpecs.maxReadBufferSize / EEPROM_OPS_SIZE_OF_CONVERTER ) ); currentTime = getMSTimerCount(); state = NVDATAMGMT_EXEC_STATE_READ_FROM_EEPROM; break; @@ -265,14 +265,14 @@ if ( writtenRecordStatus == NVDATAMGMT_RECORD_NOT_CHECKED ) { currentTime = getMSTimerCount(); - U32 startAddress = jobSpecs.startAddress + recordAddressOffset; + U32 recordFlashAddress = jobSpecs.recordFlashAddress + recordAddressOffset; U32 maxBufferLength = jobSpecs.maxWriteBufferSize / EEPROM_OPS_SIZE_OF_CONVERTER; // Clear the buffer from the previous content memset( writtenRecordCheckBuffer, 0, sizeof( writtenRecordCheckBuffer ) ); // Issue a FAPI read command but only the bytes that were written, so use maxWriteBufferSize - readSector( (U32*)startAddress, (U32*)writtenRecordCheckBuffer, maxBufferLength ); + readSector( (U32*)recordFlashAddress, (U32*)writtenRecordCheckBuffer, maxBufferLength ); state = NVDATAMGMT_EXEC_STATE_VERIFY_EEPROM_WRITE; } @@ -288,7 +288,7 @@ // Update the variables and issue the next write command currentTime = getMSTimerCount(); recordAddressOffset += jobSpecs.maxWriteBufferSize; - U32 memoryPtr = jobSpecs.startAddress + recordAddressOffset; + U32 memoryPtr = jobSpecs.recordFlashAddress + recordAddressOffset; U08* structPtr = jobSpecs.structAddressPtr + recordAddressOffset; writtenRecordStatus = NVDATAMGMT_RECORD_NOT_CHECKED;