4.15.16 diag_eeprom_crc32_direct.c File Reference

This file contains APIs to test EEPROM using CRC32 Direct Computation algorithm.

Includes

  1. diag_eeprom_crc32.h
  2. ../../../diag_common/config/diag_config.h
  3. string.h
  4. xc.h

Functions

Table 4-30. voidDIAG_EEPROM_CalculateCRC32 (uint32_t startAddress, uint32_t length, uint32_t *crcSeed)
Parameters

[in] startAddress

uint32_t

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

[in] length

uint32_t

- number of bytes from startAddress to be considered for CRC

[in, out] crcSeed

uint32_t *

- pointer to initial and final CRC

Returns
void None
Table 4-31. diag_crc_status_tDIAG_EEPROM_CalculateStoreCRC32 (uint32_t startAddress, uint32_t length, uint32_t storeAddress)
Parameters

[in] startAddress

uint32_t

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

[in] length

uint32_t

- number of bytes from startAddress to be considered for CRC

[in] storeAddress

uint32_t

- the EEPROM address where calculated CRC will be stored

Returns
diag_crc_status_t CRC_OK CRC_ERROR CRC_INVALID_ADDRESS CRC_INVALID_LENGTH
Table 4-32. diag_crc_status_tDIAG_EEPROM_ValidateCRC32 (uint32_t startAddress, uint32_t length, uint32_t refAddress)
Parameters

[in] startAddress

uint32_t

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

[in] length

uint32_t

- number of bytes from startAddress to be considered for CRC

[in] refAddress

uint32_t

- the EEPROM address where reference CRC is available

Returns
diag_crc_status_t CRC_OK CRC_ERROR CRC_INVALID_ADDRESS CRC_INVALID_LENGTH