3.15.21 diag_flash_crc32.h File Reference

This file contains prototypes for APIs to calculate, store and validate 32-bit CRC for a given FLASH region.

Includes

  1. diag_memory_types.h

Functions

Table 3-45. diag_crc_status_tDIAG_FLASH_CalculateStoreCRC32 (uint16_t startAddress, uint16_t length, uint16_t storeAddress)
Parameters

[in] startAddress

uint16_t

- starting address of FLASH memory region to be considered for CRC

[in] length

uint16_t

- number of bytes from startAddress to be considered for CRC

[in] storeAddress

uint16_t

- the FLASH address where calculated CRC will be stored

Returns
diag_crc_status_t CRC_OK, CRC_ERROR, CRC_INVALID_ADDRESS, CRC_INVALID_LENGTH
Table 3-46. diag_crc_status_tDIAG_FLASH_ValidateCRC32 (uint16_t startAddress, uint16_t length, uint16_t refAddress)
Parameters

[in] startAddress

uint16_t

- starting address of FLASH memory region to be considered for CRC

[in] length

uint16_t

- number of bytes from startAddress to be considered for CRC

[in] refAddress

uint16_t

- the FLASH address where reference CRC is available

Returns
diag_crc_status_t CRC_OK, CRC_ERROR, CRC_INVALID_ADDRESS, CRC_INVALID_LENGTH