This file contains APIs to test FLASH using CRC16 CCITT Look-up Table algorithm.
Includes
- diag_flash_crc16.h
- diag_crc16_lookup_table.h
- string.h
Functions
Table 14-39. voidDIAG_FLASH_CalculateCRC16 (uint32_t startAddress, uint32_t length, uint16_t *crcSeed)
Parameters |
[in] startAddress
|
uint32_t
- starting address of FLASH memory region to be considered for CRC
|
[in] length
|
uint32_t
- number of bytes from startAddress to be considered for CRC
|
[in, out] crcSeed
|
uint16_t *
- pointer to initial and final CRC
|
|
Returns |
|
Table 14-40. diag_crc_status_tDIAG_FLASH_CalculateStoreCRC16 (uint32_t startAddress, uint32_t length, uint32_t storeAddress)
Parameters |
[in] startAddress
|
uint32_t
- starting address of FLASH 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 FLASH address where calculated CRC will be stored
|
|
Returns |
diag_crc_status_t
| CRC_OK, CRC_INVALID_ADDRESS, CRC_INVALID_LENGTH, CRC_STORE_ERROR
|
|
Table 14-41. diag_crc_status_tDIAG_FLASH_ValidateCRC16 (uint32_t startAddress, uint32_t length, uint32_t refAddress)
Parameters |
[in] startAddress
|
uint32_t
- starting address of FLASH 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 FLASH address where reference CRC is available
|
|
Returns |
diag_crc_status_t
| CRC_OK, CRC_ERROR, CRC_INVALID_ADDRESS, CRC_INVALID_LENGTH
|
|