2.1.3.1 DIAG_FLASH_CalculateStoreCRC()
diag_result_t DIAG_FLASH_CalculateStoreCRC (flash_address_t startAddress, uint32_t length, flash_address_t storeAddress)
Calculates the 16-bit CRC for a given Flash memory region and stores it at the FLASH address indicated by storeAddress argument.
in | startAddress |
- Starting address of Flash memory region to be considered for CRC |
in | length |
- Number of bytes from startAddress to be considered for CRC |
in | storeAddress |
- The Flash address where calculated CRC will be stored |
DIAG_PASS - CRC for given flash region is calculated and stored successfully DIAG_INVALID_ARG - An invalid argument is passed to the function DIAG_NVM_STORE_ERROR - An error occurred while storing the calculated CRC in Flash |