1.14.8.1 CRC_CRCSetup Function

C

void CRC_CRCSetup(CRC_SETUP CRCSetup);

Summary

CRC setup and enable function

Description

Sets up the CRC engine and enables it.

Application needs to call this API with proper setup parameters before starting first CRC calculation using the CRC_CRCCalculate(). It can be called again if any change is required to be made to CRC Engine.

CRC_CRCCalculate() function should be used to calculate and get the generated CRC value.

Parameters

Param Description
CRC_SETUP CRCSetup parameter holding the crc setup information

Returns

None

Example

CRC_SETUP crcSetup = {0};

crcSetup.reverse_crc_input = true;
crcSetup.polynomial_length = 32;
crcSetup.polynomial = 0x04C11DB7;
crcSetup.reverse_crc_output = true;
crcSetup.final_xor_value = 0xFFFFFFFF;

CRC_CRCSetup(crcSetup);

Remarks

  • Currently Alternate mode is only supported. The CRC initial value (seed) must be in direct form