2.2.3.2 DIAG_FLASH_ValidateCRC()

diag_result_t DIAG_FLASH_ValidateCRC (flash_address_t startAddress, uint32_t length, flash_address_t refAddress)

Validates the CRC of a given Flash memory region by recalculating and comparing it with the reference CRC stored by DIAG_FLASH_CalculateStoreCRC.

Parameters:
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 refAddress

The FLASH address where reference CRC is available

Returns:

DIAG_PASS - CRC validation for given flash region is successful

DIAG_FAIL - CRC validation for given flash region is unsuccessful

DIAG_INVALID_ARG - An invalid argument is passed to the function

Parameters:
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 refAddress

- The Flash address where reference CRC is available

Returns:

DIAG_PASS - CRC validation for given flash region is successful  

DIAG_FAIL - CRC validation for given flash region is unsuccessful  

DIAG_INVALID_ARG - An invalid argument is passed to the function